summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Kümmerlin <jonas@kuemmerlin.eu>2020-06-24 11:14:27 +0200
committerJonas Kümmerlin <jonas@kuemmerlin.eu>2020-06-24 11:14:27 +0200
commit02c1f4e9165084589941ce205defaf5f3f1ea90f (patch)
treeb70b352ef3b3513391a3fa79868dd9cb19bef601
parent0817e451578b2920ec30a2ebb88fe908cf60c0e0 (diff)
toplevel: fix finding ancestor when passing a child as owner
-rw-r--r--alf/alftoplevel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/alf/alftoplevel.cpp b/alf/alftoplevel.cpp
index 0747ea2..23d2da3 100644
--- a/alf/alftoplevel.cpp
+++ b/alf/alftoplevel.cpp
@@ -473,7 +473,7 @@ ALF_CreateToplevelWindow(DWORD exstyle, DWORD style, HWND hwndOwner, ALFApplicat
if (hwndOwner == GetDesktopWindow())
hwndOwner = NULL;
- if (hwndOwner && GetWindowLong(hwndOwner, GWL_STYLE) & WS_CHILD)
+ while (hwndOwner && GetWindowLong(hwndOwner, GWL_STYLE) & WS_CHILD)
hwndOwner = GetParent(hwndOwner);
// copy app of owner, but only if we're in the same thread