XFWM4 Window Problems, Part Deux

Milosz Derezynski internalerror at gmail.com
Wed Nov 15 08:38:56 CET 2006

Hi Everyone,

Here is a problem that (again)  only occurs on XFWM4. If anyone would be so
glad as to explain me why this happens only on XFWM4, and if XFWM4 does the
right thin then please *why* it supposedly does the right thing and all
other WMs (KWin, Metacity, Compiz (no, not Beryl, Beryl can go to hell))
work properly.

Introduction (*testcase code follows*, don't be so afraid of having to just
read a boring mail!):

We have a tray icon (API-wise known to Gtk+ users as GtkStatusIcon) in our
app, and allow for "trayconification" of the main window if the user wishes
so, which can happen through just minimizing the window (watching
window-state-event) or clicking on the tray icon.

What happens on all other WMs is, that when you then click the tray icon to
show the UI again, it shows (we unset the skip-taskbar and skip-pager hint,
and call Gtk::Window::present (), or in C terms gtk_window_present ())

What happens on _XFWM4_ is, that the window is being shown again, yet still
iconified. Well, no idea, but again it works on all other WMs so i'm sure
we've (of the BMP project) hit yet another glorious boundary of the
limitation and non-specness of all other WMs and XFWM4 excels in it's
excellent standards compliance!

(Don't get me wrong, i'm using XFCE 4.4 beta myself and i think it's an
excellent desktop; but i think that XFWM4 is somewhat.. peculiar)

* Testcase Code:

* Compile With:
   gcc -o iconify-present iconify-present.c `pkg-config --libs --cflags
gtk+-2.0` -Wall -Werror

* Run It With:

* How To test:

  - Run the testcase
  - Iconify the window, this causes the window (in this code example of
course only to be specific), to be also hidden from the taskbar and pager,
and generally be hidden from visibility
  - After 6 seconds (roughly, it's not a high priority timeout source), the
present_window() code is run which causes the window to be shown again on
the pager and the taskbar, as well as being present-ed using
gtk_window_present ()

What happens on..:
  - XFWM4: Window stays iconified
  - All other tested WMs (KWin, Metacity, Compiz): Window is being show
again as it was before

Advanced Notes: (Also in the sourcecode itself):
 * While the code may look odd at first, it simulates the following
behaviour in our app:
 *      Someone iconifies the window using the window manager, upon which it
receives a
 *      EventWindowState; if the option to "minimze the UI to the 'tray'" is
enabled, BMP
 *      will additionally hide the window from the taskbar, pager, and also
hide it entirely
 *      in addition to the already happening iconification
 *      I guess this first part of the code is rather clear.
 *      Now the timeout function. As i don't want to go into coding a
GtkStatusIcon into here
 *      (for now at least), i'm simply simulating that someone clicked the
statusicon after 2
 *      seconds of hiding the window; the code in present_window() does
exactly what our code
 *      does in the case the UI should be "trayconified", as in it does not
only let it at being
 *      deiconified but also clear the skip-pager and skip-taskbar hints and
does a window_present()

Any ideas? :D

Gordon Froh^W^WMilosz Derezynski
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.xfce.org/pipermail/xfce4-dev/attachments/20061115/b1d97845/attachment.html>

More information about the Xfce4-dev mailing list