updated on Thu Jan 19 12:17:07 UTC 2012
[aur-mirror.git] / alltray-compiz / compiz.patch
blob936f1a0c201a4db0eeb3d014d2722c358927333c
1 --- alltray-0.69/src/utils.c
2 +++ alltray-0.69/src/utils.c
3 @@ -24,6 +24,7 @@
4 * Copyright:
6 * Jochen Baier, 2004, 2005, 2006 (email@Jochen-Baier.de)
7 + * Portions by Michael B. Trausch, 2007, 2008 (mike@trausch.us)
10 * Based on code from:
11 @@ -1475,6 +1476,20 @@
12 return;
15 + // Interact nicely with Compiz, which works slightly differently.
16 + // We use get_window_manager() instead of win->window_manager because
17 + // win->window_manager is not always populated when running under
18 + // Compiz.
19 + if ((!strcasecmp(get_window_manager(), "compiz")) && (win->no_title)
20 + && (!win->xmms)) {
21 + title_string = title;
22 + if (win->no_reparent) {
23 + gdk_window_set_title(win->child_gdk, title_string);
24 + } else {
25 + gdk_window_set_title(win->parent_gdk, title_string);
26 + }
27 + }
29 if (!win->xmms) {
30 title_string=g_strconcat (title, " (AllTray)", NULL);
32 --- alltray-0.69/src/clickmode.c
33 +++ alltray-0.69/src/clickmode.c
34 @@ -141,7 +141,7 @@
36 target_win != None &&
37 target_win != GDK_ROOT_WINDOW() &&
38 - target_win != target_win_xmu &&
39 + (target_win != target_win_xmu || win->compiz == TRUE) &&
40 window_type_is_normal (target_win_xmu))) {
42 gdk_pointer_ungrab (GDK_CURRENT_TIME);
43 --- alltray-0.69/src/common.h
44 +++ alltray-0.69/src/common.h
45 @@ -186,6 +186,7 @@
47 gchar *window_manager;
48 gboolean gnome;
49 + gboolean compiz;
50 gboolean kde;
52 gboolean no_reparent;
53 --- alltray-0.69/src/main.c
54 +++ alltray-0.69/src/main.c
55 @@ -123,6 +123,7 @@
57 win->window_manager=NULL;
58 win->gnome=FALSE;
59 + win->compiz=FALSE;
60 win->kde=FALSE;
62 win->no_reparent=FALSE;
63 @@ -169,8 +170,8 @@
65 if (debug) printf ("window manager: %s\n", win->window_manager);
67 - if (!strcmp(win->window_manager, "Metacity")) {
69 + if ((!strcmp(win->window_manager, "Metacity")) || (!strcmp(win->window_manager, "compiz"))) {
71 #ifndef GCONF_NOT_DISABLED
72 printf ("\n\nAlltray: To use Alltray under Gnome, Gconf support should not be disabled.\n"
73 " But it is.\n\n");
74 @@ -181,6 +182,10 @@
75 win->no_reparent=TRUE;
78 + if (!strcmp(win->window_manager, "compiz")) {
79 + win->compiz = TRUE;
80 + }
82 if (!strcmp(win->window_manager, "KWin")) {
83 win->kde=TRUE;
84 win->no_reparent=TRUE;
85 @@ -237,6 +242,7 @@
87 win->gnome=FALSE;
88 win->kde=FALSE;
89 + win->compiz=FALSE;
90 win->no_reparent=TRUE;