summaryrefslogtreecommitdiff
path: root/mi
AgeCommit message (Collapse)AuthorFilesLines
2009-01-13dix: fix WarpPointer calls for devices with custom valuator ranges (#19297)Peter Hutterer1-1/+1
If the MD's lastSlave was a devices with custom axes ranges, then a WarpPointer would position the cursor at the wrong location. A WarpPointer request provides screen coordinates and these coordinates were scaled to the device range before warping. This patch consists of two parts: 1) in the WarpPointer handling, get the lastSlave and post the event through this device. 2) assume that WarpPointer coordinates are always in screen coordinates and scale them to device coordinates in GPE before continuing. Note that this breaks device-coordinate based XWarpDevicePointer calls (for which the spec isn't nailed down yet anyway) until a better solution is found. X.Org Bug 19297 <http://bugs.freedesktop.org/show_bug.cgi?id=19297> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-01-11mieq: Avoid possible race condition whereby one thread might call ↵Jeremy Huddleston1-2/+9
mieqEnqueue before InitAndStartDevices finishes This is more of a hack around the problem. This is something that will need to be addressed in a more structured manner with the multi threaded input efforts. (cherry picked from commit 3c596c061e75848cfa76dd9259c23a3f3a67444c)
2009-01-11XQuartz: Add locking to make mieq thread safe on OSXJeremy Huddleston2-0/+66
(cherry picked from commit 7a8d2266861e74176b5310b83652a9c10a170494)
2009-01-11mi: don't mix declarations and codeJulien Cristau2-3/+4
2009-01-11mi: ANSI cleanupsJulien Cristau3-4/+3
2008-12-15mi: Reuse memory in mieqProcessInputEvents rather than making excessive ↵Jeremy Huddleston1-4/+6
calls to calloc() Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2008-12-12Remove #define NEED_EVENTS and NEED_REPLIESPeter Hutterer4-4/+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-10mi: Clean up CopyGetMasterEvent, re-use the memory.Peter Hutterer1-30/+30
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>
2008-12-10dix: move MAX_VALUATOR_EVENTS into include/input.hPeter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2008-12-10mi: always update the sprite for master devices.Peter Hutterer1-1/+1
Follow-up to 9ce995373e4a. This re-enables cursor rendering if the MD is controlled through software (e.g. synergy). Reported by John Tapsell: "I use Xorg with no mouse attached, but use synergy to control the mouse. The commit means that I no longer have a visible mouse cursor. The mouse cursor is still 'there' in terms that I can click buttons etc with it, but it's just not visible." Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2008-12-07Use libtool convenience libraries and better "symbol" table.Paulo Cesar Pereira de Andrade1-0/+3
All .a libraries were converted to .la, and instead of linking the Xorg binary with a mix of .a and .la, and adding some libraries more then once in the command line, etc, now it generates a single libxorg.la from all the required convenience libraries, and links with a dummy xorg.c (that should usually be the file with the main function...). This removes the requirement of some things like libosandcommon and libinit, that existed to circumvent problems when linking multiple .a and .la in the final Xorg binary. The "symbol table" is now generated dynamically, by a shell script, with an embedded gawk parser that parses cpp output. The new file sdksyms.sh is generated by hand by analyzing all Makefile.am's and making it create a sdksyms.c file, that includes all sdk headers that will add symbols for the Xorg binary. Module headers aren't read, and a in 2 files it was required to add a "<hash>ifndef XorgLoader" around declarations shared between the Xorg binary and libextmod. A few other changes were added to other sdk headers, like preventing multiple inclusion, or including other headers to satisfy dependencies. This should be a lot more portable, and better (hopefully properly) using libtool to generate convenience libraries.
2008-12-03Rework symbol visibility for easier maintenancePaulo Cesar Pereira de Andrade51-274/+274
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-02mi: UpdateSprite only if the device is attached.Peter Hutterer1-1/+1
2008-11-30Remove declarations of symbols that are never defined.Paulo Cesar Pereira de Andrade1-8/+0
These symbols were removed from the X Server, or never declared. One symbol that may need special attention is XkbBuildCoreState(), that doesn't have a prototype anywhere, but is called from xkb/xkbEvents.c:XkbFilterEvents(), and also used by the macros XkbStateFieldFromRec() and XkbGrabStateFromRec() defined in include/xkbstr.h. fb/wfbrename.h also may need some cleanup, as it makes several "renames" of non existing symbols.
2008-11-29Export symbols defined in the sdk.Paulo Cesar Pereira de Andrade18-47/+47
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-19mi: Push screen-saver/DPMS handling to after the EQ pop operation.Jeremy Huddleston1-10/+10
This way we on't need to hold the mutex during the dixSaveScreens() call. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Tiago Vignatti <vignatti@c3sl.ufpr.br> Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-11-19mi: Only increment tail (push) when the event data is actually in the queueJeremy Huddleston1-4/+3
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Tiago Vignatti <vignatti@c3sl.ufpr.br> Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-11-11mi: clean up mieqProcessInputEvents, copy all events before processing.Peter Hutterer1-52/+46
Copy the EventRec's information into local variables before processing them, this should make it safer for upcoming threading and also makes it easier to read. Simplify the event allocation code from the abyss it was before. This also fixes a potential bug where a custom handler could scramble the event before the same -now scrambled- event was then passed through the master's custom event handler. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-11-08Remove some null statements.James Cloos1-1/+1
Remove several doubled statement-terminal semicolons. Reported by Fernando Carrijo.
2008-11-07mi: Fix infinite loop on regen when swrast_dri.so is missingJulien Cristau1-1/+2
The swrast DRI provider gets pushed on the glx provider stack at every server generation, so the stack turns into a circular list on regen. X.Org bug#18388 <https://bugs.freedesktop.org/show_bug.cgi?id=18388>
2008-11-04xkb: when faking mouse button events, fake them on the correct devices.Peter Hutterer1-1/+1
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-04Remove XEvIEDaniel Stone1-15/+0
It's unmaintained and has been broken for quite a while; MPX finally smashed it completely. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-11-04Xi: XINPUT has been mandatory for agesDaniel Stone1-4/+3
Ditch all #ifdef XINPUT, since it's always built. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
2008-10-26Nuke unused miBankNewSerialNumberJulien Cristau1-12/+0
2008-10-26Nuke prototype for nonexistent functionJulien Cristau1-4/+0
miDoInitVisuals was removed in commit 94825ad3c72a1c3f6a61199c302841f63241cf87, but its prototype was left.
2008-10-10mieq: Backtrace when the queue overflows.Adam Jackson1-0/+6
Since we're probably stuck down in a driver somewhere, let's at least try to point out where. This will need to be rethought when the input thread work lands though.
2008-10-08mi: functions here are carrying 'time' without need.Tiago Vignatti2-11/+9
2008-10-08mi: remove deprecated and unused functions.Tiago Vignatti2-36/+0
miPointerDeltaCursor, miPointerGetMotionBufferSize and miPointerSetNewScreen.
2008-10-06xalloc+bzero -> xcallocAdam Jackson1-2/+1
2008-10-03Dangling use of miDestroyGCOpsAdam Jackson1-1/+0
2008-10-03Fix compile for miSetScreenPixmap prototype.Adam Jackson1-4/+0
2008-10-03Delete unused miModifyBanking()Adam Jackson2-60/+0
2008-10-03Remove unused wrapping for visual initialization.Adam Jackson3-57/+3
2008-10-03staticize mi{G,S}etScreenPixmapAdam Jackson1-13/+13
2008-10-03miFindMaxBand is dead codeAdam Jackson2-34/+0
2008-10-03mi{Create,Destroy}GCOps are unused, nuke 'em.Adam Jackson2-33/+0
2008-10-03Remove a bunch of unused API from the mi export list.Adam Jackson15-25/+21
2008-10-03Remove the Must_have_memory hack.Adam Jackson2-13/+6
Also remove an astonishing amount of misunderstanding of how casts work.
2008-09-21mieq: Made custom event handlers safer for nevents >1Jeremy Huddleston1-12/+18
2008-09-19When resizing a window with redirected descendents, don't expose themKeith Packard1-0/+9
Bit/window gravity computations need to recompute exposures to manage the bits which are saved by gravity during the resize computation. That's easy for non-redirected windows where the bits are all within the parent's pixmap. For redirected windows, we don't need to deal with this at all, so just skip the whole re-computation adventure. Signed-off-by: Keith Packard <keithp@keithp.com>
2008-09-03mieq: Fix my broken cherry pick.Jeremy Huddleston1-2/+1
2008-09-03mieqProcessInputEvents: Check custom event handlers first.Jeremy Huddleston1-16/+13
2008-08-28Prepare for array-index based devPrivates.Tomas Carnecky6-13/+25
TODO: static indices can be made just an int; some indices can be combined.
2008-08-27Add an array of integers for use as per-screen cursor private keys.Eamon Walsh1-7/+7
Replaces the use of the screen pointer itself as the key, which was nice but won't work now that an array index is being stored.
2008-08-19Refactor misprite a bit.Adam Jackson2-26/+38
No variable declarations in header files, please.
2008-08-18Fix the tile offset in miPaintWindow for ParentRelative windows.Fredrik Höglund1-2/+2
2008-08-13Eviscerate save-under support.Adam Jackson4-313/+2
Use a compositing manager already. Plus I really wanted to use 'eviscerate' in a commit message.
2008-07-31Unifdef XIDLE.Adam Jackson1-12/+0
Seriously how was this still here.
2008-07-24Sync is built-in and mandatory.Adam Jackson1-11/+2
2008-07-24XC-MISC is built-in and mandatory.Adam Jackson1-11/+2