[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:27 CEST 2016


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

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

commit 47fa600fb820a36bd5b08c13b5923a3b712ac8a0
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 4c2c50f..0d946de 100644
--- a/src/client.c
+++ b/src/client.c
@@ -1872,8 +1872,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