File: xmonad-support

package info (click to toggle)
matchbox-keyboard 0.1%2Bsvn20080916-11
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 1,048 kB
  • ctags: 539
  • sloc: ansic: 3,950; xml: 1,778; makefile: 85; sh: 2
file content (47 lines) | stat: -rw-r--r-- 1,453 bytes parent folder | download | duplicates (4)
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
Description: Add support for xmonad (#536847)
 The attached patch adds support for xmonad. Without this
 patch, matchbox-keyboard can be focused like any other window,
 which makes it not useful. With the patch, xmonad does not manage
 it at all.
 .
 It might be better to use the STRUTS property to communicate
 with xmonad, but just uncommenting the code that was already
 there Worked for Me.
Author: Joey Hess <joeyh@debian.org>
Last-Update: 2009-09-13
--- a/src/matchbox-keyboard-ui.c
+++ b/src/matchbox-keyboard-ui.c
@@ -643,6 +643,7 @@
   char                *wm_name;
   boolean              have_matchbox_wm = False;             
   boolean              have_ewmh_wm     = False;             
+  boolean              have_xmonad_wm   = False;             
 
   /*
   atom_wm_protocols = { 
@@ -698,6 +699,8 @@
 
   if (wm_name && streq(wm_name, "matchbox"))
     have_matchbox_wm = True;
+  else if (wm_name && streq(wm_name, "xmonad"))
+    have_xmonad_wm = True;
 
   win_attr.override_redirect = False; /* Set to true for extreme case */
   win_attr.event_mask 
@@ -813,15 +816,12 @@
 			      PropModeReplace, 
 			      (unsigned char *) &atom_NET_WM_WINDOW_TYPE_TOOLBAR, 1);
 	    }
-	  else
+	  else if (have_xmonad_wm)
 	    {
-	      /*
 		XChangeProperty(ui->xdpy, ui->xwin, 
 		atom_NET_WM_WINDOW_TYPE, XA_ATOM, 32, 
 		PropModeReplace, 
 		(unsigned char *) &atom_NET_WM_WINDOW_TYPE_DOCK, 1);
-	      */
-	      
 	    }
 	}
     }