Author: lasgouttes
Date: Thu Jun  3 09:26:19 2010
New Revision: 34588
URL: http://www.lyx.org/trac/changeset/34588

Log:
fix compilation on F13 and binutils/gold by rewriting specialized X11 code

Modified:
   lyx-devel/trunk/src/frontends/qt4/GuiWorkArea.cpp

Modified: lyx-devel/trunk/src/frontends/qt4/GuiWorkArea.cpp
==============================================================================
--- lyx-devel/trunk/src/frontends/qt4/GuiWorkArea.cpp   Wed Jun  2 04:10:10 
2010        (r34587)
+++ lyx-devel/trunk/src/frontends/qt4/GuiWorkArea.cpp   Thu Jun  3 09:26:19 
2010        (r34588)
@@ -72,11 +72,6 @@
 
 #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 @@
 
        // 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;
        }

Reply via email to