]> git.lyx.org Git - lyx.git/commitdiff
fix compilation on F13 and binutils/gold by rewriting specialized X11 code
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 3 Jun 2010 07:26:19 +0000 (07:26 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 3 Jun 2010 07:26:19 +0000 (07:26 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34588 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiWorkArea.cpp

index 8a9346b6a8f3c48907f791aad4d6e1cd4b161771..9d9d82abf845f721950915e4b7f809b3d60832a0 100644 (file)
 
 #include <cmath>
 
-#ifdef Q_WS_X11
-#include <QX11Info>
-extern "C" int XEventsQueued(Display *display, int mode);
-#endif
-
 #ifdef Q_WS_WIN
 int const CursorWidth = 2;
 #else
@@ -911,11 +906,10 @@ void GuiWorkArea::keyPressEvent(QKeyEvent * ev)
 
        // do nothing if there are other events
        // (the auto repeated events come too fast)
-       // \todo FIXME: remove hard coded Qt keys, process the key binding
+       // it looks like this is only needed on X11
 #ifdef Q_WS_X11
-       if (XEventsQueued(QX11Info::display(), 0) > 1 && ev->isAutoRepeat()
-                       && (Qt::Key_PageDown || Qt::Key_PageUp)) {
-               LYXERR(Debug::KEY, "system is busy: scroll key event ignored");
+       if (qApp->hasPendingEvents() && ev->isAutoRepeat()) {
+               LYXERR(Debug::KEY, "system is busy: keyPress event ignored");
                ev->ignore();
                return;
        }