mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-28 08:49:42 -05:00
Fix reading window title from _NET_WM_NAME.
XGetWindowProperty() returns 0 on success. Closes #236
This commit is contained in:
parent
f1aa6aca26
commit
870d7355ca
@ -212,7 +212,7 @@ QString AutoTypePlatformX11::windowTitle(Window window, bool useBlacklist)
|
|||||||
int retVal = XGetWindowProperty(m_dpy, window, m_atomNetWmName, 0, 1000, false, m_atomUtf8String,
|
int retVal = XGetWindowProperty(m_dpy, window, m_atomNetWmName, 0, 1000, false, m_atomUtf8String,
|
||||||
&type, &format, &nitems, &after, &data);
|
&type, &format, &nitems, &after, &data);
|
||||||
|
|
||||||
if (retVal != 0 && data) {
|
if (retVal == 0 && data) {
|
||||||
title = QString::fromUtf8(reinterpret_cast<char*>(data));
|
title = QString::fromUtf8(reinterpret_cast<char*>(data));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
Reference in New Issue
Block a user