summaryrefslogtreecommitdiff
path: root/xkb
AgeCommit message (Collapse)AuthorFilesLines
2009-06-29Bug #6428, #16458, #21464: Fix crash due to uninitialized VModMap fields.Tomas Janousek1-3/+5
In ProcXkbGetKbdByName, mrep.firstVModMapKey, .nVModMapKeys and .totalVModMapKeys were not initialized, contained random values and caused accesses to unallocated and later modified memory, causing XkbSizeVirtualModMap and XkbWriteVirtualModMap to see different number of nonzero values, resulting in writes past the end of an array in XkbSendMap. This patch initializes those values sensibly and reverts commits 5c0a2088 and 6dd4fc46, which have been plain non-sense. Signed-off-by: Tomas Janousek <tomi@nomi.cz> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commit 525aa17f804d37d1cfcbbf6b8e6cddb45e999b20) Signed-off-by: Keith Packard <keithp@keithp.com>
2009-05-08XkbSetNamedIndicator should ignore SD's without LED'sAlan Coopersmith1-0/+2
When ProcXkbSetNamedIndicator is called on a core device, and we walk the slaves to set the LED's on each of them, ignore any slaves that do not have either a KbdFeedbackCtrl or LedCtrl structure. (This is much more critical in xserver-1.5-branch, where we walk *all* devices, not just the slaves of the specified master, and thus return failure when setting an LED on the Core Keyboard and hit a xf86-input-mouse device with no LED's to set.) Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commit 557dbadf3be273255e8fdb12d9321f4e88bf2b65) Signed-off-by: Keith Packard <keithp@keithp.com>
2009-03-27xkb: Fix wrong colour reference in XKB geometry copying. #20081Peter Hutterer1-2/+2
base_color and label_color need to reference the color in the destination, not in the source. X.Org Bug 20081 <http://bugs.freedesktop.org/show_bug.cgi?id=20081> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Daniel Stone <daniel@fooishbar.org> (cherry picked from commit f5bf1fdaf36163d5c2f1b9b51df96326ebbb0e9c)
2009-01-30mi: ensure chained button mappings from SD -> MD (#19282)Peter Hutterer1-1/+1
After copying the master event, flip the detail field to the mapped button of the SD, not the physical button. This way if the SD has a mapping 1:3 and the MD has a mapping of 3:4, a press on button 1 on the SD results in a core event on button 4. X.Org Bug 19282 <http://bugs.freedesktop.org/show_bug.cgi?id=19282> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2009-01-30xkb: fix typo - missing negation when checking button state.Peter Hutterer1-1/+1
Introduced with a85f0d6b98237d8a196de624207acf1983a1859a. Reported by Thomas Jaeger. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commit 515ce3e4ba42605a1ee9979e8bb5acd3cf6470a3)
2009-01-30Xi: fix use of button->down - bitflags instead of int arrays.Peter Hutterer1-2/+2
The device's button down state array was changed to use DOWN_LENGTH and thus bitflags for each button in cfcb3da7. Update the DBSN events to copy this bit-wise state. Update xkb and Xi to check for the bit flag instead of the array value. Reported by ajax. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> (cherry picked from commit a85f0d6b98237d8a196de624207acf1983a1859a)
2009-01-09mi: Clean up CopyGetMasterEvent, re-use the memory.Peter Hutterer1-5/+10
Alloc an EventList once and then re-use instead of allocing a new event each time we need a master event. There's a trick included: because all the event processing handlers only take an xEvent, init a size 1 EventList and squash the events into this one. Events that have count > 1 must be squished into an xEvent array anyway before passing into the event handlers, so we don't lose anything here. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Daniel Stone <daniel@fooishbar.org> (cherry picked from commit d281866b74f7067f2704c278fe9720eafc0ee5ef)
2008-12-16xkb: Allow NULL as rulesFile in XkbSetRulesDflts.Peter Hutterer1-5/+24
If no rules file is given, simply re-use the previous one. If no RF is given the first time this function is called, use the built-in default. This includes fixing the built-in default to something that actually exists. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> (cherry picked from commit 463e02e7de5da3e582a3a049110a476713c7210e)
2008-12-09ddxCtrls.c: XkbDDXUsesSoftRepeat always returns 1 nowSascha Hlusiak1-20/+0
We'd like to do soft repeat in the server for all keys. Remove obscure check, that'd prevent the server from autorepeating when delay is set to exactly 660ms and rate is set to exactly 25 (interval=40). Signed-off-by: Daniel Stone <daniel@fooishbar.org> (cherry picked from commit bbf811514d3cdf84790bad5b852942a4e636902b) Signed-off-by: Keith Packard <keithp@keithp.com>
2008-12-01xkb: don't attempt to filter events for devices without key classes.Peter Hutterer1-1/+9
Reported by Magnus Kessler. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-12-01xkb: Extra sanity checks to prevent dev->key == NULL dereferencing.Peter Hutterer1-4/+15
2008-12-01dix: No DeviceEnterLeave events in server 1.6Peter Hutterer1-4/+0
2008-11-25Remove duplication from code paths in XkbDDXCompileKeymapByNamesAlan Coopersmith1-34/+42
2008-11-20Always use server-<display>.xkm to avoid races when multiple servers startAlan Coopersmith1-10/+2
Previously each server starting ran xkbcomp with the output set to <keymapname>.xkm, read it, then deleted it - which led to races if two servers were starting at the same time with the same keymap. Sun bug #6773816 Xorg uses the same xkm output file for compiled keymap file <http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6773816>
2008-11-08Remove some null statements.James Cloos1-1/+1
Remove several doubled statement-terminal semicolons. Reported by Fernando Carrijo.
2008-11-04xkb: extract the correct device in XkbFilterEvents.Peter Hutterer1-0/+8
If the event is an XI event, we need to work on the correct device, not on the VCK. Adds XIGetDevice(event) function to extract the device from an event.
2008-11-04xkb: when faking mouse button events, fake them on the correct devices.Peter Hutterer5-72/+33
When MouseKeys are activated, keyboard devices may generate fake mouse button events through XKB. Let's get then running through the appropriate paths, i.e. as XI events on the correct device. To make matters more fun, ProcessOtherEvents drops events if the DIX device state cannot be updated accordingly, i.e. all button events from keyboard devices. Hence we need to get the paired MD for the device in XkbDDXFakeDeviceButton, and post the event through the paired MD (usually the VCP). Removes now-unused ddxFakeBtn.c. Note: this patch only half-arsedly fixed button events, motion events are a more complicated matter.
2008-11-04XKB: Tiny cleanups to _XkbLookupAnyDeviceDaniel Stone1-3/+4
A couple of coding style cleanups, a warning fix via removing a now-unused label, and also put an else so we don't spuriously trip a condition that should admittedly never occur anyway. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-11-04XKB: Fix thinko, causing warning (erroneously fixed in 5544c51447)Daniel Stone1-1/+1
newTypes is a local variable which always has an address. newTypesIn, on the other hand, might be sus. See also 5544c51447f551dfc6df64438873a7ce64743976. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-10-31xkb: remove unused label "out", clean up program flow.Peter Hutterer1-3/+1
2008-10-31Move EXTENSION_BASE and EXTENSION_EVENT_BASE to misc.h.Peter Hutterer1-1/+0
2008-10-31xkb: ProcXkbSetCompatMap should do dry-runs, then normal runs.Peter Hutterer1-2/+2
Was doing only dry-runs, which kinda explains why changing the compat map didn't really have any effect. Fallout from e8c2a3d7c996cb41c4c44ba67acae5ff9438fc06. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-09-26xkb: squash canonical types into explicit ones on core reconstruction.Peter Hutterer1-3/+10
If we update key types from core, and groups 2 - n have a canonical type but the same symbols as the explicit type of group 1, assume that it was a core sym duplication according to Section 12.4 of the XKB Protocol Spec. Ignore the canonical types and pretend there's only one group for the key - with the explicit key type. The protocol spec does not cover this case, so we have to guess here.
2008-09-26xkb: fix core keyboard map generation. #14373Peter Hutterer1-5/+34
According to Section 12.4 of the XKB Protocol Spec, if a key only has a single group but the keyboard has multiple groups defined, the core description of the key is a duplication of the single group across all symbols. i.e. G1L1 G1L2 G1L1 G1L2 G1L3 G1L4 G1L3 G1L4 The previous code generated G1L1 G1L2 G1L3 G1L4 G1L3 G1L4, leading to "invented" groups when the process is reversed. Note that this creates wrong key types on reconstruction from core to xkb, i.e. any single-group key with a key type that is not one of the canonical four (Sec 12.2.3), will get the assigned type on group 1, and a canonical type for the other gruops. X.Org Bug 14373 <http://bugs.freedesktop.org/show_bug.cgi?id=14373>
2008-09-22xkb: fix use of uninitialized variable.Kim Woelders1-12/+5
And some cosmetic changes to use stuff->change consistently. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-08-28Prepare for array-index based devPrivates.Tomas Carnecky1-1/+2
TODO: static indices can be made just an int; some indices can be combined.
2008-08-10Move strcasecmp(), strcasencmp() and strcasestr() prototypes to os.hMatthieu Herrb1-0/+1
And make sure os.h is included in files that use it.
2008-08-08xkb: actually initialise sli before using it.Peter Hutterer1-0/+5
2008-08-06xkb: ProcXkbSetDeviceInfo should work on all attached SDs.Peter Hutterer1-17/+89
If called with XkbUseCoreKbd, run through all attached SDs and replicate the call. This way, we keep the SDs in sync with the MD as long as core clients control the MDs.
2008-08-06xkb: ProcXkbSetGeometry should work on all attached SDs.Peter Hutterer1-31/+56
If called with XkbUseCoreKbd, run through all attached SDs and replicate the call. This way, we keep the SDs in sync with the MD as long as core clients control the MDs.
2008-08-06xkb: ProcXkbSetNames should work on all attached SDs.Peter Hutterer1-271/+353
If called with XkbUseCoreKbd, run through all attached SDs and replicate the call. This way, we keep the SDs in sync with the MD as long as core clients control the MDs.
2008-08-06xkb: ProcXkbSetNamedIndicator should work on all attached SDs.Peter Hutterer1-70/+179
If called with XkbUseCoreKbd, run through all attached SDs and replicate the call. This way, we keep the SDs in sync with the MD as long as core clients control the MDs.
2008-08-06xkb: ProcXkbSetIndicatorMap should work on all attached SDs.Peter Hutterer1-36/+68
If called with XkbUseCoreKbd, run through all attached SDs and replicate the call. This way, we keep the SDs in sync with the MD as long as core clients control the MDs.
2008-08-06xkb: ProcXkbSetCompatMap should work on all attached SDs.Peter Hutterer1-52/+118
If called with XkbUseCoreKbd, run through all attached SDs and replicate the call. This way, we keep the SDs in sync with the MD as long as core clients control the MDs.
2008-08-06xkb: ProcXkbSetMap should work on all attached SDs.Peter Hutterer1-101/+179
If called with XkbUseCoreKbd, run through all attached SDs and replicate the call. This way, we keep the SDs in sync with the MD as long as core clients control the MDs.
2008-08-06xkb: ProcXkbBell should work on all attached SDs.Peter Hutterer1-91/+140
If called with XkbUseCoreKbd, run through all attached SDs and replicate the call. This way, we keep the SDs in sync with the MD as long as core clients control the MDs.
2008-08-04xkb: break up XkbCopyKeymap into bite-sized chunks.Peter Hutterer1-76/+167
2008-07-28xkb: remove superfluous inputInfo.keyboard treatment.Peter Hutterer1-17/+11
Really not necessary, we can just walk the list and spare us the special treatment of the VCK.
2008-07-28xkb: use PickPointer/PickKeyboard in _XkbLookupAnyDevice.Peter Hutterer1-8/+2
2008-07-28xkb: don't send core events on SlowKeys.Peter Hutterer1-1/+1
Core events don't happen until later in the DIX, so pump device events down instead. This makes modifiers work again when SlowKeys is enabled.
2008-07-24Remove all empty extension reset hooks, replace with NULL.Adam Jackson1-7/+1
2008-07-23Unifdef __osf__Adam Jackson2-2/+2
2008-07-23Unifdef AIX.Adam Jackson1-1/+1
2008-07-23Unifdef sgi.Adam Jackson2-9/+1
2008-07-23Unifdef QNX.Adam Jackson1-3/+0
Again, hasn't worked since at least 7.0.
2008-07-17Dead code removalDaniel Stone1-1/+1
Remove a whole bunch of code that was never built, be it entire files or just dead ifdefs.
2008-07-17Drop a bunch of #ifdef Lynx.Mathieu BĂ©rard1-1/+1
2008-06-25Don't log null device name in XkbDDXLoadKeymapByNamesAlan Coopersmith1-1/+1
2008-06-25xkb: remove unused variable is_core.Peter Hutterer1-2/+1
2008-06-18input: fix up usage of button->down, used to be a bitmask, is now an array.Peter Hutterer1-2/+2
device->button->down used to be a 32-byte bitmask with one bit for each button. This has changed into a 256-byte array, with one byte assigned for each button. Some of the callers were still using this array as a bitmask however, this is fixed with this patch. Thanks to Keith Packard for pointing this out. See also: http://lists.freedesktop.org/archives/xorg/2008-June/036202.html