summaryrefslogtreecommitdiff
path: root/Xi
AgeCommit message (Collapse)AuthorFilesLines
2009-02-25Xi: remove AllExtensionVersions.Peter Hutterer2-5/+5
Keeping an AllExtensionVersions array to save all versions of all extension is rather pointless if only one extension uses it. Rename to XIVersion, reduce to a single struct. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-25Xi: don't need to set the XKB settings for new core devices.Peter Hutterer1-10/+0
This is done by the XKB code these days anyway, so we might as well ignore it and keep using the stanard stuff. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-23Input: change processing API to InternalEvents.Peter Hutterer1-1/+1
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-23dix: Deliver{Grabbed|Focused|Device}Events API changed to InternalEvents.Peter Hutterer1-11/+5
With the API change, we can now purge the XI conversion from POE. Note: this commit breaks DGA even more. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-23dix: convert passive grabs to use internal events.Peter Hutterer1-24/+13
deviceGrab.sync.event is now an internal event, and CheckDeviceGrabs and friends is changed over. Note that this currently breaks some frozen grabs. See towards the end of ComputeFreezes(). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-23Xi: make ProcessOtherEvents more InternalEvent aware.Peter Hutterer1-49/+54
Get rid of the deviceValuator processing and a few other things, but still drop back into XI before checking device grabs or doing anything else. NoticeEventTime now needs to take InternalEvents, and while we're at it, change NoticeTime from a macro to a function. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-23dix: update CheckMotion to deal with DeviceEvents.Peter Hutterer1-2/+3
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-23Xi: support InternalEvents in UpdateDeviceState, parts of POE and EnqueueEventPeter Hutterer1-86/+78
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-16xserver: Avoid sending uninitialized padding data over the networkPeter Åstrand3-1/+4
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-16dix: Don't set core events in SetMaskForEvent.Peter Hutterer1-4/+15
Rather, modify the two callers to call separately for the two different. events. Unexport SetMaskForEvent too. And while we're at it, get rid of the MotionFilter macro, because it's one half confusing and one half pointless. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-16Xi: remove dynamic mask assignment for XI events.Peter Hutterer4-119/+69
They end up being the same anyway on startup, so let's not have a dynamic mask assignment mechanism and instead just hardcode them already. Also unexport SelectForWindow and remove the valid_masks parameter. We can check that before calling, since there's only one caller anyway. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-03Xi: initialize the device before applying button map changes.Peter Hutterer1-0/+4
This part got lost in bc909f71367a0. Reported by Tomas Carnecky. Acked-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-03Xi: create well-known atoms on demand, rather than preinit themSimon Thum3-23/+10
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-03Xi: If the MD doesn't have a key/kbdfeed class, init the keyboard.Peter Hutterer1-3/+10
This fixes crashes on mouse/keyboard combos where the mouse is both a keyboard and a mouse. Upon copying the SD's key info into the VCP, the NULL xkbInfo of the VCP would crash the server. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-03Xi: remove now obsolete oldXkbInfo.Peter Hutterer1-3/+0
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2009-01-29XKB: ifdef XKB is dead, yet it was still present in a few places.Maarten Maathuis1-5/+9
2009-01-23Xi: define a range of axis labels.Peter Hutterer1-1/+38
This is copied from linux/input.h, presumably that's the ones at least the Linux kernel can give us for any device. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-22Input: Clarify valuator FatalError messagesDaniel Stone1-4/+5
Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-22Input: Use previous state in valuator eventsDaniel Stone1-14/+2
Make valuator event state match other events by using the device state from before processing the event, not after. Also, we already check the number of valuators in UpdateDeviceState, so no need to do it again. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-22Input: Don't allow DDX to generate repeat eventsDaniel Stone1-17/+2
We always use soft-repeat at the moment; XKB posts a release/press sequence, which admittedly needs cleaning up, but that's for another day. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-22Input: Remove core keysyms from KeyClassRecDaniel Stone5-37/+40
Instead of always keeping two copies of the keymap, only generate the core keymap from the XKB keymap when we really need to, and use the XKB keymap as the canonical keymap. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-22Input: Centralise pointer map changingDaniel Stone2-29/+9
Replace both core and Xi functions with one function that validates the proposed map, and sends out both kinds of notification. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-22Input: Clean up keymap change notificationsDaniel Stone2-38/+11
Keyboard map notifications are always generated from within XKB code, which also takes care of copying the keysyms, etc. If you need to mangle the keymap yourself, generate a new core keymap/modmap, and pass it to XkbApplyMappingChange. SendMappingNotify is renamed to SendPointerMappingNotify (and ditto its Device variants), which still only _sends_ the notifications, as opposed to also doing the copying a la XkbApplyMappingChange. Also have the modmap change code traverse the device hierachy, rather than just going off the core keyboard. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2009-01-22Xi: Introduce XIShouldNotifyDaniel Stone1-0/+16
XIShouldNotify just lets you know if you should send an event for a keymap change (or similar) concerning a given device to a given client; at the moment, this is only for devices which are sending events to that client. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-22Input: Remove modifierMap from coreDaniel Stone1-3/+1
We already have modmap (in the exact same format!) in XKB, so just use that all the time, instead of duplicating the information. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-22Input: Remove modifierKeyMapDaniel Stone3-125/+31
Since modifierKeyMap is generated from modifierMap, just remove it, and only generate it when we need to send the modifier map to the client. 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-20/+0
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 Stone2-30/+13
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-22Input: Overhaul keyboard initialisation processDaniel Stone1-9/+2
XkbInitKeyboardDeviceStruct is now the only valid keyboard initialisation: all the details are hidden behind here. This now makes it impossible to supply a core keymap at startup. If dev->key is valid, dev->key->xkbInfo->desc is also valid. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-22XKB: Make XKB mandatoryDaniel Stone1-16/+0
No more #ifdef XKB, because you can't disable the build, and no more noXkbExtension either. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-20XKB: Move XkbCopyKeymap definition to xkbsrv.hDaniel Stone1-1/+0
Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-20Xi: don't care about CoreDevicePrivateKey when copying keysPeter Hutterer1-52/+48
If we get here, we must copy. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2009-01-16Don't release grabs unless all buttons are upThomas Jaeger1-1/+1
Previously, only buttons <= 5 would count here, but the core protocol allows for 255 buttons. http://lists.freedesktop.org/archives/xorg/2009-January/042092.html Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-16Count the number of logically down buttons in buttonsDownThomas Jaeger1-4/+4
This fixes the following bug. Assuming your window manager grabs Alt+Button1 to move windows, map Button3 to 0 via XSetPointerMapping, then press the physical button 3 (this shouldn't have any effect), press Alt and then button 1. The press event is delivered to the application instead of firing the grab. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-15dix: add property support for pointer acceleration.Simon Thum1-1/+5
Note: properties don't need to be cleaned up, the DIX does it for us anyway. Data that is stored in properties is cleaned up by the property system. Handlers, etc. don't need to be unregistered while cleaning up, as they get deleted when the device is removed anyway. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> Signed-off-by: Simon Thum <simon.thum@gmx.de>
2009-01-12Xi: add XATOM_FLOAT to server-defined properties.Peter Hutterer1-1/+54
This property is used to denote type float for input properties. Such properties can be accessed easily through the XIPropToFloat() function. Code originally written by Simon Thum. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2009-01-12Xi: add XIPropToInt() auxiliary function.Peter Hutterer1-0/+68
Converts an XIPropertyValuePtr to an integer, provided that type and format is right. Code originally written by Simon Thum. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2009-01-11Xi: fix missing declaration of XkbSetRulesDfltsJulien Cristau1-0/+4
2009-01-09Xi: call CheckMotion for floating SDs too.Peter Hutterer1-1/+1
CheckMotion updates the sprite position so we need to call it for all devices that have a sprite - including floating SDs (which have an invisible sprite).
2009-01-08Xi: fix typo in WarpDevicePointer handling.Christian Beier1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2008-12-12dix: don't alloc in ChangeMasterDeviceClasses.Peter Hutterer1-1/+6
We mustn't realloc as we are inside a signal handler. With SetMinimumEventSize, this code should never be hit anyway, as the event list should have the required memory before this code is hit. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-12-12Xi: silence compiler warningPeter Hutterer1-1/+1
Don't mix declarations and statements.
2008-12-12Remove #define NEED_EVENTS and NEED_REPLIESPeter Hutterer46-90/+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-08Xi: XIGetDevice needs to ignore the MORE_EVENTS flag.Tom Jaeger1-1/+1
Reported in X.Org Bug 18882, Comment 5. <http://bugs.freedesktop.org/show_bug.cgi?id=18882> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2008-12-03Xi: change XIUnRegisterPropertyHandler to XIUnregisterPropertyHandlerPeter Hutterer1-1/+1
CamelCase can be taken too far, and AFAICT there's no consumers of that function yet anyway. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-12-03Rework symbol visibility for easier maintenancePaulo Cesar Pereira de Andrade4-52/+52
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-03Let the DDX decide on the XkbRulesDefaults.Peter Hutterer1-1/+5
Rather than assuming rules in the CoreKeyboardProc, init the default rules in InitCoreDevices, then re-use them later. In the xfree86 DDX, set the rules to "base" or "evdev", depending on whether we'll load kbd or evdev. If we create a new MD, use pc105,us as default and re-use the rules file used previously. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-12-02Xi: fix xi_filters size.Peter Hutterer1-1/+1
2008-12-02Xi: fix use of button->down - bitflags instead of int arrays.Peter Hutterer2-9/+4
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 Andrade4-49/+49
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()