[gtk+/gtk-2-24] GDK W32: Fix bounding rect calculation on window creation



commit a4af2dd2466c0dc63f6050ab5efc7590153c3b2a
Author: Jeremy Tan <jtanx outlook com>
Date:   Wed Apr 13 21:39:46 2016 +0800

    GDK W32: Fix bounding rect calculation on window creation
    
    This is a backport of commit 260d521.
    
    The bounding rect specifies the top left and bottom right corners - the
    bottom right corner must account for the current window position.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=764996

 gdk/win32/gdkwindow-win32.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gdk/win32/gdkwindow-win32.c b/gdk/win32/gdkwindow-win32.c
index a82dc0f..d918686 100644
--- a/gdk/win32/gdkwindow-win32.c
+++ b/gdk/win32/gdkwindow-win32.c
@@ -683,8 +683,8 @@ _gdk_window_impl_new (GdkWindow     *window,
     {
       rect.left = private->x;
       rect.top = private->y;
-      rect.right = private->width;
-      rect.bottom = private->height;
+      rect.right = private->width + private->x;
+      rect.bottom = private->height + private->y;
 
       AdjustWindowRectEx (&rect, dwStyle, FALSE, dwExStyle);
 


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