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



commit 280cf4ca949cb403bf4e61611a349fd59644cf6e
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Jul 29 20:57:00 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.
    
    http://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 59a1506..837f605 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -776,15 +776,15 @@ _gdk_window_impl_new (GdkWindow     *window,
       g_object_ref (draw_impl->colormap);
     }
 
-  if (private->width > 65535 ||
-      private->height > 65535)
+  if (private->width > 32767 ||
+      private->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 (private->width > 65535)
-       private->width = 65535;
-      if (private->height > 65535)
-       private->height = 65535;
+      if (private->width > 32767)
+       private->width = 32767;
+      if (private->height > 32767)
+       private->height = 32767;
     }
   
   xid = draw_impl->xid = XCreateWindow (xdisplay, xparent,


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