fix strict aliasing issue

svn path=/trunk/KDE/kdebase/workspace/; revision=553714
This commit is contained in:
Dirk Mueller 2006-06-21 20:23:12 +00:00
parent fd6ba30cb3
commit 8c2cd937d8

View file

@ -1783,35 +1783,35 @@ unsigned int Workspace::sendFakedMouseEvent( QPoint pos, WId w, MouseEmulation t
XTranslateCoordinates( QX11Info::display(), QX11Info::appRootWindow(), w, pos.x(), pos.y(), &x, &y, &xw ); XTranslateCoordinates( QX11Info::display(), QX11Info::appRootWindow(), w, pos.x(), pos.y(), &x, &y, &xw );
if ( type == EmuMove ) if ( type == EmuMove )
{ // motion notify events { // motion notify events
XMotionEvent e; XEvent e;
e.type = MotionNotify; e.type = MotionNotify;
e.window = w; e.xmotion.window = w;
e.root = QX11Info::appRootWindow(); e.xmotion.root = QX11Info::appRootWindow();
e.subwindow = w; e.xmotion.subwindow = w;
e.time = QX11Info::appTime(); e.xmotion.time = QX11Info::appTime();
e.x = x; e.xmotion.x = x;
e.y = y; e.xmotion.y = y;
e.x_root = pos.x(); e.xmotion.x_root = pos.x();
e.y_root = pos.y(); e.xmotion.y_root = pos.y();
e.state = state; e.xmotion.state = state;
e.is_hint = NotifyNormal; e.xmotion.is_hint = NotifyNormal;
XSendEvent( QX11Info::display(), w, true, ButtonMotionMask, (XEvent*)&e ); XSendEvent( QX11Info::display(), w, true, ButtonMotionMask, &e );
} }
else else
{ {
XButtonEvent e; XEvent e;
e.type = type == EmuRelease ? ButtonRelease : ButtonPress; e.type = type == EmuRelease ? ButtonRelease : ButtonPress;
e.window = w; e.xbutton.window = w;
e.root = QX11Info::appRootWindow(); e.xbutton.root = QX11Info::appRootWindow();
e.subwindow = w; e.xbutton.subwindow = w;
e.time = QX11Info::appTime(); e.xbutton.time = QX11Info::appTime();
e.x = x; e.xbutton.x = x;
e.y = y; e.xbutton.y = y;
e.x_root = pos.x(); e.xbutton.x_root = pos.x();
e.y_root = pos.y(); e.xbutton.y_root = pos.y();
e.state = state; e.xbutton.state = state;
e.button = button; e.xbutton.button = button;
XSendEvent( QX11Info::display(), w, true, ButtonPressMask, (XEvent*)&e ); XSendEvent( QX11Info::display(), w, true, ButtonPressMask, &e );
if ( type == EmuPress ) if ( type == EmuPress )
{ {