summaryrefslogtreecommitdiff
path: root/wm/bbkeys09/patches/patch-src_ScreenHandler.cpp
blob: 1d710ef903b86bccca5392e686c07bb46accf9c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
$NetBSD: patch-src_ScreenHandler.cpp,v 1.1 2015/11/17 15:59:13 he Exp $

Debug output for missing active window.
Used while debugging what turned out to be an LP64 problem,
but may be useful later, so left here.

--- src/ScreenHandler.cpp.orig	2008-12-22 02:48:59.000000000 +0000
+++ src/ScreenHandler.cpp
@@ -467,6 +467,9 @@ void ScreenHandler::keyPressEvent (const
 				assert(false);  // unhandled action type!
 				break;
 		}
+	} else {
+		if ( _debug )
+			cout <<BBTOOL << ": " << "No active window" <<endl;
 	}
 }
 
@@ -564,18 +567,26 @@ void ScreenHandler::updateActiveWindow()
 {
   assert(_managed);
 
+  if ( _debug )
+    cout <<BBTOOL << ": " << "checking active window" <<endl;
+
   Window a = None;
   _netclient->getValue(_root, _netclient->activeWindow(), XA_WINDOW, a);
 
   if ( None == a ) {
+    if ( _debug )
+      cout <<BBTOOL << ": " << "no active window found" << endl;
     return;
   }
 
   WindowList::iterator it, end = _clients.end();
   for (it = _clients.begin(); it != end; ++it) {
     if ( (*it)->window() == a) {
-      if ( (*it)->getScreenNumber() != _screenNumber )
+      if ( (*it)->getScreenNumber() != _screenNumber ) {
+        if ( _debug )
+          cout <<BBTOOL << ": " << "wrong screen?" << endl;
         return;
+      }
       break;
     }
   }
@@ -597,8 +608,14 @@ void ScreenHandler::updateActiveWindow()
 
       if ( _debug )
         cout <<BBTOOL << ": " << "active window now: [" << bt::toLocale((*_active)->title()) <<"]" <<endl;
+    } else {
+      if ( _debug )
+        cout <<BBTOOL << ": " << "cycling through window list" <<endl;
     }
 
+  } else {
+    if ( _debug )
+      cout <<BBTOOL << ": " << "active window == end, ignored" <<endl;
   }
 
 }