[gtk+/gtk-3-8] X11: Fix the cut-off for too large windows



commit 3c58485a7f200b09d31c070781a9a972d85f110e
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Jul 29 20:53:55 2013 -0400

    X11: Fix the cut-off for too large windows
    
    We can only handle 2^15-1 pixels, not 2^16-1.
    Pointed out by Morten Welinder.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=698758

 gdk/x11/gdkwindow-x11.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index ca42e86..9b39440 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -1079,15 +1079,15 @@ _gdk_x11_display_create_window_impl (GdkDisplay    *display,
       class = InputOnly;
     }
 
-  if (window->width > 65535 ||
-      window->height > 65535)
+  if (window->width > 32767 ||
+      window->height > 32767)
     {
-      g_warning ("Native Windows wider or taller than 65535 pixels are not supported");
+      g_warning ("Native Windows wider or taller than 32767 pixels are not supported");
 
-      if (window->width > 65535)
-        window->width = 65535;
-      if (window->height > 65535)
-        window->height = 65535;
+      if (window->width > 32767)
+        window->width = 32767;
+      if (window->height > 32767)
+        window->height = 32767;
     }
 
   impl->xid = XCreateWindow (xdisplay, xparent,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]