Commit Graph

4395 Commits

Author SHA1 Message Date
Peter Hutterer
e96d926d64 Xi: remove trailing whitespaces. 2007-11-13 17:14:35 +10:30
Peter Hutterer
5031238aad dix: remove trailing/wrong whitespaces from devices.c and events.c 2007-11-13 16:58:23 +10:30
Peter Hutterer
c703849e79 dix: Attach spriteInfoRec to same memory block as the DeviceIntRec.
No need to alloc a separate one, we never do anything special with it anyway.
2007-11-13 16:50:18 +10:30
Peter Hutterer
51239f87ce dix: Send MappingNotify when keyboard maps change.
If a slave device is attached to a master device, then we need to send a
mapping notify to the client.
Mapping notify needs to be sent if
 - different slave device but on same master
 - different master

This gives you funny behaviour with the ClientPointer. When a
MappingNotify is sent to the client, the client usually responds with a
GetKeyboardMapping. This will retrieve the ClientPointer's keyboard mapping,
regardless of which keyboard sent the last mapping notify request. So
depending on the CP setting, your keyboard may change layout in each app...
2007-11-13 11:26:16 +10:30
Peter Hutterer
2b1d946392 xkb: disable xkb key repeats (temporarily)
Haven't quite figured out yet how to make these repeats work. Because we share
the class between devices, the key state is already set when we process the
master device's event, causing a repeat on each event.
2007-11-13 09:51:33 +10:30
Peter Hutterer
70b4087c4d dix: don't unconditionally update valuators during key events.
Master may not have valuators, device may not have valuators.
2007-11-12 13:10:39 +10:30
Peter Hutterer
23365d2865 dix: allow grab modifier device to be NULL.
This can happen if we check for a passive core grab and our device is a
floating slave device. Doesn't really change anything as SDs can't send core
events but it stops the server from segfaulting.
2007-11-12 13:08:38 +10:30
Peter Hutterer
5a7a65a3c9 mi: avoid SIGABRT by setting master_event to NULL. 2007-11-12 12:37:39 +10:30
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