Commit Graph

4387 Commits

Author SHA1 Message Date
Peter Hutterer a05f43bf3e dix: When the last slave is removed, set master to the original classes.
DeviceClassesChangedEvent is sent to the client, where device == new slave.
2007-11-12 11:35:18 +10:30
Peter Hutterer 7a81bafc9b Xi, dix: Add ability to change MD classes + send event when doing so.
Each time a different slave device sends through a master, an
DeviceClassesChangedEvent is enqueued. When this event is processed, all
classes of the matching master device are changed, and the event is sent to
the clients.

Next time the master is queried, it thus shows the evclasses of the last slave
device. The original classes are stored in the devPrivates.

TODO: if all slave devices are removed, the master's original classes need to
be restored.
2007-11-09 23:10:24 +10:30
Peter Hutterer c0a0580578 Xext: add simple macro to easily check a generic event's type. 2007-11-09 23:07:10 +10:30
Peter Hutterer 5bbc468b70 dix: grabbing an attached SD sets it floating for the duration of the grab. 2007-11-09 14:32:06 +10:30
Peter Hutterer 676b26ca3e Xi: notify the clients when the device hierarchy has been changed. 2007-11-09 14:31:54 +10:30
Peter Hutterer cb75f09146 dix: calloc root window's Generic Event mask, stops segfaults. 2007-11-09 14:31:41 +10:30
Peter Hutterer 59b304d8a2 dix, mi: stop segfaults when a floating device emits events.
For pointers: don't try to set master->valuator fields if there is no master.
For keyboards: check if device is valid before trying to access the fields in
miPointerGetScreen (btw. this disables DGA events for floating keyboards).

Also stop the hideous number of ErrorFs if we request the paired device for a
floating dev.
2007-11-08 15:44:18 +10:30
Peter Hutterer 3063f0c667 mi: change the device id to the master devices' when duplicating the event.
Move the event duplication into a CopyGetMasterEvent(), makes the code a bit
better to read.
2007-11-08 11:51:03 +10:30
Peter Hutterer 180220f284 Xi: return BadDevice for slave devices on ProcXSetClientPointer
Also clean up to return error codes instead of sending the error manually.
2007-11-08 10:00:35 +10:30
Peter Hutterer 184a7b8917 Merge branch 'mpx' into mdsd
Conflicts:

	Xi/opendev.c
2007-11-08 09:34:35 +10:30
Peter Hutterer 0b729051c0 Merge branch 'master' into mpx
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-07 15:37:23 +10:30
Peter Hutterer a8808ac3d0 Xi: don't call CheckMotion for slave devices.
This essentially disables enter/leave for slave devices, but re-enables them
for master devices. Which is a good thing after all.
2007-11-07 11:42:58 +10:30
Peter Hutterer 15944b8f02 mi: duplicate event before processing it, so master has original values
Event values may get changed in the event processing stage, so we need to
duplicate it to pump different events through for slave and master device.
2007-11-07 11:33:24 +10:30
Eamon Walsh d7c5e8bfc1 Modified performance patches from Arjan van de Ven <arjan@infradead.org>
Subject: [PATCH] fix some performance gaps in Xace

The XaceHook function is used in several hotpaths.
The problem with it (performance wise) is twofold:
 * The XaceHook function has a big switch() statement for the hook number in it
 * The XaceHook function uses varargs to reassemble the final dispatch arguments again

Both are expensive operations... for something that is known at compile time

This patch turns the hotpath XaceHook call into a direct call to avoid
the switch and varargs; this gives me over 10% performance gain
on the x11perf benchmark.
2007-11-06 16:26:09 -05:00
Dodji Seketeli aaa50b6411 resync with 'master' 2007-11-06 16:26:25 +01:00
Dodji Seketeli 868e303630 Xephyr: fix a crash when using xrandr twice
* hw/kdrive/ephyr/ephyr.c:
          (ephyrScreenFini): don't forget to
          free shadowfb data (if necessary) upon server is reset.
2007-11-06 16:24:46 +01:00
Elvis Pranskevichus ddce48ede0 Config: D-Bus: Fix dbus_bus_request_name failure check
The code in connect_hook incorrectly checks for dbus_bus_request_name failure.
The dbus_bus_request_name error indicator is -1, not 0. This leads
to subsequent assertion failure in libdbus.
2007-11-06 09:40:36 +00:00
Adam Jackson 58332894c0 Export the server ABI versions from xorg-server.pc 2007-11-05 17:18:46 -05:00
Dodji Seketeli 632c33c5c1 pull 'master' 2007-11-05 17:53:04 +01:00
Dodji Seketeli 4113f040c5 GL: fix crash at mesa destruction time
* GL/glx/glxglcore.c:
         (_glXMesaScreenDestroy): delete the same amount of visuals
         that those which were created in createMesaVisuals().
2007-11-05 17:33:01 +01:00
Daniel Stone dda10c9066 Remove all traces of external RGB database (and Speedo)
Remove all references to an external RGB database (which hasn't been enabled
for a very long time).  Also get rid of some references to Speedo fonts.
2007-11-05 16:28:35 +00:00
Dodji Seketeli 6ff79ea5f7 Xephyr: fix some DRI build breakage 2007-11-05 16:46:49 +01:00
Daniel Stone 5e363500c8 OS: Remove ALLOCATE_LOCAL from os.h
Remove ALLOCATE_LOCAL_FALLBACK and DEALLOCATE_LOCAL_FALLBACK from os.h, and
remove the include of Xalloca.h as well.
2007-11-05 14:38:28 +00:00
Daniel Stone 83e5d9e75d DIX: Remove last alloca call
Replace with heap allocations.
2007-11-05 14:36:54 +00:00
Daniel Stone 1179ddea94 EXA: Remove usage of alloca
Replace with heap allocations.
2007-11-05 14:36:36 +00:00
Daniel Stone 1eb6a1d0d2 XTrap: Remove usage of alloca
Replace with xalloc/xfree.
2007-11-05 14:34:47 +00:00
Daniel Stone 934281126f Xext: Remove usage of alloca
Replace with heap allocations.
2007-11-05 14:34:46 +00:00
Daniel Stone fb32bb9839 Xi: Remove usage of alloca
Replace with xalloc/xfree.
2007-11-05 14:34:46 +00:00
Daniel Stone 683ee1776d afb: Remove usage of alloca
Replace with heap allocations.
2007-11-05 14:34:45 +00:00
Daniel Stone ca75261bee cfb: Remove usage of alloca
Replace with xalloc/xfree.
2007-11-05 14:34:45 +00:00
Daniel Stone 914922fd61 DIX: Remove usage of alloca
Replace with heap allocations.
2007-11-05 14:34:43 +00:00
Daniel Stone 3b77689266 EXA: Remove usage of alloca
Replace with heap allocations.
2007-11-05 14:34:43 +00:00
Daniel Stone 34cdf06e4c fb: Remove usage of alloca
Replace with heap storage.
2007-11-05 14:34:42 +00:00
Daniel Stone 733d42065f XFree86: Remove usage of alloca
Replace with heap allocations.
2007-11-05 14:34:42 +00:00
Daniel Stone caf5450634 KDrive: Remove usage of alloca
Replace with heap allocations.
2007-11-05 14:34:42 +00:00
Daniel Stone d57060f167 DMX: Remove usage of alloca
Replace with heap allocations.
2007-11-05 14:34:42 +00:00
Daniel Stone def6f74f2d Xvfb: Remove usage of alloca
Replace with heap allocations
2007-11-05 14:34:42 +00:00
Daniel Stone 259f4c36d5 Xprint: Remove usage of alloca
Replace with heap-based allocations.
2007-11-05 14:34:42 +00:00
Daniel Stone 1c84337af0 Xwin: Remove usage of alloca
Replace with heap allocations.
2007-11-05 14:34:42 +00:00
Daniel Stone f7d5c292e4 mfb: Remove usage of alloca
Replace with heap-based allocations.
2007-11-05 14:34:42 +00:00
Daniel Stone be9ee17f96 mi: Remove usage of alloca
Replace with heap allocations.
2007-11-05 14:34:41 +00:00
Daniel Stone 3633ae6efb Damage: Remove usage of alloca
Replace with heap allocations.
2007-11-05 14:34:41 +00:00
Daniel Stone 2761c10331 OS: Remove usage of alloca
Replace with heap allocations.
2007-11-05 14:34:41 +00:00
Daniel Stone 2d738efb95 RandR: Remove usage of alloca
Replace with heap allocations.
2007-11-05 14:34:41 +00:00
Daniel Stone 3c1d2fdeff Record: Remove usage of alloca
Replace with xalloc/xfree.
2007-11-05 14:34:41 +00:00
Daniel Stone e0491f470e Render: Remove usage of alloca
Replace it with heap-based allocations.
2007-11-05 14:34:41 +00:00
Daniel Stone 59774af86b XKB: Remove usage of alloca
alloca has no way to return failure, and instead can possibly arbitrarily
overflow the stack.  Let's avoid that one.
2007-11-05 14:34:41 +00:00
Ben Byer 6e4f5cf83f changing ALLOCATE_LOCAL to xalloc to prevent stack overflow 2007-11-05 05:53:34 -08:00
Ben Byer b1764ddf13 pulling more patches over from xorg-xserver-1.2-apple branch 2007-11-05 05:45:21 -08:00
Ben Byer 10fde62fc8 more CVS tags 2007-11-05 05:45:21 -08:00