X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Fapplication.cpp;h=51b2efec85f4de0fd94b9f3e0ae9af013f4db5e8;hb=7cebe608dc4e6185209eef0be62f2b53e12d11be;hp=7f537a528da4c187aea3a43f6f91ba0da8e7eefe;hpb=21632e3ad14e8ffc18afd549ab01fd3341df1e30;p=situare diff --git a/src/application.cpp b/src/application.cpp index 7f537a5..51b2efe 100644 --- a/src/application.cpp +++ b/src/application.cpp @@ -86,22 +86,34 @@ bool Application::x11EventFilter(XEvent *event) 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; }