Hi!

I've recently experienced focusing problems with borderless rxvt-unicode
windows under kwin and Xorg 1.5.0.
See also http://bugs.gentoo.org/show_bug.cgi?id=237271

Debugging the issue I found out that while kwin understands
MWM_HINTS_DECORATIONS, it does not set _MOTIF_WM_INFO and therefore
urxvt will enable its override-redirect mode.

While I still don't know what's causing override-redirect to fail,
having kwin handle the window seems the cleaner approach to me. So I
patched rxvt-unicode with the attached patch, which disables the check
for _MOTIF_WM_INFO. People who want borderless windows on a window
manager that doesn't honour MWM_HINTS_DECORATIONS would be required to
enable override-redirect mode manually in order to get the old behaviour.

I have no idea what standards define _MOTIF_WM_INFO,
MWM_HINTS_DECORATIONS and the interdependence between these two. I guess
there is a high probability you will be going to argue that rxvt-unicode
behaves correctly and instead kwin is broken. It looks like at least
XFCE was modified just to accomodate rxvt-unicode, according to
http://bugzilla.xfce.org/show_bug.cgi?id=1877 . STill, patching a single
failing application instead of an otherwise working window manager seems
the pragmatic solution to me. And auto-enabling override-redirect mode
feels bad in any case.

Would you apply this patch to the main repository?

Greetings,
 Martin von Gagern
While setting MWM_HINTS_DECORATIONS to disable window decorations
seems to work with most window managers, using _MOTIF_WM_INFO seems
not to, and in some cases can lead to severe problems with focus
management. Therefore this patch here disables the _MOTIF_WM_INFO
check and always attempts to have the window manager honour the
decorations hint.

If your window manager does not honour MWM_HINTS_DECORATIONS, and you
are determined that you want to have borderless windows nevertheless,
you are still free to enable override-redirect manually, using the
corresponding command line option or X resource.

See also: http://bugs.gentoo.org/show_bug.cgi?id=237271
2008-09-10 Martin von Gagern

Index: src/init.C
===================================================================
RCS file: /schmorpforge/rxvt-unicode/src/init.C,v
retrieving revision 1.253
diff -u -r1.253 init.C
--- src/init.C	15 Jul 2008 16:41:22 -0000	1.253
+++ src/init.C	10 Sep 2008 08:07:09 -0000
@@ -1078,15 +1078,7 @@
 #if ENABLE_FRILLS
   if (option (Opt_borderLess))
     {
-      if (XInternAtom (dpy, "_MOTIF_WM_INFO", True) == None)
-        {
-          // rxvt_warn("Window Manager does not support MWM hints.  Bypassing window manager control for borderless window.\n");
-          attributes.override_redirect = true;
-        }
-      else
-        {
           mwmhints.flags = MWM_HINTS_DECORATIONS;
-        }
     }
 #endif
 

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
rxvt-unicode mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/rxvt-unicode

Reply via email to