qDebug() << __PRETTY_FUNCTION__;
static Qt::HANDLE rootWindow = QX11Info::appRootWindow();
- static Atom activeAppAtom = XInternAtom(QX11Info::display(),
- ACTIVE_APP_ATOM, false);
-
- if (event->type == PropertyNotify) {
- XPropertyEvent *pevent = (XPropertyEvent*)event;
- if (pevent->window == rootWindow) {
- if (pevent->atom == activeAppAtom) {
- WId activeWindow = activeDesktopWindow(pevent->display,
- rootWindow);
-
- if(m_topmost != m_windows.contains(activeWindow)) {
- m_topmost = !m_topmost;
- emit topmostChanged(!m_topmost);
+ static Atom activeAppAtom = XInternAtom(QX11Info::display(), ACTIVE_APP_ATOM, false);
+
+ switch (event->type) {
+ case PropertyNotify: {
+ XPropertyEvent *pevent = (XPropertyEvent*)event;
+ if (pevent->window == rootWindow) {
+ if (pevent->atom == activeAppAtom) {
+ WId activeWindow = activeDesktopWindow(pevent->display, rootWindow);
+
+ if(m_topmost != m_windows.contains(activeWindow)) {
+ m_topmost = !m_topmost;
+ emit topmostWindowChanged(m_topmost);
+ }
}
}
}
+ break;
+ case KeyPress:
+ case KeyRelease:
+ case ButtonPress:
+ case ButtonRelease:
+ case MotionNotify:
+ case EnterNotify: // required when returning from statusbar menu
+ case FocusIn: // required when returning from update location dialog
+ emit showFullScreenButton();
+ break;
}
+
+ // don't block any events here, so false is returned
return false;
}