diff options
author | Rohan McGovern <rohan@mcgovern.id.au> | 2010-03-06 23:44:26 (GMT) |
---|---|---|
committer | Rohan McGovern <rohan@mcgovern.id.au> | 2010-03-06 23:44:26 (GMT) |
commit | ad341d612129287793620bc84d3077afd64f97a4 (patch) | |
tree | 3d62b038c34985046ad1f3ff56c1c4e85a194ed2 /src/gui/kernel/qapplication_x11.cpp | |
parent | b20ef0ade0aec89b969bd0ae7f754c680e390c67 (diff) | |
parent | 2458cb45665b0fe3144266122f876bd541de9c42 (diff) | |
download | Qt-ad341d612129287793620bc84d3077afd64f97a4.zip Qt-ad341d612129287793620bc84d3077afd64f97a4.tar.gz Qt-ad341d612129287793620bc84d3077afd64f97a4.tar.bz2 |
Merge remote branch 'origin/4.6' into qt-4.7-from-4.6
Conflicts:
configure.exe
examples/multimedia/audioinput/audioinput.cpp
src/corelib/io/qfsfileengine.cpp
src/gui/egl/qegl_wince.cpp
src/gui/egl/qeglproperties.cpp
src/gui/egl/qeglproperties_p.h
src/gui/embedded/directfb.pri
src/gui/kernel/qapplication_win.cpp
src/gui/painting/qdrawutil.cpp
src/opengl/qgl_p.h
src/sql/drivers/odbc/qsql_odbc.cpp
src/sql/drivers/odbc/qsql_odbc.h
tests/auto/auto.pro
tests/auto/qgl/tst_qgl.cpp
translations/assistant_adp_ru.ts
Diffstat (limited to 'src/gui/kernel/qapplication_x11.cpp')
-rw-r--r-- | src/gui/kernel/qapplication_x11.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp index 3c2c743..20a7ff2 100644 --- a/src/gui/kernel/qapplication_x11.cpp +++ b/src/gui/kernel/qapplication_x11.cpp @@ -96,6 +96,11 @@ extern "C" { } #endif +#ifndef QT_GUI_DOUBLE_CLICK_RADIUS +#define QT_GUI_DOUBLE_CLICK_RADIUS 5 +#endif + + //#define ALIEN_DEBUG #if !defined(QT_NO_GLIB) @@ -312,9 +317,14 @@ static const char * x11_atomnames = { "_XEMBED\0" "_XEMBED_INFO\0" + // Wacom old. (before version 0.10) "Wacom Stylus\0" "Wacom Cursor\0" "Wacom Eraser\0" + + // Tablet + "STYLUS\0" + "ERASER\0" }; Q_GUI_EXPORT QX11Data *qt_x11Data = 0; @@ -2340,12 +2350,12 @@ void qt_init(QApplicationPrivate *priv, int, gotStylus = true; } #else - if (devs->type == ATOM(XWacomStylus)) { + if (devs->type == ATOM(XWacomStylus) || devs->type == ATOM(XTabletStylus)) { deviceType = QTabletEvent::Stylus; if (wacomDeviceName()->isEmpty()) wacomDeviceName()->append(devs->name); gotStylus = true; - } else if (devs->type == ATOM(XWacomEraser)) { + } else if (devs->type == ATOM(XWacomEraser) || devs->type == ATOM(XTabletEraser)) { deviceType = QTabletEvent::XFreeEraser; gotEraser = true; } @@ -4194,8 +4204,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 { |