mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Don't consider windows with WithdrawnState as top level windows.
Fixes many bogus windows in auto-type window list when using gnome-shell.
This commit is contained in:
parent
18e4dca6c9
commit
8ace3ab7f2
@ -363,13 +363,21 @@ bool AutoTypePlatformX11::isTopLevelWindow(Window window)
|
|||||||
unsigned long nitems;
|
unsigned long nitems;
|
||||||
unsigned long after;
|
unsigned long after;
|
||||||
unsigned char* data = Q_NULLPTR;
|
unsigned char* data = Q_NULLPTR;
|
||||||
int retVal = XGetWindowProperty(m_dpy, window, m_atomWmState, 0, 0, False, AnyPropertyType, &type, &format,
|
int retVal = XGetWindowProperty(m_dpy, window, m_atomWmState, 0, 2, False, m_atomWmState, &type, &format,
|
||||||
&nitems, &after, &data);
|
&nitems, &after, &data);
|
||||||
if (data) {
|
|
||||||
|
bool result = false;
|
||||||
|
|
||||||
|
if (retVal == 0 && data) {
|
||||||
|
if (type == m_atomWmState && format == 32 && nitems > 0) {
|
||||||
|
qint32 state = static_cast<qint32>(*data);
|
||||||
|
result = (state != WithdrawnState);
|
||||||
|
}
|
||||||
|
|
||||||
XFree(data);
|
XFree(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (retVal == 0) && type;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
KeySym AutoTypePlatformX11::charToKeySym(const QChar& ch)
|
KeySym AutoTypePlatformX11::charToKeySym(const QChar& ch)
|
||||||
|
Loading…
Reference in New Issue
Block a user