summaryrefslogtreecommitdiff
path: root/xkb/xkbUtils.c
AgeCommit message (Collapse)AuthorFilesLines
2008-05-17xkb: when copying the keymap, make sure the structs default to 0/NULL.Peter Hutterer1-8/+15
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) (cherry picked from commit 0b0a09797302ac2171db5df20fc5110aafc8efbb)
2008-01-17XKB: XkbCopyKeymap: Don't leak all the sectionsDaniel Stone1-0/+1
Previously, we'd just keep num_sections at 0, which would break the geometry and lead us to leak sections. Don't do that. (cherry picked from commit 0137b0394a248f694448a7d97c9a1a3efcf24e81)
2007-07-04Fix MEMORY SMASH in XkbCopyKeymap.Keith Packard1-3/+2
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-03-21XKB: Be a tiny bit more conservative with type allocationDaniel Stone1-2/+5
Make sure size_types will _always_ be 0 if we don't have any types.
2007-03-20Static markup and dead code cull over xkb/.Adam Jackson1-55/+2
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-02-05XkbCopyKeymap: fix copy-and-waste accidentDaniel Stone1-1/+1
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).
2006-12-24XkbCopyKeymap: make sure sym_interpret is always validDaniel Stone1-10/+13
Make sure we're not copying sym_interpret across from an empty source.
2006-12-08XkbCopyKeymap: always initialise map and preserveDaniel Stone1-2/+12
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-11-08XkbCopyKeymap: don't iterate broken types, or dereference null pointersDaniel Stone1-33/+49
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-02XkbCopyKeymap: be more careful with levels, allocate compat/geomDaniel Stone1-41/+70
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-10-23XkbCopyKeymap: increment shapes and outlines when copyingDaniel Stone1-2/+2
Remember to increment the source and destination shapes when copying, instead of just endlessly copying the first one.
2006-10-15XkbCopyKeymap: copy server vmods, and name atomsDaniel Stone1-0/+16
Copy server->vmods, and all the atoms in names.
2006-10-14xkb: better support of XkbDfltXIIdDaniel Stone1-0/+4
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-14XkbCopyKeymap: add geometry supportDaniel Stone1-5/+486
Add a first cut at geometry support, which seems to generally work.
2006-10-08xkb: remove random broken vendor workaroundsDaniel Stone1-20/+0
2006-10-02Merge branch 'input-hotplug' of ↵Daniel Stone1-1/+603
git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug
2006-10-02xkb: fix wrapping when switching between groupsIvan Pascal1-4/+4
Use XkbCharToInt as that's what we're doing.
2006-09-10Warning fix, and a syntax fix in a #if 0 section of code.Zephaniah E. Hull1-1/+1
2006-09-07XkbCopyKeymap/SrvXkbCopyKeymap: free geom harder, add cheery commentsDaniel Stone1-2/+9
Unconditionally free geometry when copying the keymap (so we have none on core, oh well), add a couple of heartening comments.
2006-08-29[PATCH] XkbCopyKeymap: still more range fixesDaniel Stone1-31/+62
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-24XkbCopyKeymap: fix various range issuesDaniel Stone1-33/+122
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-23XkbCopyKeymap: use correct range for MapNotifyDaniel Stone1-13/+13
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-23XkbCopyKeymap: optionally send NewKeyboardNotify/MapNotify eventsDaniel Stone1-2/+73
Optionally send a NewKeyboardNotify or MapNotify event when copying the keymap; modify GetKeyboardValuatorEvents to make use of this.
2006-08-23xkb/gkve: copy XKB map, not pointer-assignDaniel Stone1-0/+404
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-07-21Remove RCS tags. Fix Xprint makefile braindamage.Adam Jackson1-2/+0
2006-05-29Remove -xkbmap argument.Daniel Stone1-20/+0
2006-04-03Bug #1358: Make ISO_Prev_Group cycle/wrap as ISO_Next_Group does.Daniel Stone1-2/+2
2006-03-25Fix two glaring unconditional-NULL-dereferences.Daniel Stone1-0/+6
2005-07-03Change <X11/misc.h> and <X11/os.h> to "misc.h" and "os.h".Daniel Stone1-1/+1
2005-07-03Add Xtrans definitions (FONT_t, TRANS_CLIENT) to clean up warnings.Daniel Stone1-0/+4
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-01Change all misc.h and os.h references to <X11/foo.h>.Daniel Stone1-1/+1
2005-04-20Fix includes right throughout the Xserver tree:Daniel Stone1-2/+2
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.
2004-04-23Merging XORG-CURRENT into trunkEgbert Eich1-1/+1
2004-03-14Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004xf86-4_4_99_1Egbert Eich1-1/+1
2004-03-03Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004xf86-4_4_0STSF-CURRENTEgbert Eich1-1/+1
2004-02-26readding XFree86's cvs IDsxf86-4_3_99_903Egbert Eich1-1/+1
2004-02-26Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004Egbert Eich1-1/+1
2003-11-25XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folksxf86-4_3_99_16Kaleb Keithley1-179/+22
2003-11-14XFree86 4.3.0.1xf86-4_3_0_1PRE_xf86-4_3_0_1Kaleb Keithley1-10/+9
2003-11-14R6.6 is the Xorg base-lineXORG-MAINKaleb Keithley1-0/+1141