[gtk+] GDK W32: Fix shown window position calculation for dialogs and splashes
- From: Руслан Ижбулатов <ruslanizhb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GDK W32: Fix shown window position calculation for dialogs and splashes
- Date: Mon, 14 Mar 2016 16:32:27 +0000 (UTC)
commit 5ac848d2297d5afc20315cb6c461aeedf0fd6b8a
Author: Руслан Ижбулатов <lrn1986 gmail com>
Date: Mon Mar 14 16:14:22 2016 +0000
GDK W32: Fix shown window position calculation for dialogs and splashes
Two errors here:
1) A typo in splashscreen rectangle calculation - sets right twice
instead of setting top
2) Centering for dialogs is off because it doesn't convert
GDK virtual desktop coordinates to Windows WM virtual desktop
coordinates by adding _gdk_offset_*
https://bugzilla.gnome.org/show_bug.cgi?id=763628
gdk/win32/gdkwindow-win32.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gdk/win32/gdkwindow-win32.c b/gdk/win32/gdkwindow-win32.c
index 353602e..d112d32 100644
--- a/gdk/win32/gdkwindow-win32.c
+++ b/gdk/win32/gdkwindow-win32.c
@@ -1207,7 +1207,7 @@ show_window_internal (GdkWindow *window,
else
{
center_on_rect.left = 0;
- center_on_rect.right = 0;
+ center_on_rect.top = 0;
center_on_rect.right = GetSystemMetrics (SM_CXSCREEN);
center_on_rect.bottom = GetSystemMetrics (SM_CYSCREEN);
}
@@ -1218,8 +1218,8 @@ show_window_internal (GdkWindow *window,
{
GdkWindow *owner = window_impl->transient_owner;
/* Center on transient parent */
- center_on_rect.left = owner->x;
- center_on_rect.top = owner->y;
+ center_on_rect.left = owner->x - _gdk_offset_x;
+ center_on_rect.top = owner->y - _gdk_offset_y;
center_on_rect.right = center_on_rect.left + owner->width;
center_on_rect.bottom = center_on_rect.top + owner->height;
_gdk_win32_adjust_client_rect (GDK_WINDOW (owner), ¢er_on_rect);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]