I run Evolution wrapped in Alltray so that it minimizes to the system tray. This works fine with xfwm4, but when running under Openbox, trying to minimize Evolution to system tray, will not remove the entry from taskbar in xfce4-panel.
Clicking on the icon in system tray will toggle between showing/hiding the Evolution window on desktop, but attempting to hide the Evolution does not remove it from taskbar.
Created attachment 1707[details]
Debug output of Alltray lauching Evolution
Output generated by running Alltray in debug mode. Not sure if it will help, but here it is.
I performed a small hack in Alltray to get it to work properly with xfce4-panel and Openbox. I am now getting the proper behaviour in xfce-panel. But this patch does not work properly with FbPanel or PyPanel.
Here is the patch for utils.c in Alltray code. I am trying to reach the author of Alltray but have received no response. Maybe someone could comment on if I did the right changes in code (i am new to all this WM stuff)
-----------------------------------------------------------------------------
--- utils.c.bak 2008-03-27 09:58:54.000000000 -0400
+++ utils.c 2008-03-27 09:59:35.000000000 -0400
@@ -1928,10 +1928,17 @@
} else {
if (debug) printf ("hide\n");
-
+ /* seems like this call should be before iconfiying window
+ * otherwise it breaks most xfce-panel under openbox
+ * but i am not sure what it does to other panels
+ */
+ skip_taskbar (win, TRUE);
+
XIconifyWindow (GDK_DISPLAY(), parent_xlib, DefaultScreen(GDK_DISPLAY()));
+ /*
if (!win->skip_tasklist)
skip_taskbar (win, !keep_in_taskbar);
+ */
}
Comment 3Michael B. Trausch
2009-06-12 17:14:49 EDT
I was checking into a bug reported against AllTray running on OpenBox[1] today and installed OpenBox (from Ubuntu repositories, this is OpenBox 3.4.7.2) to try to determine what the problem was or if the problem has been fixed in the current line of development for AllTray.[2] Indeed, it has not.
To hide a window, AllTray minimizes the window and sets the window hint to skip the taskbar. This works as expected on a GNOME system both using Metacity and Compiz as window managers. However, when using OpenBox as a window manager, the window only gets/loses the SKIP_TASKLIST once; so the first time the window is “docked” and “undocked”, SKIP_TASKLIST gets set or removed as is appropriate. However, the second and subsequent times, it seems that the request to make the window SKIP_TASKLIST is being ignored or otherwise not recognized.
I am not (currently) able to identify the issue that is causing this, but if I can find a “good” version of OpenBox, I can try to bisect the bug in git.
I'd greatly appreciate it if someone with experience with OpenBox development would get in touch with me either via this bug or via email, or via the bug report below. Thanks a bunch!
[1] https://bugs.edge.launchpad.net/alltray/+bug/301636
[2] https://edge.launchpad.net/alltray/trunk/0.7.3dev
Comment 4Michael B. Trausch
2009-06-12 17:44:45 EDT
And looking more closely like I should have in the first place, I am an idiot. :-)
It does absolutely seem like it's an ordering issue; I've fixed the issue in AllTray's trunk, and will take a look at putting out a fix on the old-maintenance branch that I'm maintaining for the old AllTray to fix this under OpenBox, as well.
I'd imagine that this probably still needs to be addressed in OpenBox somehow or another though.
So this is sort of a fun race condition, but also a weird check in the openbox code. What we do is check if there is an UnmapEvent further down the queue, in that case we ignore the message to enable skip_taskbar. Why, I don't know. :). I've sent a mail to dana asking about it. It's been in the code since the very first commit, so there's no explaining message either.
Created attachment 1707 [details] Debug output of Alltray lauching Evolution Output generated by running Alltray in debug mode. Not sure if it will help, but here it is.I performed a small hack in Alltray to get it to work properly with xfce4-panel and Openbox. I am now getting the proper behaviour in xfce-panel. But this patch does not work properly with FbPanel or PyPanel. Here is the patch for utils.c in Alltray code. I am trying to reach the author of Alltray but have received no response. Maybe someone could comment on if I did the right changes in code (i am new to all this WM stuff) ----------------------------------------------------------------------------- --- utils.c.bak 2008-03-27 09:58:54.000000000 -0400 +++ utils.c 2008-03-27 09:59:35.000000000 -0400 @@ -1928,10 +1928,17 @@ } else { if (debug) printf ("hide\n"); - + /* seems like this call should be before iconfiying window + * otherwise it breaks most xfce-panel under openbox + * but i am not sure what it does to other panels + */ + skip_taskbar (win, TRUE); + XIconifyWindow (GDK_DISPLAY(), parent_xlib, DefaultScreen(GDK_DISPLAY())); + /* if (!win->skip_tasklist) skip_taskbar (win, !keep_in_taskbar); + */ }