summaryrefslogtreecommitdiffstats
path: root/tqtinterface/qt4/src/kernel/tqapplication_x11.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tqtinterface/qt4/src/kernel/tqapplication_x11.cpp')
-rw-r--r--tqtinterface/qt4/src/kernel/tqapplication_x11.cpp24
1 files changed, 22 insertions, 2 deletions
diff --git a/tqtinterface/qt4/src/kernel/tqapplication_x11.cpp b/tqtinterface/qt4/src/kernel/tqapplication_x11.cpp
index e7cf92f..aaa9faf 100644
--- a/tqtinterface/qt4/src/kernel/tqapplication_x11.cpp
+++ b/tqtinterface/qt4/src/kernel/tqapplication_x11.cpp
@@ -1791,8 +1791,8 @@ void qt_init_internal( int *argcptr, char **argv,
#ifndef TQT_NO_XSYNC
// Try to initialize SYNC extension on the connected display
int xsync_major, xsync_minor;
- if ( XSyncQueryExtension( appDpy, &xsync_eventbase, &xsync_errorbase ) &&
- XSyncInitialize( appDpy, &xsync_major, &xsync_minor ) ) {
+ if ( XSyncQueryExtension( QX11Info::display(), &xsync_eventbase, &xsync_errorbase ) &&
+ XSyncInitialize( QX11Info::display(), &xsync_major, &xsync_minor ) ) {
qt_use_xsync = TRUE;
}
#endif
@@ -2758,6 +2758,26 @@ void qt_leave_modal( TQWidget *widget )
}
}
+int qt_x11_translateButtonState( int s )
+{
+ int bst = 0;
+ if ( s & Button1Mask )
+ bst |= Qt::LeftButton;
+ if ( s & Button2Mask )
+ bst |= Qt::MidButton;
+ if ( s & Button3Mask )
+ bst |= Qt::RightButton;
+ if ( s & ShiftMask )
+ bst |= TQt::ShiftButton;
+ if ( s & ControlMask )
+ bst |= TQt::ControlButton;
+ if ( s & qt_alt_mask )
+ bst |= TQt::AltButton;
+ if ( s & qt_meta_mask )
+ bst |= TQt::MetaButton;
+ return bst;
+}
+
#else // USE_QT4
/*****************************************************************************