Merge branch '2.0'

This commit is contained in:
Felix Geyer 2016-08-04 00:08:53 +02:00 committed by Jonathan White
commit c78822f6e6
12 changed files with 120 additions and 14 deletions

View file

@ -384,14 +384,22 @@ bool AutoTypePlatformX11::isTopLevelWindow(Window window)
int format;
unsigned long nitems;
unsigned long after;
unsigned char* data = nullptr;
int retVal = XGetWindowProperty(m_dpy, window, m_atomWmState, 0, 0, False, AnyPropertyType, &type, &format,
unsigned char* data = Q_NULLPTR;
int retVal = XGetWindowProperty(m_dpy, window, m_atomWmState, 0, 2, False, m_atomWmState, &type, &format,
&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);
}
return (retVal == 0) && type;
return result;
}
KeySym AutoTypePlatformX11::charToKeySym(const QChar& ch)