Peter Hutterer
5c3e728980
dix: count must be 1 if we have an XI2 match.
...
This fixes events that activated a grab not getting delivered to the client.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-16 12:20:59 +10:00
Peter Hutterer
bae070914f
input: update to inputproto 1.9.99.8 XI2 defines.
...
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-08 14:33:44 +10:00
Peter Hutterer
d220d6907d
Xi: add GrabButton and GrabKeysym code.
...
We don't do keycode grabs in XI2, they're pointless.
2009-05-06 14:37:33 +10:00
Peter Hutterer
59358de4b6
input: ensure various ProcUngrabKey/Buttons have the right grabtype set.
2009-05-04 17:40:29 +10:00
Peter Hutterer
834ea071b6
dix: if grab types differ, two grabs cannot be the same.
2009-05-04 17:40:25 +10:00
Peter Hutterer
08cd846000
dix: only free the old cursor if the grab was successful.
...
Testcase: start thunderbird and move a message around, crashes after two or
three moves.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-04 15:21:38 +10:00
Peter Hutterer
6a618929a0
input: reshuffle CreateGrab and friends to take a GrabParameters param.
...
This is cleaning up work in preparation for XI2 passive grabs.
2009-05-01 09:07:37 +10:00
Peter Hutterer
c2c515ead3
dix: remove all but main() from main.c
...
All other functions are pushed into where they seemed to fit.
main.c is now linked separately into libmain.a and linked in by the various
DDXs.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-28 16:03:56 +10:00
Peter Hutterer
54716fd3db
Convert to using int32_t fixed point values on the wire.
...
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-19 22:28:12 +10:00
Peter Hutterer
edb70caf21
dix: remove un-used parameter "core" from AllowSome
...
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-19 22:28:11 +10:00
Peter Hutterer
c94ea5bc05
input: use a GrabMask union in GrabDevice to allow for XI2 masks.
...
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-19 22:28:11 +10:00
Peter Hutterer
09f9a86077
input: replace GrabRec's coreGrab field with grabtype.
...
Don't allow grabs of different types to override each other.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-19 22:28:08 +10:00
Peter Hutterer
6c3b633299
Merge branch 'master' into xi2
2009-04-07 19:36:27 +10:00
Peter Hutterer
844bb629fe
dix: remove a truly useless a = (foo) ? bar : bar; statement.
...
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-23 16:06:53 +10:00
Peter Hutterer
111ef10375
dix: move ProcGrabPointer guts into GrabDevice.
...
Yes, this means we have even more arguments to GrabDevice. But it beats having
a copy of most but not all of GrabDevice in ProcGrabPointer.
Also, reshuffle the order of parameters, the CARD* status is a return value
and should be last.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-20 15:17:57 +10:00
Peter Hutterer
15a969c0fc
dix: remove now obsolete mskidx parameter from DeliverEventsToWindow.
...
mskidx would always be dev->id anyway, so if we're already passing in the
device, mskidx is superfluous.
2009-03-20 15:17:57 +10:00
Peter Hutterer
d9b7343eac
dix: even if we don't get a XI1 event, continue processing.
2009-03-20 15:17:56 +10:00
Peter Hutterer
a4b61cfc78
dix: un-static FixUpEventFromWindow and deal with focus events too.
2009-03-20 15:17:56 +10:00
Peter Hutterer
4cc6a96d71
input: add support for RawDeviceEvents.
2009-03-20 15:17:56 +10:00
Peter Hutterer
a668d91e28
dix: store the xi2mask on grabs and pass it around as needed.
...
This enables passive and implicit passive grabs for XI2 events, except that we
don't have the protocol spec yet to request them.
2009-03-20 15:17:56 +10:00
Peter Hutterer
97e89a5957
Allow XI2 event selection for AllDevices and AllMasterDevices.
2009-03-20 15:17:55 +10:00
Peter Hutterer
808a158182
dix: Enable XI2 delivery for events and focused events.
...
No support for grabbed events yet.
2009-03-20 15:17:55 +10:00
Peter Hutterer
87ff1159b4
dix: deliver device enter/leave events.
2009-03-20 15:17:55 +10:00
Peter Hutterer
3f37923a72
Xi: send XI2 focus events.
2009-03-20 15:17:55 +10:00
Peter Hutterer
daf7dd3bfe
dix: Add GetWindowXI2Mask helper
2009-03-20 15:17:55 +10:00
Peter Hutterer
181e41511d
dix: fix up device enter/leave for XI_Enter/XI_Leave.
2009-03-20 15:17:55 +10:00
Peter Hutterer
77d51b94bd
dix: FixUpEventForWindow needs to handle XI2 events.
2009-03-20 15:17:54 +10:00
Peter Hutterer
95ed2ab715
Add XI2_EVENT check.
2009-03-20 15:17:54 +10:00
Peter Hutterer
43e48900fc
dix: Force deviced ids of 2 and higher for actual devices.
...
0 is now reserved for the "AllDevices" virtual device.
1 is now reserved for the "AllMasterDevices" virtual device.
This also means that wherever we passed in (mskidx = 0), we now need to pass
in the deviceid.
2009-03-20 15:17:54 +10:00
Peter Hutterer
70896f6127
dix: abstract event filters through GetEventFilters.
...
Don't let everyone acces the filters[] array directly. This is necessary once
we start dealing with GenericEvents, where the filters are a bit more
complicated.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-20 15:17:54 +10:00
Peter Hutterer
8a8763f150
dix: restructure DeliverEventsToWindow, a little bit anyway.
...
Desperate attempt of making the code easy to read and understand. A failed
desparate attempt, possibly.
2009-03-20 15:17:54 +10:00
Peter Hutterer
891cfc8020
dix: clean up DeliverDeviceEvents.
...
Move mask checking into external function and streamline the code.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-20 15:17:54 +10:00
Peter Hutterer
445daa62e7
Xext: purge XGE event masks.
...
The masks were originally designed to generically handle event masks for
extensions. Since all that is in-server anyway, it's much better writing
custom event masks for those extensions that need it and not providing a
unified mechanism.
XI2 needs more than the current implementation, which is already too complex
for most other extensions. good riddance.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-20 15:17:53 +10:00
Peter Hutterer
6fe4c28bf4
Add agressive event type checking.
...
Best to FatalError if a wrong event comes in. At least that forces me to fix
it really quickly.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-20 15:17:53 +10:00
Peter Hutterer
7d4df0ee44
dix: fix device sync state when calling SyncBoth during AllowEvents.
...
This did access the wrong device's sync state, potentially freezing or not
thawing the actual device that was supposed to be thawed.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-20 14:48:57 +10:00
Peter Hutterer
e8094d8f3f
dix: ProcSendEvent shouldn't use inputInfo.keyboard directly.
...
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-20 14:48:57 +10:00
Peter Hutterer
31301861c1
dix: remove wrong InputInfo.pointer usage - should be pDev instead.
2009-03-16 13:29:07 +10:00
Peter Hutterer
639658b2ea
dix: use GetPairedDevice in ProcQueryPointer rather than inputInfo.keyboard.
2009-03-16 13:29:06 +10:00
Peter Hutterer
f01ee198ff
dix: don't use inputInfo.keyboard to get the focus window in ActivateKbdGrab
...
I'm not sure if that's the right solution, but the other one is wronger.
2009-03-16 13:29:06 +10:00
Peter Hutterer
de415743f4
dix: fix XACE checks in ProcWarpPointer
2009-03-16 13:29:06 +10:00
Peter Hutterer
18430616cf
dix: use PickPointer() and PickKeyboard instead of inputInfo.pointer/keyboard.
...
Affected calls:
ProcChangeKeyboardControl
ProcBell
ProcUngrabKey
ProcUngrabButton
2009-03-16 13:29:06 +10:00
Peter Hutterer
b368dd1720
dix: remove a few pointless (void) casts of return values.
...
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-12 11:03:29 +10:00
Keith Packard
f8dd80d13b
Replace dixLookupResource by dixLookupResourceBy{Type,Class}
...
dixLookupResource attempted to automatically detect whether the caller
wanted a lookup by-type or by-class, unfortunately, it guessed wrong for
RT_NONE. Instead of trying to make the guess better, this patch just reverts
the unification and creates separate functions for each operation.
2009-03-09 13:08:09 -07:00
Jason Vas Dias
e0ed9f16d0
Fix build with --enable-debug.
...
[amended by Peter Hutterer]
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-03 16:53:06 +10:00
Peter Hutterer
763848d3ab
Input: change processing API to InternalEvents.
...
Don't pass xEvent* and count through to processing, pass a single
InternalEvent.
Custom handlers are disabled for the time being. And for extra fun,
XKB's pointer motion emulation is disabled. But stick an error in there so
that we get reminded should we forget about it.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-23 17:52:40 +10:00
Peter Hutterer
155986a93d
dix: CheckPassiveGrabsOnWindow moved to internal events.
...
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-23 17:52:40 +10:00
Peter Hutterer
1c38abd4b1
dix: switch DeliverGrabbedEvent to internal events.
...
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-23 17:52:40 +10:00
Peter Hutterer
fb858774b8
dix: switch DeliverDeviceEvents to internal events.
...
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-23 17:52:40 +10:00
Peter Hutterer
3aa9404fcd
dix: switch DeliverFocusedEvent to internal events.
...
And because of xfree() macro hilarity, rename "pointer" to "ptr". Oh, how we
laughed.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-23 17:52:40 +10:00
Peter Hutterer
8c873e7f51
dix: Switch DeliverGrabbedEvents to use internal events.
...
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-23 17:52:39 +10:00