Commit Graph

57 Commits

Author SHA1 Message Date
Peter Hutterer
4056595fc7 xkb: remove superfluous checks in if statement. 2008-05-20 18:57:54 +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
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
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
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
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
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
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
0ac1755977 Merge branch 'master' into mpx
Conflicts:

	Xext/sampleEVI.c
2008-01-26 13:55: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
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
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
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
bfc89c0355 xkb: unify ErrorFs. Prefix all with [xkb].
Output for XkbUseMsg intentionally skipped.
2007-09-26 15:23:37 +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
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
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
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
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
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
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
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
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
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
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
Adam Jackson
0aaac95b0d Remove RCS tags. Fix Xprint makefile braindamage. 2006-07-21 17:56:00 -04:00
Daniel Stone
fd8bde8bb0 Remove -xkbmap argument. 2006-05-29 11:14:03 +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
aae4238360 Fix two glaring unconditional-NULL-dereferences. 2006-03-25 20:17:58 +00:00
Daniel Stone
0bb669638f Change <X11/misc.h> and <X11/os.h> to "misc.h" and "os.h". 2005-07-03 08:53:54 +00:00
Daniel Stone
e03198972c Add Xtrans definitions (FONT_t, TRANS_CLIENT) to clean up warnings.
Add XSERV_t, TRANS_SERVER, TRANS_REOPEN to quash warnings.
Add #include <dix-config.h> or <xorg-config.h>, as appropriate, to all
    source files in the xserver/xorg tree, predicated on defines of
    HAVE_{DIX,XORG}_CONFIG_H. Change all Xfont includes to
    <X11/fonts/foo.h>.
2005-07-03 07:02:09 +00:00
Daniel Stone
9b1debcdb6 Change all misc.h and os.h references to <X11/foo.h>. 2005-07-01 22:43:43 +00:00
Daniel Stone
292c4cff26 Fix includes right throughout the Xserver tree:
change "foo.h" to <X11/foo.h> for core headers, e.g. X.h, Xpoll.h;
change "foo.h", "extensions/foo.h" and "X11/foo.h" to
    <X11/extensions/foo.h> for extension headers, e.g. Xv.h;
change "foo.[ch]" to <X11/Xtrans/foo.[ch]> for Xtrans files.
2005-04-20 12:25:48 +00:00
Egbert Eich
2fb5886200 Merging XORG-CURRENT into trunk 2004-04-23 19:54:30 +00:00