X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=pirapplication.cpp;fp=pirapplication.cpp;h=44af66b54f9041c0d22ded16cf7cef4a7cae7bc8;hb=28ea9e5632ffe5f6406d9e35cd9301b7d0a5adf6;hp=b5711d89d954873164511a8c96f357ab2c8756a8;hpb=946845241309761b49151cc3c7a597dc4b969961;p=pierogi diff --git a/pirapplication.cpp b/pirapplication.cpp index b5711d8..44af66b 100644 --- a/pirapplication.cpp +++ b/pirapplication.cpp @@ -4,11 +4,14 @@ #include #include #include +#include + PIRApplication::PIRApplication( int &argc, char **argv) - : QApplication(argc, argv) + : QApplication(argc, argv), + changingKeyset(false) { } @@ -46,17 +49,33 @@ bool PIRApplication::x11EventFilter( event->xkey.keycode == 73 || event->xkey.keycode == QKeySequence::ZoomOut) { - emit decreaseRockerPressed(); + if (!changingKeyset) + { + changingKeyset = true; + QTimer::singleShot(500, this, SLOT(finishChangingKeyset())); + emit decreaseRockerPressed(); + } return true; } else if ( event->xkey.keycode == 74 || event->xkey.keycode == QKeySequence::ZoomIn) { - emit increaseRockerPressed(); + if (!changingKeyset) + { + changingKeyset = true; + QTimer::singleShot(500, this, SLOT(finishChangingKeyset())); + emit increaseRockerPressed(); + } return true; } } return false; } + + +void PIRApplication::finishChangingKeyset() +{ + changingKeyset = false; +}