[gtk+] wayland: Constrain the window configure requests to the window's geometry
- From: Rob Bradford <rbradford src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] wayland: Constrain the window configure requests to the window's geometry
- Date: Mon, 9 Jan 2012 17:21:19 +0000 (UTC)
commit 1f023cd2b1f1609b495cc4af9081ba26506c5920
Author: Rob Bradford <rob linux intel com>
Date: Mon Jan 9 17:15:00 2012 +0000
wayland: Constrain the window configure requests to the window's geometry
When we receive a configure event from Wayland telling us to resize our
surface we check against the geometry constraints for the window to ensure we
do not resize below the minimum and maximum limits.
gdk/wayland/gdkwindow-wayland.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
index 6a43e5f..cffc4f5 100644
--- a/gdk/wayland/gdkwindow-wayland.c
+++ b/gdk/wayland/gdkwindow-wayland.c
@@ -484,11 +484,22 @@ shell_surface_handle_configure(void *data,
int32_t height)
{
GdkWindow *window = GDK_WINDOW (data);
+ GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
GdkDisplay *display;
GdkEvent *event;
display = gdk_window_get_display (window);
+ gdk_window_constrain_size (&impl->geometry_hints,
+ impl->geometry_mask,
+ width,
+ height,
+ &width,
+ &height);
+
+ /* TODO: Only generate a configure event if width or height have actually
+ * changed?
+ */
event = gdk_event_new (GDK_CONFIGURE);
event->configure.window = window;
event->configure.send_event = FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]