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
This commit is contained in:
parent
bbced9a0cf
commit
5ac848d229
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user