Browse Source

Fix puglWin32ShowCentered for transient windows

Signed-off-by: falkTX <falktx@falktx.com>
pull/409/head
falkTX 2 years ago
parent
commit
45d2cab48a
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      dgl/src/pugl.cpp

+ 3
- 3
dgl/src/pugl.cpp View File

@@ -540,9 +540,9 @@ void puglWin32ShowCentered(PuglView* const view)
GetWindowRect(impl->hwnd, &rectChild) &&
GetWindowRect((HWND)view->transientParent, &rectParent))
{
SetWindowPos(impl->hwnd, (HWND)view->transientParent,
rectParent.left + (rectChild.right-rectChild.left)/2,
rectParent.top + (rectChild.bottom-rectChild.top)/2,
SetWindowPos(impl->hwnd, HWND_TOP,
rectParent.left + (rectParent.right-rectParent.left)/2 - (rectChild.right-rectChild.left)/2,
rectParent.top + (rectParent.bottom-rectParent.top)/2 - (rectChild.bottom-rectChild.top)/2,
0, 0, SWP_SHOWWINDOW|SWP_NOSIZE);
}
else


Loading…
Cancel
Save