mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-08 17:18:53 +02:00
xwin: In multiwindow mode, look up the HWND for the parent window
Rather than only looking at the foreground window to see if it matches
the WM_TRANSIENT_FOR window XID, lookup that XID and fetch the HWND from
the window privates.
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
(cherry picked from commit e7f87f8f76)
This commit is contained in:
parent
41cbb7da4e
commit
6f099c7bd5
1 changed files with 7 additions and 3 deletions
|
|
@ -523,9 +523,13 @@ winCreateWindowsWindow(WindowPtr pWin)
|
|||
|
||||
if (winMultiWindowGetTransientFor(pWin, &daddyId)) {
|
||||
if (daddyId) {
|
||||
hFore = GetForegroundWindow();
|
||||
if (hFore && (daddyId != (Window) (INT_PTR) GetProp(hFore, WIN_WID_PROP)))
|
||||
hFore = NULL;
|
||||
WindowPtr pParent;
|
||||
int res = dixLookupWindow(&pParent, daddyId, serverClient, DixReadAccess);
|
||||
if (res == Success)
|
||||
{
|
||||
winPrivWinPtr pParentPriv = winGetWindowPriv(pParent);
|
||||
hFore = pParentPriv->hWnd;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue