summaryrefslogtreecommitdiffstats
path: root/src/kernel/tqapplication_x11.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/tqapplication_x11.cpp')
-rw-r--r--src/kernel/tqapplication_x11.cpp101
1 files changed, 0 insertions, 101 deletions
diff --git a/src/kernel/tqapplication_x11.cpp b/src/kernel/tqapplication_x11.cpp
index eeb5e0e36..5b0bba96e 100644
--- a/src/kernel/tqapplication_x11.cpp
+++ b/src/kernel/tqapplication_x11.cpp
@@ -2272,12 +2272,10 @@ void tqt_init_internal( int *argcptr, char **argv,
XEventClass *ev_class;
int curr_event_count;
-#if !defined(Q_OS_IRIX)
// XFree86 divides a stylus and eraser into 2 devices, so we must do for both...
const TQString XFREENAMESTYLUS = "stylus";
const TQString XFREENAMEPEN = "pen";
const TQString XFREENAMEERASER = "eraser";
-#endif
devices = XListInputDevices( appDpy, &ndev);
if ( devices == NULL ) {
@@ -2287,11 +2285,6 @@ void tqt_init_internal( int *argcptr, char **argv,
dev = NULL;
for ( devs = devices, i = 0; i < ndev; i++, devs++ ) {
gotEraser = false;
-#if defined(Q_OS_IRIX)
-
- gotStylus = ( !strncmp(devs->name,
- WACOM_NAME, sizeof(WACOM_NAME) - 1) );
-#else
TQString devName = devs->name;
devName = devName.lower();
gotStylus = ( devName.startsWith(XFREENAMEPEN)
@@ -2299,7 +2292,6 @@ void tqt_init_internal( int *argcptr, char **argv,
if ( !gotStylus )
gotEraser = devName.startsWith( XFREENAMEERASER );
-#endif
if ( gotStylus || gotEraser ) {
// I only wanted to do this once, so wrap pointers around these
curr_event_count = 0;
@@ -2358,11 +2350,7 @@ void tqt_init_internal( int *argcptr, char **argv,
v = (XValuatorInfoPtr) any;
a = (XAxisInfoPtr) ((char *) v +
sizeof (XValuatorInfo));
-#if defined (Q_OS_IRIX)
- max_pressure = a[WAC_PRESSURE_I].max_value;
-#else
max_pressure = a[2].max_value;
-#endif
// got the max pressure no need to go further...
break;
}
@@ -2373,11 +2361,7 @@ void tqt_init_internal( int *argcptr, char **argv,
}
// at this point we are assuming there is only one
// wacom device...
-#if defined (Q_OS_IRIX)
- if ( devStylus != NULL ) {
-#else
if ( devStylus != NULL && devEraser != NULL ) {
-#endif
break;
}
}
@@ -4237,18 +4221,6 @@ bool TQETWidget::translateMouseEvent( const XEvent *event )
case 9: button = HistoryForwardButton; break;
}
if ( event->type == ButtonPress ) { // mouse button pressed
-#if defined(Q_OS_IRIX) && defined(QT_TABLET_SUPPORT)
- XEvent myEv;
- if ( XCheckTypedEvent( appDpy, xinput_button_press, &myEv ) ) {
- if ( translateXinputEvent( &myEv ) ) {
- //Spontaneous event sent. Check if we need to continue.
- if ( chokeMouse ) {
- chokeMouse = false;
- return false;
- }
- }
- }
-#endif
qt_button_down = childAt( pos ); //magic for masked widgets
if ( !qt_button_down || !qt_button_down->testWFlags(WMouseNoMask) )
qt_button_down = this;
@@ -4270,18 +4242,6 @@ bool TQETWidget::translateMouseEvent( const XEvent *event )
mouseGlobalXPos = globalPos.x();
mouseGlobalYPos = globalPos.y();
} else { // mouse button released
-#if defined(Q_OS_IRIX) && defined(QT_TABLET_SUPPORT)
- XEvent myEv;
- if ( XCheckTypedEvent( appDpy, xinput_button_release, &myEv ) ) {
- if ( translateXinputEvent( &myEv ) ) {
- //Spontaneous event sent. Check if we need to continue.
- if ( chokeMouse ) {
- chokeMouse = false;
- return false;
- }
- }
- }
-#endif
if ( manualGrab ) { // release manual grab
manualGrab = false;
XUngrabPointer( x11Display(), CurrentTime );
@@ -4456,15 +4416,6 @@ bool TQETWidget::translateWheelEvent( int global_x, int global_y, int delta, int
#if defined (QT_TABLET_SUPPORT)
bool TQETWidget::translateXinputEvent( const XEvent *ev )
{
-#if defined (Q_OS_IRIX)
- // Wacom has put defines in their wacom.h file so it would be quite wise
- // to use them, need to think of a decent way of not using
- // it when it doesn't exist...
- XDeviceState *s;
- XInputClass *iClass;
- XValuatorState *vs;
- int j;
-#endif
TQWidget *w = this;
TQPoint global,
curr;
@@ -4475,9 +4426,6 @@ bool TQETWidget::translateXinputEvent( const XEvent *ev )
TQPair<int, int> tId;
XEvent xinputMotionEvent;
XEvent mouseMotionEvent;
-#if defined (Q_OS_IRIX)
- XDevice *dev;
-#endif
const XDeviceMotionEvent *motion = 0;
XDeviceButtonEvent *button = 0;
TQEvent::Type t;
@@ -4527,10 +4475,6 @@ bool TQETWidget::translateXinputEvent( const XEvent *ev )
*/
curr = TQPoint( button->x, button->y );
}
-#if defined(Q_OS_IRIX)
- // default...
- dev = devStylus;
-#else
if ( ev->type == xinput_motion ) {
if ( motion->deviceid == devStylus->device_id ) {
deviceType = TQTabletEvent::Stylus;
@@ -4544,7 +4488,6 @@ bool TQETWidget::translateXinputEvent( const XEvent *ev )
deviceType = TQTabletEvent::Eraser;
}
}
-#endif
const int PRESSURE_LEVELS = 255;
// we got the maximum pressure at start time, since various tablets have
@@ -4557,49 +4500,6 @@ bool TQETWidget::translateXinputEvent( const XEvent *ev )
else
scaleFactor = PRESSURE_LEVELS / max_pressure;
}
-#if defined (Q_OS_IRIX)
- s = XQueryDeviceState( appDpy, dev );
- if ( s == NULL )
- return false;
- iClass = s->data;
- for ( j = 0; j < s->num_classes; j++ ) {
- if ( iClass->c_class == ValuatorClass ) {
- vs = (XValuatorState *)iClass;
- // figure out what device we have, based on bitmasking...
- if ( vs->valuators[WAC_TRANSDUCER_I]
- & WAC_TRANSDUCER_PROX_MSK ) {
- switch ( vs->valuators[WAC_TRANSDUCER_I]
- & WAC_TRANSDUCER_MSK ) {
- case WAC_PUCK_ID:
- deviceType = TQTabletEvent::Puck;
- break;
- case WAC_STYLUS_ID:
- deviceType = TQTabletEvent::Stylus;
- break;
- case WAC_ERASER_ID:
- deviceType = TQTabletEvent::Eraser;
- break;
- }
- // Get a Unique Id for the device, Wacom gives us this ability
- tId.first = vs->valuators[WAC_TRANSDUCER_I] & WAC_TRANSDUCER_ID_MSK;
- tId.second = vs->valuators[WAC_SERIAL_NUM_I];
- } else
- deviceType = TQTabletEvent::NoDevice;
- // apparently Wacom needs a cast for the +/- values to make sense
- xTilt = short(vs->valuators[WAC_XTILT_I]);
- yTilt = short(vs->valuators[WAC_YTILT_I]);
- if ( max_pressure > PRESSURE_LEVELS )
- pressure = vs->valuators[WAC_PRESSURE_I] / scaleFactor;
- else
- pressure = vs->valuators[WAC_PRESSURE_I] * scaleFactor;
- global = TQPoint( vs->valuators[WAC_XCOORD_I],
- vs->valuators[WAC_YCOORD_I] );
- break;
- }
- iClass = (XInputClass*)((char*)iClass + iClass->length);
- }
- XFreeDeviceState( s );
-#else
if ( motion ) {
xTilt = short(motion->axis_data[3]);
yTilt = short(motion->axis_data[4]);
@@ -4619,7 +4519,6 @@ bool TQETWidget::translateXinputEvent( const XEvent *ev )
}
// The only way to get these Ids is to scan the XFree86 log, which I'm not going to do.
tId.first = tId.second = -1;
-#endif
TQTabletEvent e( t, curr, global, deviceType, pressure, xTilt, yTilt, tId );
TQApplication::sendSpontaneousEvent( w, &e );