mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-17 05:50:20 +01:00
Update for input interface changes.
This commit is contained in:
parent
be9fa81182
commit
a2f96d3135
2 changed files with 14 additions and 16 deletions
|
|
@ -50,7 +50,7 @@
|
|||
|
||||
#ifdef XKB
|
||||
#include <X11/extensions/XKB.h>
|
||||
#include <xkbsrv.h>
|
||||
#include <X11/extensions/XKBsrv.h>
|
||||
#include <X11/extensions/XKBconfig.h>
|
||||
|
||||
extern Bool
|
||||
|
|
@ -975,6 +975,8 @@ xglxBlockHandler (pointer blockData,
|
|||
XFlush (xdisplay);
|
||||
}
|
||||
|
||||
static DeviceIntPtr pKeyboard, pPointer;
|
||||
|
||||
static void
|
||||
xglxWakeupHandler (pointer blockData,
|
||||
int result,
|
||||
|
|
@ -991,25 +993,25 @@ xglxWakeupHandler (pointer blockData,
|
|||
x.u.u.type = KeyPress;
|
||||
x.u.u.detail = X.xkey.keycode;
|
||||
x.u.keyButtonPointer.time = lastEventTime = GetTimeInMillis ();
|
||||
mieqEnqueue (&x);
|
||||
mieqEnqueue (pKeyboard, &x);
|
||||
break;
|
||||
case KeyRelease:
|
||||
x.u.u.type = KeyRelease;
|
||||
x.u.u.detail = X.xkey.keycode;
|
||||
x.u.keyButtonPointer.time = lastEventTime = GetTimeInMillis ();
|
||||
mieqEnqueue (&x);
|
||||
mieqEnqueue (pKeyboard, &x);
|
||||
break;
|
||||
case ButtonPress:
|
||||
x.u.u.type = ButtonPress;
|
||||
x.u.u.detail = X.xbutton.button;
|
||||
x.u.keyButtonPointer.time = lastEventTime = GetTimeInMillis ();
|
||||
mieqEnqueue (&x);
|
||||
mieqEnqueue (pPointer, &x);
|
||||
break;
|
||||
case ButtonRelease:
|
||||
x.u.u.type = ButtonRelease;
|
||||
x.u.u.detail = X.xbutton.button;
|
||||
x.u.keyButtonPointer.time = lastEventTime = GetTimeInMillis ();
|
||||
mieqEnqueue (&x);
|
||||
mieqEnqueue (pPointer, &x);
|
||||
break;
|
||||
case MotionNotify:
|
||||
x.u.u.type = MotionNotify;
|
||||
|
|
@ -1018,7 +1020,7 @@ xglxWakeupHandler (pointer blockData,
|
|||
x.u.keyButtonPointer.rootY = X.xmotion.y;
|
||||
x.u.keyButtonPointer.time = lastEventTime = GetTimeInMillis ();
|
||||
miPointerAbsoluteCursor (X.xmotion.x, X.xmotion.y, lastEventTime);
|
||||
mieqEnqueue (&x);
|
||||
mieqEnqueue (pPointer, &x);
|
||||
break;
|
||||
case EnterNotify:
|
||||
if (X.xcrossing.detail != NotifyInferior) {
|
||||
|
|
@ -1030,7 +1032,7 @@ xglxWakeupHandler (pointer blockData,
|
|||
x.u.keyButtonPointer.rootY = X.xcrossing.y;
|
||||
x.u.keyButtonPointer.time = lastEventTime =
|
||||
GetTimeInMillis ();
|
||||
mieqEnqueue (&x);
|
||||
mieqEnqueue (pPointer, &x);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
@ -1046,7 +1048,7 @@ xglxBell (int volume,
|
|||
pointer ctrl,
|
||||
int cls)
|
||||
{
|
||||
XBell (xdisplay, volume);
|
||||
XBell (xdisplay, volume);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -1259,16 +1261,13 @@ void
|
|||
xglxInitInput (int argc,
|
||||
char **argv)
|
||||
{
|
||||
DeviceIntPtr pKeyboard, pPointer;
|
||||
|
||||
pPointer = AddInputDevice (xglMouseProc, TRUE);
|
||||
pKeyboard = AddInputDevice (xglxKeybdProc, TRUE);
|
||||
|
||||
RegisterPointerDevice (pPointer);
|
||||
RegisterKeyboardDevice (pKeyboard);
|
||||
|
||||
miRegisterPointerDevice (screenInfo.screens[0], pPointer);
|
||||
mieqInit (&pKeyboard->public, &pPointer->public);
|
||||
mieqInit ();
|
||||
|
||||
AddEnabledDevice (XConnectionNumber (xdisplay));
|
||||
|
||||
|
|
|
|||
|
|
@ -51,9 +51,9 @@ xglMouseProc (DeviceIntPtr pDevice,
|
|||
InitPointerDeviceStruct (pDev,
|
||||
map,
|
||||
NUM_BUTTONS,
|
||||
miPointerGetMotionEvents,
|
||||
GetMotionHistory,
|
||||
(PtrCtrlProcPtr) NoopDDA,
|
||||
miPointerGetMotionBufferSize ());
|
||||
GetMotionHistorySize (), 2);
|
||||
break;
|
||||
case DEVICE_ON:
|
||||
pDev->on = TRUE;
|
||||
|
|
@ -258,6 +258,5 @@ xglInitInput (int argc, char **argv)
|
|||
RegisterPointerDevice (pPointer);
|
||||
RegisterKeyboardDevice (pKeyboard);
|
||||
|
||||
miRegisterPointerDevice (screenInfo.screens[0], pPointer);
|
||||
mieqInit (&pKeyboard->public, &pPointer->public);
|
||||
mieqInit ();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue