Commit Graph

197 Commits

Author SHA1 Message Date
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
Eamon Walsh
a5cf3f21f7 registry: Register XKB extension protocol names. 2007-10-15 14:27:32 -04:00
Peter Hutterer
9f2b493e34 xkb: remove some warning comments.
Obsolete with 340911d724.
2007-10-03 15:22:09 +09:30
Eamon Walsh
8b54865720 xace: add hooks + new access codes: XKB extension.
Removes "LookupKeyboardDevice" and "LookupPointerDevice" in favor of
inputInfo.keyboard and inputInfo.pointer, respectively; all use cases
are non-XI compliant anyway.
2007-09-28 13:34:18 -04:00
Eamon Walsh
5c03d13181 xace: add new hooks + access controls: XInput extension.
Introduces new dix API to lookup a device, dixLookupDevice(), which
replaces LookupDeviceIntRec and LookupDevice.
2007-09-28 08:02:00 -04:00
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
Eamon Walsh
4017d31902 devPrivates rework: since API is already broken, switch everything
over to new system.

Need to update documentation and address some remaining vestiges of
old system such as CursorRec structure, fb "offman" structure, and
FontRec privates.
2007-08-28 09:28:25 -04:00
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
Daniel Stone
d9a5e3e964 XkbCopyKeymap: be more careful with levels, allocate compat/geom
Take various extra precautions with copying levels across (thanks Chris
Lee for a gdb session), including allocating when we don't already have a
coherent map.
Only free type components if they're present.
Allocate geometry and compat components if we don't already have them in
the dest map.
2006-11-02 00:45:23 +02:00
Daniel Stone
562096a012 XkbCopyKeymap: increment shapes and outlines when copying
Remember to increment the source and destination shapes when copying,
instead of just endlessly copying the first one.
2006-10-23 02:49:22 +03:00
Daniel Stone
6dd4fc4652 xkb: fix virtual modmap size computation
Compute virtual modmap size bounded by nVModMapKeys-1, rather than
nVModMapKeys.

This is sort of a best guess.  The other way seems a little more
logical, but also leads to segfaults pretty quickly if you hammer
GetMap hard enough.  So let's try this one.
2006-10-16 00:22:00 +03:00
Daniel Stone
a484ba1527 XkbCopyKeymap: copy server vmods, and name atoms
Copy server->vmods, and all the atoms in names.
2006-10-15 23:47:34 +03:00
Daniel Stone
ad355fecee xkb: make sure we set the map on the right device, not necessarily core
Forgot that all XKB requests took a device spec: the comparison of
'if working on the core keyboard, does this device send core events; or,
is this device the core keyboard?' was broken.  Instead, what we want is
'if working on the core keyboard, does this device send core events; or,
is this device the one we're working on?'.
2006-10-15 21:59:06 +03:00
Daniel Stone
a05044cfc1 xkb: better support of XkbDfltXIId
XKB.h specifies that XkbDfltXIId should be used where the client doesn't
care about the device identifier.  We take this to mean core devices,
where practical.
2006-10-14 22:14:56 +03:00
Daniel Stone
93302452e7 XkbCopyKeymap: add geometry support
Add a first cut at geometry support, which seems to generally work.
2006-10-14 15:54:12 +03:00
Daniel Stone
bd3d93be82 xkb: remove random broken vendor workarounds 2006-10-08 23:21:12 +03:00
Daniel Stone
4493acb88c xkb: add FIXMEs to procedures which need to act on all core devices
Add FIXME comments above request handlers which need to act on all core-sending
devices if called on the core keyboard.
2006-10-08 17:51:03 +03:00
Daniel Stone
3686cd0fbf xkb: make XkbSetControls work on all core-sending devices 2006-10-06 17:20:42 +03:00
Daniel Stone
7b4dc171b0 xkb: remove unused #ifndef 2006-10-06 16:26:54 +03:00
Daniel Stone
ab56f0c5b5 xkb: simplify core device loop in GetKeyboardByName 2006-10-06 16:12:36 +03:00
Daniel Stone
4b6e2f12f7 xkb: make LatchLockGroup work on all core-sending devices
Apply the settings to all devices sending core events, if we're working on the
core keyboard.
2006-10-06 16:08:21 +03:00
Daniel Stone
ebf9b3bbbb xkb: update all core-sending keyboards on GetKeyboardByName
Update the keymaps of all keyboards which send core events on
GetKeyboardByName; still a few other procedures which need this treatment.
2006-10-06 14:17:59 +03:00
Daniel Stone
9c7440bdf5 xkb: remove the world's most staggeringly broken vendor workaround
Certain versions of LynxOS needed to sleep up to five seconds for closing a
pipe to actually, y'know, be useful.
2006-10-02 20:58:33 +03:00
Daniel Stone
3c98cebb6e Merge branch 'input-hotplug' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug 2006-10-02 02:18:17 +03:00
Ivan Pascal
fa1ac94178 xkb: fix wrapping when switching between groups
Use XkbCharToInt as that's what we're doing.
2006-10-02 02:17:14 +03:00
Daniel Stone
5d99e05f05 Merge branch 'input-hotplug' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug 2006-09-29 00:35:07 +03:00
Daniel Stone
ad321fad4b Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug 2006-09-24 17:56:43 +03:00
Adam Jackson
ce78b0cd2b Close with Pclose() that which we open with Popen(). 2006-09-21 20:42:47 -04:00
Zephaniah E. Hull
5893375786 Warning fix, and a syntax fix in a #if 0 section of code. 2006-09-10 15:50:51 -04:00
Daniel Stone
629798c73a XkbCopyKeymap/SrvXkbCopyKeymap: free geom harder, add cheery comments
Unconditionally free geometry when copying the keymap (so we have none on
core, oh well), add a couple of heartening comments.
2006-09-07 15:17:04 +03:00
Daniel Stone
0eb7299f44 [PATCH] XkbCopyKeymap: still more range fixes
Make sure we don't stomp preserve if it doesn't already exist, and fix a
couple of range-related thinkos in level name copying.
2006-08-29 15:17:56 +03:00
Daniel Stone
db1ab1bdb2 XkbCopyKeymap: fix various range issues
Fix a bunch of range issues caused by incorrect assumptions (e.g. that the
design was at least halfway sensible), and copy types by hand, instead of
just blindly memcpy()ing the lot, since it itself cleverly contains a ton
of allocated pointers.
2006-08-24 23:33:59 +03:00
Daniel Stone
33af05d58f XkbCopyKeymap: use correct range for MapNotify
We haven't copied {min,max}_key_code by the time the notifies run, so use
src instead of dst to determine number of keys, et al.
2006-08-23 19:05:50 +03:00
Daniel Stone
6323a11d0d XkbCopyKeymap: optionally send NewKeyboardNotify/MapNotify events
Optionally send a NewKeyboardNotify or MapNotify event when copying the
keymap; modify GetKeyboardValuatorEvents to make use of this.
2006-08-23 18:53:04 +03:00
Daniel Stone
8f8487ff99 xkb/gkve: copy XKB map, not pointer-assign
Write a new function to copy an XKB map (does everything but geometry at
the moment), and use that instead of nasty pointer assignments.
2006-08-23 14:33:41 +03:00
Daniel Stone
984babe86b remove obsolete vendor defines
Remove random behaviour changes for SGI and MetroLink.
2006-08-12 21:43:38 +03:00
Kevin E Martin
654619d76c Revert xkb changes that broke XkbGetKeyboard() 2006-07-28 17:16:32 -04:00
Adam Jackson
0aaac95b0d Remove RCS tags. Fix Xprint makefile braindamage. 2006-07-21 17:56:00 -04:00
Daniel Stone
84683f19b4 get rid of XFree86LOADER, XFree86Server, XFree86Module, and IN_MODULE
Get rid of almost all uses of these definitions.  They're still defined for
delinquent out-of-tree drivers, and also for the Mesa build.  As well as
for miinitext.c.  But largely gone.
2006-07-18 18:17:38 -04:00
Tilman Sauerbeck
63f13e01ee Bug #7097: do case-insensitive comparison for some hotkeys.
xkb's strcasecmp implementation has been moved to the dix so it's now
safe to just use strcasecmp().
2006-07-08 11:33:44 +02:00
Daniel Stone
df6da66525 Simplify the unsupported XI function list. 2006-06-01 20:56:39 +00:00
Daniel Stone
fd8bde8bb0 Remove -xkbmap argument. 2006-05-29 11:14:03 +00:00
Daniel Stone
db0680cf70 Minor #include cleanups. 2006-05-29 09:26:32 +00:00
Jeremy C. Reed
b3031532ca Remove tolower() which was missed in the _XkbStrCaseCmp/strcmp changes. 2006-05-24 20:11:38 +00:00
Daniel Stone
6aadd454e7 Fix stupid thinko. 2006-04-10 10:11:19 +00:00
Daniel Stone
c9f6e60d42 Coverity #826: Fix potential memory leak. 2006-04-10 08:50:33 +00:00
Daniel Stone
1357af2474 Coverity #340: Fix potential NULL dereference. Clean up proliferation of
'register int n' in loops of ProcXkbGetNames.
2006-04-09 17:39:10 +00:00
Daniel Stone
f324be00c5 Coverity #324: Fix potential NULL dereference. (Alan Coopersmith) 2006-04-09 17:28:42 +00:00
Daniel Stone
7637aa17f2 Coverity #169: Fix potential fgets() into NULL (?!?). 2006-04-09 17:26:17 +00:00
Daniel Stone
47bdc9528c Coverity #844, #845, #846: Fix memory leaks. 2006-04-07 16:07:50 +00:00
Daniel Stone
2c90c3bfef Coverity #987: Avoid potential NULL dereference. 2006-04-07 15:57:17 +00:00
Daniel Stone
66500819b1 Bug #1358: Make ISO_Prev_Group cycle/wrap as ISO_Next_Group does. 2006-04-03 11:37:30 +00:00
Daniel Stone
5c0a2088e2 Bug #6428: Fix off-by-one error when walking off the end of the vmodmap
list.
2006-04-01 21:49:44 +00:00
Daniel Stone
7c44bb8c49 Simplify XkbWriteXKBKeymapForNames a bit, and remove debug spew. 2006-03-31 07:33:34 +00:00
Daniel Stone
0e88cefbfe Prune XKB code to only what we need to run the server. Remove dead
!XKB_IN_SERVER codepaths. Remove HAVE_CONFIG_H codepaths.
2006-03-27 23:03:47 +00:00
Daniel Stone
5be8a66d32 Fix remnants of previous busted _XkbStrCaseCmp commit. 2006-03-27 22:28:32 +00:00
Daniel Stone
7257590651 Move XFree86 DDX XKB actions into dixmods. 2006-03-27 21:15:06 +00:00
Daniel Stone
d7b9e2b0e9 Bug #3819: Remove open-coding of strcasecmp. 2006-03-25 23:09:50 +00:00
Daniel Stone
b3570dd94a Remove INITARGS braindamage, change to void; add XkbExtensionInit prototype
to xkb.h. Explicitly initialise nTypes in xkb.c.
2006-03-25 22:37:58 +00:00
Daniel Stone
1ef60ce8eb Really remove all DDX pre-config code. 2006-03-25 22:35:48 +00:00
Daniel Stone
ec10f70b21 Remove XkbCF DDX configuration code. 2006-03-25 21:52:49 +00:00
Daniel Stone
aae4238360 Fix two glaring unconditional-NULL-dereferences. 2006-03-25 20:17:58 +00:00
Daniel Stone
1cfa9f647e Bug #5216: Allow options to appear with other components. 2006-02-28 16:55:26 +00:00
Adam Jackson
f105b8da11 Mark everything in dixsym.c as _X_EXPORT. 2006-02-15 20:44:13 +00:00
Daniel Stone
ed33c7c98a Remove unused -xkbdb and -noloadxkb options. Rename -ar1 and -ar2 to
-ardelay and -arinterval, respectively. Remove XKB banner from help text.
2005-12-26 04:23:58 +00:00