Commit Graph

197 Commits

Author SHA1 Message Date
Peter Hutterer
6271df6953 xkb: don't overwrite CtrlProc in the second run of XkbFinishDeviceInit.
XkbFinishDeviceInit is called once when the device is initialised, but also
when a class copy causes the key class of a device to change. In this case, overwriting the CtrlProc of the KeybdFeedbackClass with XkbDDXKeybdCtrlProc sets up a nice recursive loop of XkbDDXKeybdCtrlProc calling itself until the cows come home.
2008-04-08 08:42:58 +09:30
Peter Hutterer
fd06e8f8c1 Merge branch 'master' into dcdc_rework
Conflicts:

	Xext/xevie.c
	dix/dispatch.c
2008-04-07 07:56:41 +09:30
Thomas Jaeger
37b1258f0a XKB: Fix processInputProc wrapping
If input processing is frozen, only wrap realInputProc: don't smash
processInputProc as well.  When input processing is thawed, pIP will be
rewrapped correctly.

This supersedes the previous workaround in 50e80c9.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2008-04-01 15:31:50 +03:00
Daniel Stone
090b26db76 XkbCopyKeymap: Fix broken indentation
An astute observer will note that the entirety of XkbCopyKeymap is indented
with spaces, and no tabs whatsoever, and not commit changes which break the
otherwise consistent indentation.
A non-astute observer will note the breakage when the commit mail comes
through with clearly broken indentation.
A polite, non-astute, observer will then fix it.

C'est la vie.
2008-03-14 21:58:27 +02:00
Keith Packard
b2657ec598 XkbCopyKeymap was mangling doodads and overlays 2008-03-10 21:29:12 -07:00
Adam Jackson
34b69e3bc0 Fix distcheck.
(cherry picked from commit 2a47accff8)
2008-03-05 23:57:15 -05:00
Peter Hutterer
4f2cd0ed96 Merge branch 'master' into mpx
This merge reverts Magnus' device coorindate scaling changes. MPX core event
generation is very different, so we can't scale in GetPointerEvents.

Conflicts:

	Xi/opendev.c
	dix/devices.c
	dix/dixfonts.c
	dix/getevents.c
	dix/resource.c
	dix/window.c
	hw/xfree86/common/xf86Xinput.c
	mi/mipointer.c
	xkb/ddxBeep.c
	xkb/ddxCtrls.c
	xkb/ddxKeyClick.c
	xkb/ddxList.c
	xkb/ddxLoad.c
	xkb/xkb.c
	xkb/xkbAccessX.c
	xkb/xkbEvents.c
	xkb/xkbInit.c
	xkb/xkbPrKeyEv.c
	xkb/xkbUtils.c
2008-03-04 18:11:10 +10:30
Daniel Stone
0bd0f90d7c XKB: Fix initial map setting on startup
Due to an unwitting sense inversion when eliminating XkbFileInfo, we were
setting the complete wrong keymap on startup (non-XKB map if we had an XKB
map available, or the XKB map if we didn't have any available).  Invert the
sense properly, and add two small bits that also went missing in that commit.
2008-03-04 03:50:25 +02:00
Eamon Walsh
ef60632e20 dix: Modify callers of property and selection API to use new interfaces. 2008-02-29 18:01:37 -05:00
Eamon Walsh
3b1df47bd4 XACE: Require "manage" permission for XKBSetNames. 2008-02-27 22:48:28 -05:00
Daniel Stone
a4202b898f XKB: Actually use the keymap we compile at startup
During XkbInitKeyboardDevice, we compiled a keymap and promptly threw it away;
brief inspection revealed the embarassingly simple problem.  Sorry.
2008-02-22 18:28:06 +01:00
Daniel Stone
fbd7768946 XKB: Ditch XkbFileInfo
Sorry about the megacommit, but this touches on a lot of stuff.

Get rid of XkbFileInfo, which was pretty seriously redundant, and move the
only useful thing it had (defined) into XkbDescRec.  defined will be removed
pretty soon anyway.  Is the compat map pointer non-NULL? Then you have a
compat map, congratulations! Anyhow, I digress.

All functions that took an XkbFileInfoPtr now take an XkbDescPtr, _except_
XkmReadFile, which returns an XkbDescPtr *, because people want to deal in
XkbDescPtrs, not XkbDescRecs.
2008-02-17 22:52:08 +02:00
Daniel Stone
e5f002edde XkbProcessOtherEvent: Don't depend on now-removed header
We don't do XKBsrv.h anymore.
2008-02-17 22:52:08 +02:00
Daniel Stone
2d256f098a XKB: Always set size correctly in XkbCopyKeymap's geometry routines
We were forgetting to set the sizes for sections and rows and a couple of
other misc bits in XkbCopyKeymap's geometry.  Sort that out, and add a
couple of clarifying comments along the way.
2008-02-17 22:52:07 +02:00
Daniel Stone
ab79110a84 XKB: Remove support for pre-built keymaps
Don't load prebuilt keymaps anymore.
2008-02-17 22:52:07 +02:00
Daniel Stone
1332343910 XKB: Remove usage of client-side types
Since we're no longer sharing with Xlib, don't pass Displays and XPointers
everywhere.
2008-02-17 22:52:07 +02:00
Daniel Stone
534fc5140b XKB: Remove a bunch of mad ifdefs
We have SEEK_SET and size_t, seriously.  Also use DebugF instead of
ifdef DEBUG, and ditch a couple of random bits that were never used.
2008-02-17 22:52:07 +02:00
Daniel Stone
0f12a448dc XKB: Deprecate XKBSRV_NEED_FILE_FUNCS
There's no point in having the function definitions be conditional, so
whatever.
2008-02-17 22:52:07 +02:00
Daniel Stone
68bd7ac193 XKB: Move headers into the server tree
We need to start breaking the XKB API to enforce sanity, so drag whichever
headers we need to do so into the server tree, as the client API is set in
stone, being part of Xlib.
2008-02-17 22:52:07 +02:00
Daniel Stone
e4eb7e5842 XKB: Delete xkberrs.c
Get rid of the XKB errors code to save a bunch of space.
2008-02-17 22:52:06 +02:00
Eamon Walsh
ae43d835bd XACE: Change access modes for some device-related requests.
Opening a device is not really "reading" it.
Requests that globally configure a device should require "manage" access.
2008-02-13 20:20:49 -05:00
Peter Hutterer
0b0a097973 xkb: when copying the keymap, make sure the structs default to 0/NULL.
It actually does help if a pointer is NULL rather than pointing to nirvana
when you're trying to free it lateron. Who would have thought?
(cherry picked from commit 7a97ca667405a42d008265c3a870210cc1da97dd)
2008-02-09 08:03:01 +10:30
Peter Hutterer
7018f28040 xkb: when copying the keymap, make sure the structs default to 0/NULL.
It actually does help if a pointer is NULL rather than pointing to nirvana
when you're trying to free it lateron. Who would have thought?
2008-02-09 07:55:38 +10:30
Peter Hutterer
96eafa3d4f xkb: when copying sections, make sure num_rows is set too.
(cherry picked from commit 41991fb991)
2008-02-07 21:24:38 +10:30
Peter Hutterer
41991fb991 xkb: when copying sections, make sure num_rows is set too. 2008-02-05 19:05:18 +10:30
Peter Hutterer
d954f9c803 xkb: don't update LEDs if they don't exist. (Bug #13961)
In some weird cases we call this function when there is no SrvLedInfo on the
device. And it turns out null-pointer dereferences are bad.

X.Org Bug 13961 <http://bugs.freedesktop.org/show_bug.cgi?id=13961>
2008-01-30 10:39:54 +10:30
Peter Hutterer
0ac1755977 Merge branch 'master' into mpx
Conflicts:

	Xext/sampleEVI.c
2008-01-26 13:55:07 +10:30
Peter Hutterer
ba315ae5dd Xi: add XACE hooks for device creation (ChangeDeviceHierarchy)
AddInputDevice checks for permissions already, so all we do is modify a few
callers to let AID sort it out.
2008-01-21 23:44:07 +10:30
Daniel Stone
0137b0394a XKB: XkbCopyKeymap: Don't leak all the sections
Previously, we'd just keep num_sections at 0, which would break the
geometry and lead us to leak sections.  Don't do that.
2008-01-17 18:43:05 +11:00
Peter Hutterer
2a988ed75b xkb: don't do core key repeats, XI only is the path to light. 2008-01-15 19:14:46 +10:30
Peter Hutterer
8da83836b6 Merge branch 'master' into mpx
Conflicts:

	XTrap/xtrapddmi.c
	Xext/security.c
	Xext/xprint.c
	Xext/xtest.c
	Xext/xvdisp.c
	Xi/exevents.c
	Xi/grabdevb.c
	Xi/grabdevk.c
	Xi/opendev.c
	Xi/ungrdev.c
	Xi/ungrdevb.c
	Xi/ungrdevk.c
	dix/cursor.c
	dix/devices.c
	dix/dixutils.c
	dix/events.c
	dix/getevents.c
	dix/main.c
	dix/window.c
	hw/xfree86/ramdac/xf86Cursor.c
	include/dix.h
	include/input.h
	include/inputstr.h
	mi/midispcur.c
	mi/miinitext.c
	mi/misprite.c
	render/animcur.c
	xfixes/cursor.c
	xkb/xkbAccessX.c
2008-01-03 17:04:54 +10:30
Eamon Walsh
c8feb73f58 Merge branch 'master' into XACE-SELINUX
Conflicts:

	Xext/EVI.c
	Xext/bigreq.c
	Xext/cup.c
	Xext/dpms.c
	Xext/fontcache.c
	Xext/mitmisc.c
	Xext/xcmisc.c
	Xext/xf86bigfont.c
	Xext/xtest.c
	configure.ac
	dbe/dbe.c
	hw/darwin/darwin.h
	hw/darwin/darwinEvents.c
	hw/darwin/iokit/xfIOKit.h
	hw/darwin/iokit/xfIOKitCursor.c
	hw/darwin/quartz/fullscreen/fullscreen.c
	hw/darwin/quartz/fullscreen/quartzCursor.c
	hw/darwin/quartz/quartz.c
	hw/darwin/quartz/quartzCommon.h
	hw/darwin/quartz/quartzCursor.c
	hw/darwin/quartz/xpr/dri.c
	hw/darwin/quartz/xpr/dristruct.h
	hw/darwin/quartz/xpr/xprCursor.c
	hw/darwin/quartz/xpr/xprFrame.c
	hw/xfree86/modes/xf86RandR12.c
	include/cursor.h
	miext/rootless/rootlessCommon.h
	miext/rootless/rootlessScreen.c
	miext/rootless/rootlessWindow.c
	render/picturestr.h

Trying to pick up the pieces from the darwin churn here...
2007-12-13 18:38:25 -05:00
Daniel Stone
320abd7d1d XKB: Actions: Don't run certain actions on the core keyboard
Don't run VT switches, terminations, or anything, on the core keyboard: only
run actions which affect the keyboard state.  If we get an action such as VT
switch, just swallow the event.
2007-12-05 19:37:48 +00:00
Peter Hutterer
e4fe0a3cb7 xkb: swap a LookupKeyboardDevice over in favour of GetPairedDevice
The former always returns the VCK, which is obviously wrong if we have
multiple devices.
2007-11-29 10:14:38 +10:30
Peter Hutterer
a80e64f150 XKB: Generate correct key repeat events (bug #13114)
Make sure we send the correct event for the type of device when we're
sending key repeat events, which stops repeats being sent to incorrect
windows.
2007-11-23 23:21:33 +10:00
Eamon Walsh
ed8a39c48a Revert "registry: Register XKB extension protocol names."
This reverts commit a5cf3f21f7.

Moving all the names into dix/registry.c
2007-11-20 18:47:52 -05:00
Eamon Walsh
2d17f47cc7 Merge branch 'master' into XACE-SELINUX
Conflicts:

	hw/xnest/Pixmap.c
	include/dix.h
2007-11-19 18:10:46 -05:00
Daniel Stone
a969db091c XKB: Don't ring the bell when we don't have a BellProc (bug #13246) 2007-11-17 22:51:39 +01:00
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
Eamon Walsh
a52c9b2a59 Merge branch 'master' into XACE-SELINUX
Conflicts:

	dix/dispatch.c
	dix/property.c
	hw/xfree86/common/xf86VidMode.c
	include/xkbsrv.h
	render/glyph.c
	xkb/xkbActions.c
2007-11-05 19:08:36 -05:00
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