Commit Graph

154 Commits

Author SHA1 Message Date
Peter Hutterer
1635832c16 Revert "xkb: disable xkb key repeats (temporarily)"
This reverts commit 2b1d946392.
2007-11-15 11:35:07 +10:30
Peter Hutterer
51239f87ce dix: Send MappingNotify when keyboard maps change.
If a slave device is attached to a master device, then we need to send a
mapping notify to the client.
Mapping notify needs to be sent if
 - different slave device but on same master
 - different master

This gives you funny behaviour with the ClientPointer. When a
MappingNotify is sent to the client, the client usually responds with a
GetKeyboardMapping. This will retrieve the ClientPointer's keyboard mapping,
regardless of which keyboard sent the last mapping notify request. So
depending on the CP setting, your keyboard may change layout in each app...
2007-11-13 11:26:16 +10:30
Peter Hutterer
2b1d946392 xkb: disable xkb key repeats (temporarily)
Haven't quite figured out yet how to make these repeats work. Because we share
the class between devices, the key state is already set when we process the
master device's event, causing a repeat on each event.
2007-11-13 09:51:33 +10:30
Peter Hutterer
184a7b8917 Merge branch 'mpx' into mdsd
Conflicts:

	Xi/opendev.c
2007-11-08 09:34:35 +10:30
Peter Hutterer
0b729051c0 Merge branch 'master' into mpx
Conflicts:

	Xi/extinit.c
	Xi/grabdev.c
	Xi/setmode.c
	Xi/ungrdev.c
	dix/devices.c
	dix/events.c
	dix/getevents.c
	include/dix.h
	mi/midispcur.c
	mi/misprite.c
	xkb/xkbActions.c
	xkb/xkbEvents.c
	xkb/xkbPrKeyEv.c
2007-11-07 15:37:23 +10:30
Daniel Stone
59774af86b XKB: Remove usage of alloca
alloca has no way to return failure, and instead can possibly arbitrarily
overflow the stack.  Let's avoid that one.
2007-11-05 14:34:41 +00:00
Daniel Stone
e717cf08e9 XKB: Cope with all events in XkbProcessKeyboardEvent
Cope with Xi and pointer events in the (now increasingly misnamed)
XkbProcessKeyboardEvent.  If it's the wrong type, call through the wrapping
chain to get out; else, process it.
2007-10-28 17:31:05 +02:00
Daniel Stone
9db8846fa5 XKB: Don't update indicators on all devices, add missing include file
Don't get XkbUpdateIndicators to update the indicators on all our devices: we
already deal with that ourselves.
Add exevents.h include to get more (proto)types.
2007-10-28 17:30:47 +02:00
Peter Hutterer
ee3aa948eb xkb: Unwrap properly in ProcessPointerEvent.
Instead of hardcoding CoreProcessPointerEvent, actually try to unwrap properly
and then call the unwrapped processInputProc. Seems to be a better idea,
especially since it makes stuff actually work...
(cherry picked from commit 8f9bf927e1)
2007-10-28 17:19:10 +02:00
Peter Hutterer
d3588a0aee xkb: xkbHandleActions: let wrapping take care of event delivery.
This is hopefully better than hardcodey calling CoreProcessPointerEvent.
(cherry picked from commit 32d0440c7f)
2007-10-28 17:17:26 +02:00
Peter Hutterer
99e826e867 xkb: enable XI event processing for xkb.
XI events can now take the same processing paths as core events, and should do
the correct state changes etc.

There's some cases where XKB will use KeyPress as type for an event to be
delivered to the client. Stuck warnings in, not sure what the correct solution
is yet.

(cherry picked from commit 6334d4e7be with some
 additional compile fixes and non-MPX adaptations)
2007-10-28 16:04:43 +02:00
Peter Hutterer
91077bfc50 Save processInputProc before wrapping it and restore it later, instead of
using a hardcoded ProcessKeyboardEvent. Otherwise we lose the ability to
process DeviceKeyEvents after the first key press.

This should be the correct fix now.
(cherry picked from commit 4d5df14f2c)
2007-10-28 15:51:34 +02:00
Peter Hutterer
8b9481a113 xkb: Store the action filters per device in the XkbSrvInfoRec.
Using a global array for action filters is bad. If two keyboard hit a modifier
at the same time, releaseing the first one will deactivate the filter and
thus the second keyboard can never release the modifier again.
(cherry picked from commit bfe6b4d2d9)
2007-10-28 15:51:10 +02:00
Peter Hutterer
e9f149fb56 Fix up detritus from removing GetPairedPointer/Keyboard. 2007-10-16 14:24:20 +09:30
Peter Hutterer
9f2b493e34 xkb: remove some warning comments.
Obsolete with 340911d724.
2007-10-03 15:22:09 +09:30
Peter Hutterer
32d0440c7f xkb: xkbHandleActions: let wrapping take care of event delivery.
This is hopefully better than hardcodey calling CoreProcessPointerEvent.
2007-09-27 11:44:03 +09:30
Peter Hutterer
8f9bf927e1 xkb: Unwrap properly in ProcessPointerEvent.
Instead of hardcoding CoreProcessPointerEvent, actually try to unwrap properly
and then call the unwrapped processInputProc. Seems to be a better idea,
especially since it makes stuff actually work...
2007-09-26 18:04:59 +09:30
Peter Hutterer
27bc1a8fef xkb: XkbFilterEvents: Remove unused variable compiler warning. 2007-09-26 15:24:41 +09:30
Peter Hutterer
bfc89c0355 xkb: unify ErrorFs. Prefix all with [xkb].
Output for XkbUseMsg intentionally skipped.
2007-09-26 15:23:37 +09:30
David Nolden
12a18cc890 compilation-fix in debug mode 2007-09-20 15:23:19 +09:30
Peter Hutterer
6334d4e7be xkb: enable XI event processing for xkb.
XI events can now take the same processing paths as core events, and should do
the correct state changes etc.

There's some cases where XKB will use KeyPress as type for an event to be
delivered to the client. Stuck warnings in, not sure what the correct solution
is yet.
2007-09-06 18:49:57 +09:30
Peter Hutterer
bfe6b4d2d9 xkb: Store the action filters per device in the XkbSrvInfoRec.
Using a global array for action filters is bad. If two keyboard hit a modifier
at the same time, releaseing the first one will deactivate the filter and
thus the second keyboard can never release the modifier again.
2007-09-05 15:09:29 +09:30
Peter Hutterer
f367285fd5 Merge branch 'master' into mpx
Conflicts:

	Xi/exevents.c
	dix/devices.c
	dix/getevents.c
	include/dix.h
	mi/mieq.c
2007-08-12 15:31:10 +09:30
Keith Packard
9ff7ff2fda Fix MEMORY SMASH in XkbCopyKeymap.
XkbCopyKeymap reallocates the destination keymap when it is not large enough
to hold the source data. When reallocating the map->types data, it needs to
zero out the new entries. The computation for where to start bzero'ing was
accounting for the size of the data type twice, once implicitly in the
pointer arithmetic, and once explicitly with '* sizeof (XkbKeyTypeRec)'.
This would often lead to random memory corruption when the destination
keymap had existing map->types data.
2007-07-04 23:38:27 -07:00
Adam Jackson
4d76075dbb Death to RCS tags. 2007-06-29 14:06:52 -04:00
Adam Jackson
f7f3fe7fe7 Remove the remnants of OS/2 support.
This has never worked in any modular server release, and as far as I know
was never tested in 6.7 through 6.9.
2007-06-28 18:59:05 -04:00
Peter Hutterer
c4e850a781 Quickfix to stop core key events from doubling up. 2007-06-25 13:38:25 +09:30
Peter Hutterer
4d5df14f2c Save processInputProc before wrapping it and restore it later, instead of
using a hardcoded ProcessKeyboardEvent. Otherwise we lose the ability to
process DeviceKeyEvents after the first key press.

This should be the correct fix now.
2007-06-21 18:24:30 +09:30
Peter Hutterer
f6f3322fc7 Revert "Save processInputProc before wrapping it and restore it later, instead of"
Mixed up source trees, this was a very bad fix.

This reverts commit 8431f60830.
2007-06-21 18:16:21 +09:30
Peter Hutterer
8431f60830 Save processInputProc before wrapping it and restore it later, instead of
using a hardcoded ProcessKeyboardEvent. Otherwise we lose the ability to
process DeviceKeyEvents after the first key press.
2007-06-21 17:42:36 +09:30
Peter Hutterer
5c680e9493 Remove double-grab option. We only want one grab per device. 2007-05-14 12:34:53 +09:30
Peter Hutterer
e8777a91f3 Merge branch 'master' into mpx
Conflicts:

	Xi/closedev.c
	Xi/exevents.c
	Xi/extinit.c
	Xi/listdev.c
	dix/window.c
	hw/xfree86/common/xf86Xinput.c
	include/extinit.h
	mi/mipointer.c
2007-04-02 15:36:26 +09:30
Daniel Stone
f292de2ef1 XKB: Fix size_syms calculation bug
Apparently it needed to be nSyms*15/10, not *12/10; make it match the
other allocation code.
2007-03-21 02:04:45 +02:00
Daniel Stone
f34b9a20b0 XKB: Be a tiny bit more conservative with type allocation
Make sure size_types will _always_ be 0 if we don't have any types.
2007-03-21 02:04:44 +02:00
Adam Jackson
021fc5cb2c Static markup and dead code cull over xkb/.
The former <X11/extensions/XKBsrv.h> has been pulled into the server now as
include/xkbsrv.h, and the world updated to look for it in the new place,
since it made no sense to define server API in an extension header.  Any
further work along this line will need to do similar things with XKBgeom.h
and friends.
2007-03-20 18:37:02 -04:00
Peter Hutterer
ceca5670fe dix: Each device needs to differ between a core grab and an XI grab,
otherwise a Xi grab may overwrite or release a core grab.
        Replace grab and associates with coreGrab and deviceGrab structures,
        adjust rest of dix/Xi/etc to compile.

xfree86: Don't check for core devices, we'll have the virtual ones anyway.
         If we check, the first mouse device is duplicated and sends
         double events.
2007-03-08 17:17:23 +10:30
Peter Hutterer
1f0075786f Merge branch 'master' into mpx
Conflicts:

	configure.ac
	dix/getevents.c
	hw/xfree86/ramdac/xf86Cursor.c
	mi/mipointer.c
	xkb/xkbUtils.c
2007-03-05 12:37:17 +10:30
Daniel Stone
760a38c4c7 XkbCopyKeymap: fix copy-and-waste accident
When we reallocated modmap, we accidentally clobbered syms with the
result, leaving syms definitely too small, and modmap also potentially too
small (as well as not actually allocated anymore).
2007-02-05 03:43:10 +02:00
Peter Hutterer
a309c936bb xkb: Daniel's patch to stop evdev keyboard segfaults.
mi:	Remove quickfix from ba547d4f6a
2007-02-05 11:38:44 +10:30
Peter Hutterer
15a81b6325 Merge branch 'master' 2007-01-28 17:18:57 +10:30
Daniel Stone
329f641727 XkbCopyKeymap: make sure sym_interpret is always valid
Make sure we're not copying sym_interpret across from an empty source.
2006-12-24 06:28:52 +02:00
Peter Hutterer
2d0a63126b Merge branch 'master' of git://anongit.freedesktop.org/git/xorg/xserver 2006-12-19 10:31:40 +10:30
Daniel Stone
ec84f72d07 XkbCopyKeymap: always initialise map and preserve
If we don't have map or preserve in the source map, make sure the
destination is initialised to NULL, and freed if it's a valid type.
2006-12-08 21:31:51 +02:00
Peter Hutterer
1c7568b8a1 mi: closing memory leak, miPointer is freed in miPointerCloseScreen
bugfix: uninitialized pPointer in miPointerGetPosition ifndef MPX
	adding DeviceIntPtr parameter to ScreenRec's cursor functions.
	cleanup of miPointer code to use same scheme in each function

dix:	MPHasCursor() function determines checking whether to invoke
	cursor rendering.

animcur: adding DeviceIntPtr parameter to cursor functions but animcur relies
	 on the core pointer right now.

xfixes: adding DeviceIntPtr parameter to cursor functions but xfixes relies on
	the core pointer right now.

rac:	adding DeviceIntPtr parameter to cursor functions but RAC relies on
	the core pointer right now.

ramdac:	adding DeviceIntPtr parameter to cursor functions but ramdac relies on
	the core pointer right now.
2006-11-23 17:15:14 +10:30
Peter Hutterer
8c16f21d5d dix GetSpriteWindow() adjusted for MPX
added device dependency for MPX to DoEnterLeaveEvents,
	EnterLeaveEvents, EnterNotifies, LeaveNotifies and
	FixUpEventFromWindow.
2006-11-22 17:06:47 +10:30
Peter Hutterer
9db851c22d dix: moved sprite from static to be pointer of type SpritePtr
added SpriteRecs for MPX devices
	changed sprite dependency and added MPX functionality to parts
	of events.c (ConfineToShape, PostNewCursor, XineramaCheckMotion,
	CheckMotion, XineramaChangeToCursor, ChangeToCursor, CheckPhysLimits,
	PointerConfinedToScreen)
	added DeviceIntRec param to GetSpritePosition(). This required some
	minor changes in ddx, xtest, xkb and xfixes.

mi:	changed miPointer to pointer instead of static struct.
2006-11-21 18:15:04 +10:30
Daniel Stone
e2b78df580 xkb: warning fix 2006-11-08 15:29:17 +02:00
Daniel Stone
389275d240 XkbCopyKeymap: don't iterate broken types, or dereference null pointers
Don't iterate invalid destination types (>= num_types) when coping key
types.
Don't free key_aliases if it's NULL (theoretical, but sure).
Make sure dst's label_font gets allocated if it's NULL.
(Thanks, Chris Lee.)
2006-11-08 15:29:16 +02:00
Daniel Stone
d585b4189a xkb: fix uninitialised warning
Fix uninitialised warning with memset(); we never actually use it
uninitialised, but gcc doesn't know that.
2006-11-08 15:29:16 +02:00
Daniel Stone
de5a4c6374 xkb: note that we allow full xi interaction
We now allow maps to be set (etc) on different keyboards, so stop putting
XkbXI_KeyboardsMask in unsupported.
2006-11-02 04:18:33 +02:00