summaryrefslogtreecommitdiff
path: root/mi
AgeCommit message (Collapse)AuthorFilesLines
2010-05-04mi: don't thrash resources when displaying the software cursor across screensPeter Hutterer1-161/+108
This changes the DC layer to maintain a persistent set of GCs/pixmaps/pictures for each pScreen instead of failing to thrash between them when changing screens. Signed-off-by: Pierre-Loup A. Griffais <pgriffais@nvidia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Tested-by: Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commit 518f3b189b6c8aa28b62837d14309fd06163ccbb) Conflicts: mi/midispcur.c Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-05-02rootless: Add some sanity checking to miPaintWindowJeremy Huddleston1-0/+3
This avoids painting the root window when it isn't actually drawable. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> (cherry picked from commit 7b506fdc840aebed6b5acb91437a2cb620b5bddc)
2010-04-21Revert "mi: don't thrash resources when displaying the software cursor ↵Peter Hutterer1-111/+159
across screens" This commit leads to a segfault on the very first XTS test case. Backtrace: 0: /opt/xorg/bin/Xorg (xorg_backtrace+0x3b) [0x80a33db] 1: /opt/xorg/bin/Xorg (0x8048000+0x62a75) [0x80aaa75] 2: (vdso) (__kernel_rt_sigreturn+0x0) [0x5d140c] 3: /lib/libc.so.6 (0x9bb000+0x73579) [0xa2e579] 4: /lib/libc.so.6 (realloc+0xe0) [0xa2e830] 5: /opt/xorg/bin/Xorg (Xrealloc+0x33) [0x80a3f33] 6: /opt/xorg/bin/Xorg (0x8048000+0x1ab79) [0x8062b79] 7: /opt/xorg/bin/Xorg (0x8048000+0x1ac4e) [0x8062c4e] 8: /opt/xorg/bin/Xorg (RegisterExtensionNames+0x2ce) [0x8062fbe] 9: /opt/xorg/bin/Xorg (AddExtension+0x19a) [0x807bd7a] 10: /opt/xorg//lib/xorg/modules/extensions/libextmod.so (0x728000+0x1169a) [0x73969a] 11: /opt/xorg/bin/Xorg (InitExtensions+0x85) [0x80c0eb5] 12: /opt/xorg/bin/Xorg (0x8048000+0x1a51d) [0x806251d] 13: /lib/libc.so.6 (__libc_start_main+0xe6) [0x9d1bb6] 14: /opt/xorg/bin/Xorg (0x8048000+0x1a2a1) [0x80622a1] Segmentation fault at address 0x10b2d5f8 valgrind output: ==5069== Invalid read of size 4 ==5069== at 0x80F928D: FreePicture (picture.c:1531) ==5069== by 0x818DDEF: miDCDeviceCleanup (midispcur.c:867) ==5069== by 0x81B97F0: miSpriteDeviceCursorCleanup (misprite.c:968) ==5069== by 0x80995FA: miPointerDeviceCleanup (mipointer.c:292) ==5069== by 0x807973E: CloseDevice (devices.c:840) ==5069== by 0x80799B6: CloseDownDevices (devices.c:933) ==5069== by 0x8062705: main (main.c:309) ==5069== Address 0x4cce844 is 12 bytes inside a block of size 84 free'd ==5069== at 0x40057F6: free (vg_replace_malloc.c:325) ==5069== by 0x80A3DE0: Xfree (utils.c:1154) ==5069== by 0x80F9332: FreePicture (picture.c:1576) ==5069== by 0x80FBB4B: PictureDestroyWindow (picture.c:69) ==5069== by 0x810B1A3: damageDestroyWindow (damage.c:1840) ==5069== by 0x80864F1: FreeWindowResources (window.c:846) ==5069== by 0x8086812: DeleteWindow (window.c:925) ==5069== by 0x806B53E: FreeClientResources (resource.c:806) ==5069== by 0x806B60F: FreeAllResources (resource.c:823) ==5069== by 0x80626E4: main (main.c:299) ==5069== ==5069== Invalid write of size 4 ==5069== at 0x80F9295: FreePicture (picture.c:1531) ==5069== by 0x818DDEF: miDCDeviceCleanup (midispcur.c:867) ==5069== by 0x81B97F0: miSpriteDeviceCursorCleanup (misprite.c:968) ==5069== by 0x80995FA: miPointerDeviceCleanup (mipointer.c:292) ==5069== by 0x807973E: CloseDevice (devices.c:840) ==5069== by 0x80799B6: CloseDownDevices (devices.c:933) ==5069== by 0x8062705: main (main.c:309) ==5069== Address 0x4cce844 is 12 bytes inside a block of size 84 free'd ==5069== at 0x40057F6: free (vg_replace_malloc.c:325) ==5069== by 0x80A3DE0: Xfree (utils.c:1154) ==5069== by 0x80F9332: FreePicture (picture.c:1576) ==5069== by 0x80FBB4B: PictureDestroyWindow (picture.c:69) ==5069== by 0x810B1A3: damageDestroyWindow (damage.c:1840) ==5069== by 0x80864F1: FreeWindowResources (window.c:846) ==5069== by 0x8086812: DeleteWindow (window.c:925) ==5069== by 0x806B53E: FreeClientResources (resource.c:806) ==5069== by 0x806B60F: FreeAllResources (resource.c:823) ==5069== by 0x80626E4: main (main.c:299) XTS test case: Xproto pAllocColor This reverts commit 00b8b7ad61b6f818271fb4d1e383113170309d72. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-04-16mi: remove log-spamming bogus error message (#26843)Peter Hutterer1-21/+6
miSpriteRealizeCursor is called whenever a device is set floating and it's fine to do so, no need for an error message. Same goes for the other miSprite messages. X.Org Bug 26843 <http://bugs.freedesktop.org/show_bug.cgi?id=26843> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commit 241b53b77750b5eea6759e79b23be4ff270a3d1f)
2010-04-16mi: don't thrash resources when displaying the software cursor across screensPierre-Loup A. Griffais1-159/+111
This changes the DC layer to maintain a persistent set of GCs/pixmaps/pictures for each pScreen instead of failing to thrash between them when changing screens. Signed-off-by: Pierre-Loup A. Griffais <pgriffais@nvidia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commit 00b8b7ad61b6f818271fb4d1e383113170309d72)
2010-03-22mi: remove deprecated #include <X11/extensions/xf86bigfstr.h> in miinitext.cYaakov Selkowitz1-1/+1
Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Reviewed-by: Julien Cristau <jcristau@debian.org>
2009-12-18Add type name argument to CreateNewResourceTypeAlan Coopersmith1-3/+1
Convert all calls of CreateNewResourceType to pass name argument Breaks DIX ABI. ABI versions bumped: Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2009-12-18Ensure all resource types created have names registeredAlan Coopersmith1-0/+2
Calls RegisterResourceName to record the type name for use by X-Resource, XACE/SELinux/XTsol, and DTrace. Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2009-12-16Update Sun license notices to current X.Org standard formAlan Coopersmith1-28/+22
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-10-18Fix segfault when -extension XKEYBOARD is passed on the command lineAlan Coopersmith1-5/+23
Users should be told they can't disable XKB or XInput via error messages, not core dumps. Reported by T`2 on #xorg irc Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2009-09-27Rootless: Correct border rendering on parent-relative windowsJeremy Huddleston2-0/+22
Resurected code from the punted RootlessPaintBackground/Border and added it conditionally to miPaintWindow (cherry picked from commit cf2e3312cff3f341e9edba8c321a4ca7ffd8748e)
2009-09-27XQuartz: Transition from xEvent based mieq to InternalEventJeremy Huddleston1-1/+2
(cherry picked from commit a3dbde2de87ee4f577748a8c447501a3ea462559)
2009-09-26dmx: undefine MITSHM, move undefs to miinitext.c.Kevin E Martin1-0/+12
This patch undefines MITSHM for dmx - we don't support the required screen->ModifyPixmapHeaders. All undefines are moved from dmx-config to miinitext.c, where they belong. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-22input: don't use typecasts to access members of InternalEvent.Peter Hutterer1-6/+6
To avoid confusion, the member names are now postfixed with _event. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-20Eliminate bogus event resizing.Keith Packard2-11/+14
Now that all event queues hold internal events only, they never need to be resized. Resizing them led to memory corruption as they would get sized for an appropriate xEvent, not an internal event. Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-24mi: include shmint.h if needed, silence compiler warning.Peter Hutterer1-0/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-08mi: fix indentationTiago Vignatti1-14/+14
mieq.c looks indented-wise now. Let's see how long it will take to someone mess it again. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2009-08-08mi: fix cursor warping screensTiago Vignatti1-29/+38
The server was processing ET_RawMotion type when the cursor was wrapping to another screen and getting wrong valuator values. This fix such issue considering only ET_Motion, ET_KeyPress, ET_KeyRelease, ET_ButtonPress and ET_ButtonRelease types when the cursor detects a new screen, keeping the "normal" processing of device events. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-30mi: update master event copying to InternalEvents.Peter Hutterer2-29/+10
This is long overdue. The device events are InternalEvents now (and only one at a time), diminishing the need for an EventList for the master event. Furthermore, don't make masterEvent a static since this will interfere if mieqProcessDeviceEvent is called from somewhere else (e.g. XKB actions). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-30include: untangle events.h from the SDK headers.Peter Hutterer1-0/+1
InternalEvents shouldn't be used anywhere outside the X server itself. Split up into events.h for opaque typedefs for the events needed by various headers and eventstr.h for the actual struct definitions. eventstr.h must only be included by code that requires internal events and is not part of the SDK. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-25mieq: Protect from pDev=NULL in mieqEnqueue and mieqProcessInputEventsJeremy Huddleston1-6/+6
(cherry picked from commit bf60ffb49700da367f7f88983b042a88fef7219b)
2009-07-23mi: fix build error caused by missing xtest.hPeter Hutterer1-1/+1
xtest.h was renamed to xtestconst.h in xextproto. Requires xextproto 7.0.99.3 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-17Check dev->u.master if there is a custom event handler, tooPierre Willenbrock1-1/+3
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-17Always update u.lastSlavePierre Willenbrock1-3/+3
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-15Update to xextproto 7.0.99.1.Peter Hutterer3-9/+5
xextproto had Xlib client headers moved into libXext. Protocol header files are named fooproto.h, header files with constants foo.h or fooconst.h where foo.h was already in use for client-side headers.
2009-07-15Update to type-specific raw events - require inputproto 1.9.99.14.Peter Hutterer1-1/+5
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-06s/MAX_DEVICES/MAXDEVICES/ updates.Peter Hutterer1-1/+1
The number of input devices is MAXDEVICES, not MAX_DEVICES (f781a752e6) Two comments updated to refer to MAXDEVICES. MAX_FUNCS in sigio.c was set to 16 if MAX_DEVICES was undefined. If more than 15 physical input devices were present, this could result in a failure to install the SIGIO handler for any device above 15. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-18mi: ignore DGA events in ChangeDeviceIDDavid Miller1-0/+4
DGA events don't have a deviceid, so they don't need changing. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-03Merge branch 'master' into xi2Peter Hutterer1-5/+22
2009-06-03mi: only process master if the SD is still attached.Peter Hutterer1-1/+3
SDs may be detached during event processing (e.g. if a passive grab activates). In this case, the event must not be processed through the master device. Reported-by: Thomas Jaeger Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-29XQuartz: Fix alpha to be 1 (screenshots bug, etc)Jeremy Huddleston1-5/+22
This is related to: bc964ff1e3f3d8ab590eab40d767c6241e9480d4 XQuartz: Stab at fixing the alpha 0/1 bug (screenshots, etc) by pulling in some old code that got gutted from rootless. which was on the 1.4 branch and implemented in fbPaintWindow. Now that fbPaintWindow is gone, this is now in miPaintWindow(). (cherry picked from commit 032173f693f75385a40e144ffe2b7b5378bb6f2e)
2009-05-28Merge branch 'master' into xi2Peter Hutterer3-13/+16
Conflicts: Xext/geext.c Xi/chdevcur.c Xi/extgrbdev.c Xi/xiproperty.c configure.ac dix/ptrveloc.c hw/xfree86/common/xf86Config.c mi/mipointer.h test/input.c xkb/xkb.c
2009-05-22mi: use GetMaster() from MIPOINTER and MISPRITE.Peter Hutterer2-4/+4
Both may in some cases be called for a SD attached to a master keyboard. In this case, we need to get the right master device (i.e. the pointer). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-22input: introduce partial class copying depending on the event.Peter Hutterer2-14/+35
Copying all classes into the master device has drawbacks for hybrid devices (devices that are both mice and keyboards). If such a device posts an event, it's key classes are moved into the VCP. The key event itself is unaffected by keyboard grabs and the like. Partial class copying copies depending on the event and copies the classes into the right master device (i.e. the VCK for key events, the VCP for pointer events). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-22input: remove nested union from InternalEvent.Peter Hutterer1-18/+18
There's no need for internal events to be a struct with a single nested union, we might as well make the union itself the InternalEvent. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-22Input: rename DeviceIntRec->isMaster to ->type.Peter Hutterer3-14/+14
isMaster is not enough as long as we differ between master pointers and keyboard. With flexible device classes, the usual checks for whether a master device is a pointer (currently check for ->button, ->valuators or ->key) do not work as an SD may post an event through a master and mess this check up. Example, a device with valuators but no buttons would remove the button class from the VCP and thus result in the IsPointerDevice(inputInfo.pointer) == FALSE. This will become worse in the future when new device classes are introduced that aren't provided in the current system (e.g. a switch class). This patch replaces isMaster with "type", one of SLAVE, MASTER_POINTER and MASTER_KEYBOARD. All checks for dev->isMaster are replaced with an IsMaster(dev).
2009-05-22Split the signal-handler's lastSlave out into a separate variable.Peter Hutterer1-0/+3
dev->u.lastSlave was not signal safe since it was accessed by the DIX and during signal handling. Replaced with: 'dev->last.slave' for the signal handler's lastSlave (used to generate DeviceChangedEvents), . 'dev->u.lastSlave' for the DIX lastSlave (currently only used in change_modmap) Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-16mi: un-deprecate miPointerWarpCursorPeter Hutterer1-1/+1
This function was deprecated in ef68273f5bdb27a492ec0b69548ec4fbede46c08 because it didn't take a device argument. The device argument was added in 1c7568b8a1417257fa67c7fca69aa253099b9461 though, so the deprecation is obsolete. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-16mi: un-deprecate miPointerWarpCursorPeter Hutterer1-1/+1
This function was deprecated in ef68273f5bdb27a492ec0b69548ec4fbede46c08 because it didn't take a device argument. The device argument was added in 1c7568b8a1417257fa67c7fca69aa253099b9461 though, so the deprecation is obsolete. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-14Update several of my and/or Red Hat's licenses to standard form.Adam Jackson1-10/+11
2009-05-05mi: don't crash if we're trying to update the pointer for a keyboard.Peter Hutterer1-0/+3
If a device doesn't have a pointer, just return. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-01mi: don't crash if we're trying to update the pointer for a keyboard.Peter Hutterer1-0/+3
If a device doesn't have a pointer, just return. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-29Fix most remaining deprecated resource lookups.Eamon Walsh2-3/+5
Callsites updated to use dixLookupResourceBy{Type,Class}. TODO: Audit access modes to make sure they reflect the usage.
2009-04-24Merge branch 'master' into xi2Peter Hutterer1-1/+1
Conflicts: Xi/chdevhier.c include/input.h
2009-04-24mi: remove superfluous check.Peter Hutterer1-1/+1
mieqProcessInputEvents doesn't process events from MDs anymore, so we don't need to check for pDev->isMaster. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-19mi: add prototype for CopyGetMasterEvent.Peter Hutterer1-0/+7
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-19mi: fix wrong (*EnqueueEvent) declaration in miPointerScreenFuncRec.Peter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-19mi: fix compiler warning - explicitly typecast to InternalEvent.Peter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-09mi: fix wrong (*EnqueueEvent) declaration in miPointerScreenFuncRec.Peter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-09mi: fix compiler warning - explicitly typecast to InternalEvent.Peter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>