--- alltray-0.69/src/utils.c +++ alltray-0.69/src/utils.c @@ -24,6 +24,7 @@ * Copyright: * * Jochen Baier, 2004, 2005, 2006 (email@Jochen-Baier.de) + * Portions by Michael B. Trausch, 2007, 2008 (mike@trausch.us) * * * Based on code from: @@ -1475,6 +1476,20 @@ return; } + // Interact nicely with Compiz, which works slightly differently. + // We use get_window_manager() instead of win->window_manager because + // win->window_manager is not always populated when running under + // Compiz. + if ((!strcasecmp(get_window_manager(), "compiz")) && (win->no_title) + && (!win->xmms)) { + title_string = title; + if (win->no_reparent) { + gdk_window_set_title(win->child_gdk, title_string); + } else { + gdk_window_set_title(win->parent_gdk, title_string); + } + } + if (!win->xmms) { title_string=g_strconcat (title, " (AllTray)", NULL); --- alltray-0.69/src/clickmode.c +++ alltray-0.69/src/clickmode.c @@ -141,7 +141,7 @@ target_win != None && target_win != GDK_ROOT_WINDOW() && - target_win != target_win_xmu && + (target_win != target_win_xmu || win->compiz == TRUE) && window_type_is_normal (target_win_xmu))) { gdk_pointer_ungrab (GDK_CURRENT_TIME); --- alltray-0.69/src/common.h +++ alltray-0.69/src/common.h @@ -186,6 +186,7 @@ gchar *window_manager; gboolean gnome; + gboolean compiz; gboolean kde; gboolean no_reparent; --- alltray-0.69/src/main.c +++ alltray-0.69/src/main.c @@ -123,6 +123,7 @@ win->window_manager=NULL; win->gnome=FALSE; + win->compiz=FALSE; win->kde=FALSE; win->no_reparent=FALSE; @@ -169,8 +170,8 @@ if (debug) printf ("window manager: %s\n", win->window_manager); - if (!strcmp(win->window_manager, "Metacity")) { - + if ((!strcmp(win->window_manager, "Metacity")) || (!strcmp(win->window_manager, "compiz"))) { + #ifndef GCONF_NOT_DISABLED printf ("\n\nAlltray: To use Alltray under Gnome, Gconf support should not be disabled.\n" " But it is.\n\n"); @@ -181,6 +182,10 @@ win->no_reparent=TRUE; } + if (!strcmp(win->window_manager, "compiz")) { + win->compiz = TRUE; + } + if (!strcmp(win->window_manager, "KWin")) { win->kde=TRUE; win->no_reparent=TRUE; @@ -237,6 +242,7 @@ win->gnome=FALSE; win->kde=FALSE; + win->compiz=FALSE; win->no_reparent=TRUE; }