[Xfce4-commits] [xfce/xfwm4] 01/01: Force application win_gravity to NorthWestGravity

noreply at xfce.org noreply at xfce.org
Thu Jun 2 21:39:13 CEST 2016


This is an automated email from the git hooks/post-receive script.

olivier pushed a commit to branch master
in repository xfce/xfwm4.

commit b16583530cb6d134c25abcb2ffdbb5504869d00b
Author: Keith Packard <keithp at keithp.com>
Date:   Thu Jun 2 11:36:48 2016 -0700

    Force application win_gravity to NorthWestGravity
    
    LibreOffice incorrectly sets its top level windows win_gravity field
    to StaticGravity. Resizing these windows to the left or upwards
    results in a corrupted application with the application window moved
    within the parent by the parent window resize.
    
    Metacity forces window gravity for all application windows to
    NorthWest, masking this application bug. xfwm4 should do the same.
    
    A bug has been filed against LibreOffice as well.
    
    Signed-off-by: Keith Packard <keithp at keithp.com>
---
 src/client.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/src/client.c b/src/client.c
index 652a75e..d072683 100644
--- a/src/client.c
+++ b/src/client.c
@@ -1890,8 +1890,21 @@ clientFrame (DisplayInfo *display_info, Window w, gboolean recapture)
         XUnmapWindow (display_info->dpy, c->window);
     }
     XReparentWindow (display_info->dpy, c->window, c->frame, frameLeft (c), frameTop (c));
-    valuemask = CWEventMask;
+    valuemask = CWEventMask|CWWinGravity;
+
+    /* Force win_gravity to NorthWest. Any other gravity has the
+     * window move relative to its parent when the parent resizes.
+     *
+     * There are many bug reports related to libreoffice using
+     * StaticGravity, including:
+     *
+     * http://www.linuxquestions.org/questions/linux-desktop-74/strange-libreoffice-problem-on-debian-with-xfce-4175469847/
+     * https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers/+bug/889212
+     * https://bbs.archlinux.org/viewtopic.php?id=133137
+     * http://forums.debian.net/viewtopic.php?f=6&t=105757
+     */
     attributes.event_mask = (CLIENT_EVENT_MASK);
+    attributes.win_gravity = NorthWestGravity;
     XChangeWindowAttributes (display_info->dpy, c->window, valuemask, &attributes);
     if (display_info->have_shape)
     {

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list