Commit Graph

209 Commits

Author SHA1 Message Date
Peter Hutterer
ff3adf3e56 xkb: reset xkb_cached_map on CloseDownDevices.
Could lead to some invalid pointers in the second server generation.
2008-06-05 08:53:34 +09:30
Peter Hutterer
5a3d06b8f4 xkb: delete default rules when devices are closed.
We only have one set of default rules options in xkb. When the second keyboard
is brought up with Xkb options specified, these new options overwrite the old.
In future server generations, the rules used for the VCK are a mixture of the
default ones and ones previously specified for other keyboards. Simply
resetting the xkb default rules to NULL avoids this issue.

Reproducable by setting XkbLayout "de" and XkbVariant "nodeadkeys". In the
second server generation, the VCK has "us(nodeadkeys)". This again produces a
SIGABRT when the first key is hit.

I could not figure out why the SIGABRT happens. This patch is avoiding the
issue rather than fixing it.
2008-06-02 10:27:05 +09:30
Peter Hutterer
30e9a33f7d xkb: fix crash caused by uninitialised variable. 2008-05-22 16:00:21 +09:30
Peter Hutterer
4056595fc7 xkb: remove superfluous checks in if statement. 2008-05-20 18:57:54 +09:30
Peter Hutterer
99d28c3ef3 Merge branch 'master' into mpx
Conflicts:

	Xext/xprint.c (removed in master)
	config/hal.c
	dix/main.c
	hw/kdrive/ati/ati_cursor.c (removed in master)
	hw/kdrive/i810/i810_cursor.c (removed in master)
	hw/xprint/ddxInit.c (removed in master)
	xkb/ddxLoad.c
2008-05-20 10:20:14 +09:30
Alan Coopersmith
7cdc19b29d When XKB fails to open rules file, log the file name, not the NULL file pointer 2008-05-13 16:39:30 -07:00
Daniel Stone
cf20df39cc XKB: Actually explain keymap failures
When something went wrong building a keymap, try to explain to the user
what it actually was, instead of the dreaded 'Failed to load XKB keymap'
catch-all.
2008-05-07 22:56:03 +03:00
Peter Hutterer
8190ef8754 Merge branch 'master' into mpx
Conflicts:

	Xext/EVI.c
	Xext/appgroup.c
	Xext/cup.c
	Xext/mitmisc.c
	Xext/sampleEVI.c
	dix/window.c
2008-04-22 18:04:05 +09:30
Egbert Eich
449723510a xkb: use the correct device instead of an uninitialised "dev". #15614
X.Org Bug 15614 <http://bugs.freedesktop.org/show_bug.cgi?id=15614>

Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au>
2008-04-22 13:30:25 +09:30
Peter Hutterer
eebdf69e9a xkb: mixing up src and dst in a memcpy is suboptimal. 2008-04-18 14:39:28 +09:30
Peter Hutterer
3106ba1116 xkb: two fixes to avoid server crashes.
- map can be NULL in some cases, so don't try to dereference it.
- don't default to inputInfo.keyboard

This is firefighting, I presume something in the class copy may have gone
wrong to get a NULL map in the first instance?
2008-04-13 11:48:06 +09:30
Peter Hutterer
4219e94c2f xkb: Add XkbCopySrvLedInfo, deep-copies a XkbSrvLedInfoRec. 2008-04-13 08:27:31 +09:30
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