summaryrefslogtreecommitdiff
path: root/xkb/xkbActions.c
AgeCommit message (Collapse)AuthorFilesLines
2009-03-16xkb: xkbi has a pointer to the device - use this instead of inputInfo.pointer.Peter Hutterer1-1/+1
2009-03-16xkb: the VCP can post device events, don't stop xkb filtering on it.Peter Hutterer1-2/+2
2009-02-23Input: change processing API to InternalEvents.Peter Hutterer1-3/+3
Don't pass xEvent* and count through to processing, pass a single InternalEvent. Custom handlers are disabled for the time being. And for extra fun, XKB's pointer motion emulation is disabled. But stick an error in there so that we get reminded should we forget about it. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-23xkb: _XkbFilterRedirectKey needs to pass InternalEvents down.Peter Hutterer1-10/+10
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-23Xi: support InternalEvents in UpdateDeviceState, parts of POE and EnqueueEventPeter Hutterer1-11/+1
Note that this breaks DGA. Life is tough. EnqueueEvent is a somewhat half-baked solution, we immediately drop back into XI and store them. But it should in theory work. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Don't let the dcce be random data.
2009-02-23xkb: Switch the xkb event processing path over to InternalEvents.Peter Hutterer1-10/+18
Before dropping down into the DIX, convert back into XI events. This is a temporary solution only, until the DIX is capable of handling InternalEvents anyway. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-22XKB: Sanitise vmods for redirected keysDaniel Stone1-4/+4
Turn two unsigned chars into one unsigned int for both vmods and the vmod mask. As a bonus, remove broken unused accessor macro for setting the vmods. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-22XKB: Sanitise ctrls actionDaniel Stone1-1/+1
Turn four unsigned chars into one unsigned long. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-22XKB: Sanitise pointer actionsDaniel Stone1-4/+4
Turn two unsigned chars into one int. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-22Input: Ignore modifiers in core input processingDaniel Stone1-14/+2
Modifiers get cleared by the XKB code when we drop down into core input processing, so just delete the dead code path to simplify things a bit. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-22Input: Remove state from KeyClassRecDaniel Stone1-19/+3
We already have state fully stored within XKB, so instead of duplicating it, just generate the values to send to clients when required. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-22XKB: Remove lock actions disablingDaniel Stone1-35/+0
For some reason, XKB allows clients to set a global (!) flag that simply turns lock keys into state no-ops. Ignore this flag. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2009-01-20XKB: Remove unnecessary prototypeDaniel Stone1-6/+0
Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-08xkb: 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>
2008-12-12Remove #define NEED_EVENTS and NEED_REPLIESPeter Hutterer1-1/+0
A grep on xorg/* revealed there's no consumer of this define. Quote Alan Coopersmith: "The consumer was in past versions of the headers now located in proto/x11proto - for instance, in X11R6.0's xc/include/Xproto.h, all the event definitions were only available if NEED_EVENTS were defined, and all the reply definitions required NEED_REPLIES. Looks like Xproto.h dropped them by X11R6.3, which didn't have the #ifdef's anymore, so these are truly ancient now." Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2008-12-03Rework symbol visibility for easier maintenancePaulo Cesar Pereira de Andrade1-7/+7
Save in a few special cases, _X_EXPORT should not be used in C source files. Instead, it should be used in headers, and the proper C source include that header. Some special cases are symbols that need to be shared between modules, but not expected to be used by external drivers, and symbols that are accessible via LoaderSymbol/dlopen. This patch also adds conditionally some new sdk header files, depending on extensions enabled. These files were added to match pattern for other extensions/modules, that is, have the headers "deciding" symbol visibility in the sdk. These headers are: o Xext/panoramiXsrv.h, Xext/panoramiX.h o fbpict.h (unconditionally) o vidmodeproc.h o mioverlay.h (unconditionally, used only by xaa) o xfixes.h (unconditionally, symbols required by dri2) LoaderSymbol and similar functions now don't have different prototypes, in loaderProcs.h and xf86Module.h, so that both headers can be included, without the need of defining IN_LOADER. xf86NewInputDevice() device prototype readded to xf86Xinput.h, but not exported (and with a comment about it).
2008-12-02Xi: 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>
2008-11-29Export symbols defined in the sdk.Paulo Cesar Pereira de Andrade1-7/+7
This is the biggest "visibility" patch. Instead of doing a "export" symbol on demand, export everything in the sdk, so that if some module fails due to an unresolved symbol, it is because it is using a symbol not in the sdk. Most exported symbols shouldn't really be made visible, neither advertised in the sdk, as they are only used by a single shared object. Symbols in the sdk (or referenced in sdk macros), but not defined anywhere include: XkbBuildCoreState() XkbInitialMap XkbXIUnsupported XkbCheckActionVMods() XkbSendCompatNotify() XkbDDXFakePointerButton() XkbDDXApplyConfig() _XkbStrCaseCmp() _XkbErrMessages[] _XkbErrCode _XkbErrLocation _XkbErrData XkbAccessXDetailText() XkbNKNDetailMaskText() XkbLookupGroupAndLevel() XkbInitAtoms() XkbGetOrderedDrawables() XkbFreeOrderedDrawables() XkbConvertXkbComponents() XkbWriteXKBSemantics() XkbWriteXKBLayout() XkbWriteXKBKeymap() XkbWriteXKBFile() XkbWriteCFile() XkbWriteXKMFile() XkbWriteToServer() XkbMergeFile() XkmFindTOCEntry() XkmReadFileSection() XkmReadFileSectionName() InitExtInput() xf86CheckButton() xf86SwitchCoreDevice() RamDacSetGamma() RamDacRestoreDACValues() xf86Bpp xf86ConfigPix24 xf86MouseCflags[] xf86SupportedMouseTypes[] xf86NumMouseTypes xf86ChangeBusIndex() xf86EntityEnter() xf86EntityLeave() xf86WrapperInit() xf86RingBell() xf86findOptionBoolean() xf86debugListOptions() LoadSubModuleLocal() LoaderSymbolLocal() getInt10Rec() xf86CurrentScreen xf86ReallocatePciResources() xf86NewSerialNumber() xf86RandRSetInitialMode() fbCompositeSolidMask_nx1xn fbCompositeSolidMask_nx8888x0565C fbCompositeSolidMask_nx8888x8888C fbCompositeSolidMask_nx8x0565 fbCompositeSolidMask_nx8x0888 fbCompositeSolidMask_nx8x8888 fbCompositeSrc_0565x0565 fbCompositeSrc_8888x0565 fbCompositeSrc_8888x0888 fbCompositeSrc_8888x8888 fbCompositeSrcAdd_1000x1000 fbCompositeSrcAdd_8000x8000 fbCompositeSrcAdd_8888x8888 fbGeneration fbIn fbOver fbOver24 fbOverlayGeneration fbRasterizeEdges fbRestoreAreas fbSaveAreas composeFunctions VBEBuildVbeModeList() VBECalcVbeModeIndex() TIramdac3030CalculateMNPForClock() shadowBufPtr shadowFindBuf() miRRGetScreenInfo() RRSetScreenConfig() RRModePruneUnused() PixmanImageFromPicture() extern int miPointerGetMotionEvents() miClipPicture() miRasterizeTriangle() fbPush1toN() fbInitializeBackingStore() ddxBeforeReset() SetupSprite() InitSprite() DGADeliverEvent() SPECIAL CASES o defined as _X_INTERNAL xf86NewInputDevice() o defined as static fbGCPrivateKey fbOverlayScreenPrivateKey fbScreenPrivateKey fbWinPrivateKey o defined in libXfont.so, but declared in xorg/dixfont.h GetGlyphs() QueryGlyphExtents() QueryTextExtents() ParseGlyphCachingMode() InitGlyphCaching() SetGlyphCachingMode()
2008-11-04xkb: when faking mouse button events, fake them on the correct devices.Peter Hutterer1-8/+5
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-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-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
2008-04-22Merge branch 'master' into mpxPeter Hutterer1-1/+1
Conflicts: Xext/EVI.c Xext/appgroup.c Xext/cup.c Xext/mitmisc.c Xext/sampleEVI.c dix/window.c
2008-04-22xkb: use the correct device instead of an uninitialised "dev". #15614Egbert Eich1-1/+1
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-07Merge branch 'master' into dcdc_reworkPeter Hutterer1-5/+4
Conflicts: Xext/xevie.c dix/dispatch.c
2008-04-01XKB: Fix processInputProc wrappingThomas Jaeger1-5/+4
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-03-04Merge branch 'master' into mpxPeter Hutterer1-2/+2
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-02-17XKB: Ditch XkbFileInfoDaniel Stone1-2/+2
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-01-03Merge branch 'master' into mpxPeter Hutterer1-17/+25
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
2007-12-13Merge branch 'master' into XACE-SELINUXEamon Walsh1-2/+17
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-05XKB: Actions: Don't run certain actions on the core keyboardDaniel Stone1-2/+17
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-11-08Merge branch 'mpx' into mdsdPeter Hutterer1-6/+5
Conflicts: Xi/opendev.c
2007-11-07Merge branch 'master' into mpxPeter Hutterer1-6/+5
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-05Merge branch 'master' into XACE-SELINUXEamon Walsh1-89/+71
Conflicts: dix/dispatch.c dix/property.c hw/xfree86/common/xf86VidMode.c include/xkbsrv.h render/glyph.c xkb/xkbActions.c
2007-10-28XKB: Don't update indicators on all devices, add missing include fileDaniel Stone1-5/+5
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-28xkb: xkbHandleActions: let wrapping take care of event delivery.Peter Hutterer1-17/+7
This is hopefully better than hardcodey calling CoreProcessPointerEvent. (cherry picked from commit 32d0440c7f6e604807cb14dd32349df6f22c903b)
2007-10-28xkb: enable XI event processing for xkb.Peter Hutterer1-21/+23
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 6334d4e7be18de5f237c12a6dc20f75aa23477d0 with some additional compile fixes and non-MPX adaptations)
2007-10-28Save processInputProc before wrapping it and restore it later, instead ofPeter Hutterer1-7/+10
using a hardcoded ProcessKeyboardEvent. Otherwise we lose the ability to process DeviceKeyEvents after the first key press. This should be the correct fix now. (cherry picked from commit 4d5df14f2c4a3108a8c8adfcf4766c0d1a9daad2)
2007-10-28xkb: Store the action filters per device in the XkbSrvInfoRec.Peter Hutterer1-49/+36
Using a global array for action filters is bad. If two keyboard hit a modifier at the same time, releaseing the first one will deactivate the filter and thus the second keyboard can never release the modifier again. (cherry picked from commit bfe6b4d2d9952a80f8dbc63eec974ef894e5c226)
2007-10-16Fix up detritus from removing GetPairedPointer/Keyboard.Peter Hutterer1-1/+1
2007-10-03xkb: remove some warning comments.Peter Hutterer1-8/+0
Obsolete with 340911d7243a7f1095d79b5b2dcfa81b145c2474.
2007-09-28xace: add hooks + new access codes: XKB extension.Eamon Walsh1-4/+6
Removes "LookupKeyboardDevice" and "LookupPointerDevice" in favor of inputInfo.keyboard and inputInfo.pointer, respectively; all use cases are non-XI compliant anyway.
2007-09-27xkb: xkbHandleActions: let wrapping take care of event delivery.Peter Hutterer1-17/+11
This is hopefully better than hardcodey calling CoreProcessPointerEvent.
2007-09-26xkb: Unwrap properly in ProcessPointerEvent.Peter Hutterer1-2/+2
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...
2007-09-06xkb: enable XI event processing for xkb.Peter Hutterer1-19/+21
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.
2007-09-05xkb: Store the action filters per device in the XkbSrvInfoRec.Peter Hutterer1-49/+36
Using a global array for action filters is bad. If two keyboard hit a modifier at the same time, releaseing the first one will deactivate the filter and thus the second keyboard can never release the modifier again.
2007-08-28devPrivates rework: since API is already broken, switch everythingEamon Walsh1-11/+2
over to new system. Need to update documentation and address some remaining vestiges of old system such as CursorRec structure, fb "offman" structure, and FontRec privates.
2007-06-21Save processInputProc before wrapping it and restore it later, instead ofPeter Hutterer1-7/+10
using a hardcoded ProcessKeyboardEvent. Otherwise we lose the ability to process DeviceKeyEvents after the first key press. This should be the correct fix now.
2007-06-21Revert "Save processInputProc before wrapping it and restore it later, ↵Peter Hutterer1-2/+1
instead of" Mixed up source trees, this was a very bad fix. This reverts commit 8431f6083076cf1e701366767d8f8d32a628200f.
2007-06-21Save processInputProc before wrapping it and restore it later, instead ofPeter Hutterer1-1/+2
using a hardcoded ProcessKeyboardEvent. Otherwise we lose the ability to process DeviceKeyEvents after the first key press.
2007-04-02Merge branch 'master' into mpxPeter Hutterer1-4/+4
Conflicts: Xi/closedev.c Xi/exevents.c Xi/extinit.c Xi/listdev.c dix/window.c hw/xfree86/common/xf86Xinput.c include/extinit.h mi/mipointer.c