transient windows with the gtk socket and plug mechanism

Olivier Fourdan fourdan at xfce.org
Tue Apr 24 21:46:42 CEST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Hi Andreas,

Andreas Lampersperger wrote:
> Hello,
> 
> please write me your opinions to the following problem and the patch I provided:
> 
> I have encountered that the xfwm4 (ver 4.4.1) does not tread transient windows as transients when the gtksocket gtkplug mechanism is used. (Other window managers like kde does have the same problem).

Yes, because it's not a problem with the window manager, but with the
application not setting the transient property properly.

> test case: Use firefox and install adobe reader as a firefox plugin, so that pdf's are directly shown in the firefox window. If you click on "save a copy..." a "copy as"-dialog is shown. This dialog has the wm_hints transient and modal. If you now click on the pdf-window the "save-as" dialog is hidden by the firefox window and the adobe reader (within the firefox window) is not responding, which is imho a failure because of the transient and modal hints.
> 
> reason: the transient_for hint specifies the gtk-plug-window and this window is not registered by the xfwm as a "client"

Clients are top level window only. From the standard:

"The WM_TRANSIENT_FOR hint of the ICCCM allows clients to specify that a
toplevel window[...]"

> solution: climbing up the x-window-tree from the gtk-plug-window to the gtk-socket-window to the firefox window and use this window as transient_for.
> I made the necessary modifications to the file .../xfce-4.4.1/src/xfwm4-4.4.1/src/hints.c:

Unfortunately, I don't think this patch is correct. It doesn't make
sense to query the server for the window tree, it requires a round trip
and that will slow things down.

Moreover, any such query should be done after grabbing the X server,
otherwise the client window may create/destroy subwindows at the same
time, causing race conditions.

At last, IMHO, this patch adds useless complexity and a lot of trickery
to the window manager, while the problem lies in the application that do
not respect the standard.

Cheers,
Olivier.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFGLl6iFHBtvh5LRUARArogAKDWEm3iop/MXczhFvPZjoQFSyw1kQCeNpPb
rAmLBOLcxftN3YrsBEZ72Uw=
=Tp6x
-----END PGP SIGNATURE-----




More information about the Xfce4-dev mailing list