diff options
author | Raino Priha <raino.priha@nomovok.com> | 2010-03-02 13:38:29 (GMT) |
---|---|---|
committer | Adrian Constantin <adrian.constantin@nokia.com> | 2010-03-02 17:22:02 (GMT) |
commit | e3ae141989743b62dd4acc565801ff0898897065 (patch) | |
tree | 3386b224df33e721721be3c45155e8d560617ef0 /src | |
parent | 0a357d05f43a8133d8e5d3daa8204a0c55f39ff9 (diff) | |
download | Qt-e3ae141989743b62dd4acc565801ff0898897065.zip Qt-e3ae141989743b62dd4acc565801ff0898897065.tar.gz Qt-e3ae141989743b62dd4acc565801ff0898897065.tar.bz2 |
Allow platform specific values for the double click radius.
Task-number: QT-2883
Reviewed-by: Volker Hilsheimer
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/kernel/qapplication.cpp | 4 | ||||
-rw-r--r-- | src/gui/kernel/qapplication_x11.cpp | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp index 4fe3900..6dda961 100644 --- a/src/gui/kernel/qapplication.cpp +++ b/src/gui/kernel/qapplication.cpp @@ -117,6 +117,10 @@ extern bool qt_wince_is_pocket_pc(); //qguifunctions_wince.cpp #include <private/qt_cocoa_helpers_mac_p.h> #endif +#ifndef QT_GUI_DOUBLE_CLICK_RADIUS +#define QT_GUI_DOUBLE_CLICK_RADIUS 5 +#endif + //#define ALIEN_DEBUG static void initResources() diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp index afd927b..15761f4 100644 --- a/src/gui/kernel/qapplication_x11.cpp +++ b/src/gui/kernel/qapplication_x11.cpp @@ -4215,8 +4215,8 @@ bool QETWidget::translateMouseEvent(const XEvent *event) mouseButtonPressed == button && (long)event->xbutton.time -(long)mouseButtonPressTime < QApplication::doubleClickInterval() && - qAbs(event->xbutton.x - mouseXPos) < 5 && - qAbs(event->xbutton.y - mouseYPos) < 5) { + qAbs(event->xbutton.x - mouseXPos) < QT_GUI_DOUBLE_CLICK_RADIUS && + qAbs(event->xbutton.y - mouseYPos) < QT_GUI_DOUBLE_CLICK_RADIUS) { type = QEvent::MouseButtonDblClick; mouseButtonPressTime -= 2000; // no double-click next time } else { |