GdkWindowState new_state = 0;
uint32_t *p;
- if (width > 0 && height > 0)
- {
- gdk_window_constrain_size (&impl->geometry_hints,
- impl->geometry_mask,
- width + impl->margin_left + impl->margin_right,
- height + impl->margin_top + impl->margin_bottom,
- &width,
- &height);
-
- gdk_wayland_window_configure (window, width, height, impl->scale);
- }
-
wl_array_for_each (p, states)
{
uint32_t state = *p;
}
}
+ if (width > 0 && height > 0)
+ {
+ GdkWindowHints geometry_mask = impl->geometry_mask;
+
+ /* Ignore size increments for maximized/fullscreen windows */
+ if (new_state & (GDK_WINDOW_STATE_MAXIMIZED | GDK_WINDOW_STATE_FULLSCREEN))
+ geometry_mask &= ~GDK_HINT_RESIZE_INC;
+
+ gdk_window_constrain_size (&impl->geometry_hints,
+ geometry_mask,
+ width + impl->margin_left + impl->margin_right,
+ height + impl->margin_top + impl->margin_bottom,
+ &width,
+ &height);
+
+ gdk_wayland_window_configure (window, width, height, impl->scale);
+ }
+
GDK_NOTE (EVENTS,
g_message ("configure, window %p %dx%d,%s%s%s",
window, width, height,
gint *new_width,
gint *new_height)
{
- gdk_window_constrain_size (geometry, flags, width, height,
+ GtkWindowPrivate *priv = window->priv;
+ guint geometry_flags;
+
+ /* ignore size increments for maximized/fullscreen windows */
+ if (priv->maximized || priv->fullscreen)
+ geometry_flags = flags & ~GDK_HINT_RESIZE_INC;
+ else
+ geometry_flags = flags;
+
+ gdk_window_constrain_size (geometry, geometry_flags, width, height,
new_width, new_height);
}