GNOME Bugzilla – Bug 764996
GDK: Incorrect window size when creating window with position specified
Last modified: 2016-09-02 05:38:48 UTC
Created attachment 325862 [details] Sample program exhibiting issue This bug was introduced with 1d838f586c574af7f05c618a337f8d34a58d9125. https://github.com/GNOME/gtk/blame/4dcd33f2d5f1bcabc8b5195a85d4f92054506e1e/gdk/win32/gdkwindow-win32.c#L820 When creating a new window with a specific position, the window width and height is incorrectly set due to an error in how the bounding rect is calculated. The bug appears when creating a window with the GDK_WA_X and/or GDK_WA_Y attribute flag and a non-zero x/y position is provided.
Created attachment 325863 [details] [review] Patch to fix the issue
Review of attachment 325863 [details] [review]: Patch is obviously correct.
Do you need someone to push it into git master, or you can do it yourself?
As far as I know, I don't have git access, so if you could push it that would be great!
Attachment 325863 [details] pushed as commit 260d521dd7f2cdfb9a88c32280120fabfb3a27d0.
This is also present in GTK2 (see here: https://github.com/GNOME/gtk/blob/gtk-2-24/gdk/win32/gdkwindow-win32.c#L686) Is it possible to get this fix backported?
Created attachment 334617 [details] [review] GDK W32: Fix bounding rect calculation on window creation Does this patch fix the issue for you in gtk+-2.24.x?
I've just checked, and yes that patch fixes it for gtk+-2.24.x Thanks!
Comment on attachment 334617 [details] [review] GDK W32: Fix bounding rect calculation on window creation Attachment 334617 [details] pushed as a4af2dd - GDK W32: Fix bounding rect calculation on window creation