mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-03 10:30:19 +01: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>
This commit is contained in:
parent
856a28f637
commit
e7f87f8f76
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