From ea21c4563b8b9d977722436a9b43657435e6c5e8 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Mon, 13 Oct 2014 02:15:41 -0700 Subject: [PATCH] gdkwindow-x11: Fix graphical regression from 5e325c4 Before 5e325c4, the default BitGravity was NorthWestGravity. When static gravities were removed in 5e325c4, the BitGravity regressed to the X11 default, Forget. Forget causes giant graphical glitches and black flashes when resizing, especially in some environments that aren't synchronized to a paint clock yet, like XWayland. I'm assuming that the author assumed that the default of BitGravity was NorthWestGravity, which is the default of WinGravity. Just go ahead and fix this regression to make resizing look smooth again. --- gdk/x11/gdkwindow-x11.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c index 3d6ff76c5b..8077f737bf 100644 --- a/gdk/x11/gdkwindow-x11.c +++ b/gdk/x11/gdkwindow-x11.c @@ -1062,6 +1062,9 @@ _gdk_x11_display_create_window_impl (GdkDisplay *display, xattributes.border_pixel = BlackPixel (xdisplay, x11_screen->screen_num); xattributes_mask |= CWBorderPixel | CWBackPixel; + xattributes.bit_gravity = NorthWestGravity; + xattributes_mask |= CWBitGravity; + xattributes.colormap = _gdk_visual_get_x11_colormap (window->visual); xattributes_mask |= CWColormap;