summaryrefslogtreecommitdiff
path: root/gdk
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2016-06-06 09:48:36 +0100
committerMatthias Clasen <mclasen@redhat.com>2016-07-25 09:00:01 -0400
commitf65c116d2a326e195a7fd7e64fb210b2c8486899 (patch)
tree34c541696dc7427661b44eb5c9d3604fca89c2be /gdk
parentd9dd7eb7576c905312cae5bc5a0b86a13d2c6465 (diff)
downloadgtk+-f65c116d2a326e195a7fd7e64fb210b2c8486899.tar.gz
Don't apply GDK_HINT_RESIZE_INC to GDK_WINDOW_STATE_TILED windows
This matches the behaviour of Mutter, Metacity and traditional X11 window managers on the window manager side, and is what we want for at least gnome-terminal. I can't think of any reason why we'd want incremental resize in any other tiled window. Signed-off-by: Simon McVittie <smcv@debian.org> Bug: https://bugzilla.gnome.org/show_bug.cgi?id=760944 https://bugzilla.gnome.org/show_bug.cgi?id=755947
Diffstat (limited to 'gdk')
-rw-r--r--gdk/wayland/gdkwindow-wayland.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
index d548458c9b..e06f39654d 100644
--- a/gdk/wayland/gdkwindow-wayland.c
+++ b/gdk/wayland/gdkwindow-wayland.c
@@ -1223,7 +1223,7 @@ xdg_surface_configure (void *data,
GdkWindow *window = GDK_WINDOW (data);
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
GdkWindowState new_state = 0;
- gboolean maximized_or_fullscreen;
+ gboolean fixed_size;
uint32_t *p;
wl_array_for_each (p, states)
@@ -1252,8 +1252,8 @@ xdg_surface_configure (void *data,
}
}
- maximized_or_fullscreen =
- new_state & (GDK_WINDOW_STATE_MAXIMIZED | GDK_WINDOW_STATE_FULLSCREEN);
+ fixed_size =
+ new_state & (GDK_WINDOW_STATE_MAXIMIZED | GDK_WINDOW_STATE_FULLSCREEN | GDK_WINDOW_STATE_TILED);
/* According to xdg_shell, an xdg_surface.configure with size 0x0
* should be interpreted as that it is up to the client to set a
@@ -1263,7 +1263,7 @@ xdg_surface_configure (void *data,
* the client should configure its size back to what it was before
* being maximize or fullscreen.
*/
- if (width == 0 && height == 0 && !maximized_or_fullscreen)
+ if (width == 0 && height == 0 && !fixed_size)
{
width = impl->saved_width;
height = impl->saved_height;
@@ -1274,7 +1274,7 @@ xdg_surface_configure (void *data,
GdkWindowHints geometry_mask = impl->geometry_mask;
/* Ignore size increments for maximized/fullscreen windows */
- if (maximized_or_fullscreen)
+ if (fixed_size)
geometry_mask &= ~GDK_HINT_RESIZE_INC;
gdk_window_constrain_size (&impl->geometry_hints,