Commit Graph

5371 Commits

Author SHA1 Message Date
Peter Hutterer
a88386ee27 Xi: only DeliverFocusedEvents if the event is not a pointer event.
A pointer device may have a focus class, but even if so, pointer events must
be delivered to the sprite window, not the focus window.
2008-04-10 14:42:26 +09:30
Peter Hutterer
4824942527 Xi: dont copy FocusClassRec if the master already has one.
Blindly copying will override the focus setting of the master. If there's XI
applications running, they may set the SD focus, while leaving the
MD's focus as it was. In this case, after a class swap we still want to get
the MD's events to the same window as before.
2008-04-10 14:36:10 +09:30
Peter Hutterer
bce6091c6b dix: Extend IsKeyboardDevice() to not include pointer devices.
If a pointer devices has key classes as well, don't register it as a keyboard
device. Let's see how much that change will break.
2008-04-10 09:59:45 +09:30
Peter Hutterer
cc7dab2d04 dix: Dont deliver grabbed pointer events to a focus window.
If an pointer event is being processed during a device grab, don't deliver it
to the focus window, even if the device has a focus class. Reason being that
some pointers may have a focus class, thus killing drag-and-drop.
2008-04-10 09:58:50 +09:30
Peter Hutterer
df2545b98d xfree86: Sanity check before retrieving the paired device.
Some pointer devices send key events [1], blindly getting the paired device
crashes the server. So let's check if the device is a pointer before we try to
get the paired device.

[1] The MS Wireless Optical Desktop 2000's multimedia keys are sent through
the pointer device, not through the keyboard device.
2008-04-10 08:50:43 +09:30
Peter Hutterer
5a4c6621aa Xi: some extra checks for validity of kbd and mouse.
Floating SDs are paired with themselves, so the paired device may not be a
proper keyboard or mouse. Put some extra checks in to avoid dereferencing a
nullpointer later.
2008-04-10 08:29:05 +09:30
Peter Hutterer
8e0a652930 dix: When floating, set sprite to NULL before calling InitializeSprite.
InitializeSprite won't create a new one if it already exists, with the result
of overwriting the master's sprite. This master sprite is then assigned to the
floating slave, and freed when the slave is reattached later.
Setting the sprite to NULL forces InitializeSprite to alloc a new one, and
this one can be freed without further repercussions.
2008-04-10 08:25:36 +09:30
Peter Hutterer
e7211eb0b3 Xi: When attaching, check for ptr -> ptr and keybd -> keybd.
Some pointer devices have key classes (e.g. MS Optical Desktop 2000). The
previous test was performed as Error if ptr -> keybd or keybd -> ptr. This
doesnt work with such devices. New test is Succeed if ptr->ptr or
keybd->keybd.
2008-04-10 08:08:54 +09:30
Peter Hutterer
389dae73cc Xi: If device "to" has a class but "from" doesn't, free the class in "to". 2008-04-09 08:26:00 +09:30
Peter Hutterer
60c38d248c Xi: plug memory leak, free previous motion history before allocating new. 2008-04-09 07:47:34 +09:30
Peter Hutterer
ea05cf0813 Xi: check if source has a key class before copying. 2008-04-08 22:09:11 +09:30
Peter Hutterer
6271df6953 xkb: don't overwrite CtrlProc in the second run of XkbFinishDeviceInit.
XkbFinishDeviceInit is called once when the device is initialised, but also
when a class copy causes the key class of a device to change. In this case, overwriting the CtrlProc of the KeybdFeedbackClass with XkbDDXKeybdCtrlProc sets up a nice recursive loop of XkbDDXKeybdCtrlProc calling itself until the cows come home.
2008-04-08 08:42:58 +09:30
Peter Hutterer
fd06e8f8c1 Merge branch 'master' into dcdc_rework
Conflicts:

	Xext/xevie.c
	dix/dispatch.c
2008-04-07 07:56:41 +09:30
Peter Hutterer
b46a009186 dix: sprite may be NULL, don't dereference it then.
In some rare cases (e.g. when the init fails) a device's sprite is NULL,
dereferencing it to xfree the spriteTrace is a bad idea then.
2008-04-06 09:02:57 +09:30
Peter Hutterer
638a50552e dix: remove debug error message about XI->core type conversion. 2008-04-06 08:36:21 +09:30
Peter Hutterer
8f38feb3e4 Xi: add comments for DeepCopyDeviceClasses, ChangeMasterDeviceClasses. 2008-04-05 20:37:21 +10:30
Julien Cristau
6c0cfe3d43 Fix the clock_gettime check for glibc-based non-Linux systems
We need to define _POSIX_C_SOURCE on glibc, not just Linux, so add a new
test for the __GLIBC__ macro.
2008-04-04 19:12:57 +02:00
Adam Jackson
cc7c045bae Fix PCI config space cycles from int10 emulator.
The top bit of 0xCF8 is an enable bit, not part of the domain.  Sending
cycles to domain 128 instead of domain 0 is rarely the right thing to do.
2008-04-04 12:58:12 -04:00
Eric Anholt
d1de3dda8e Fix clock_gettime presence detect on FreeBSD.
For non-Linux, _POSIX_C_SOURCE and friends restrict symbols defined rather
than enabling defines of symbols.  Additionally, CLOCK_MONOTONIC was
apparently added to the standard around 2000 anyway, not 1993.
2008-04-04 08:01:25 -07:00
Kristian Høgsberg
ec17900f52 Convert __DRIconfigs after we've made sure createNewScreen succeeded. 2008-04-04 10:47:46 -04:00
Kristian Høgsberg
16a8ce7558 Only autoload RECORD if it was enabled. 2008-04-04 10:47:46 -04:00
Peter Hutterer
d0395a7530 Xi: realloc to->valuator instead of allocing it blindly. 2008-04-04 15:05:26 +10:30
Peter Hutterer
502689847b Xi: ALLOC_COPY_CLASS_IF should only alloc if to->field doesn't exist. 2008-04-04 15:01:53 +10:30
Peter Hutterer
035b1b6995 Xi: remove duplicate copying of kbdfeed and ptrfeed. 2008-04-04 15:00:06 +10:30
Peter Hutterer
52fc7aed18 Xi: only alloc memory for feedback classes if it doesn't already exist. 2008-04-04 14:47:23 +10:30
Peter Hutterer
4eb87c8693 Xi: don't free device classes before copying them.
First commit in a series to come.
2008-04-04 14:20:37 +10:30
Dave Airlie
f0915fb3c4 quirk: add quirk for ACER EDID 2008-04-04 09:59:40 +10:00
Jeremy Huddleston
2e42b67b82 XQuartz: Change reporting of space change to debug log rather than stderr
(cherry picked from commit ed15556a9f)
2008-04-02 18:05:55 -07:00
Ben Byer
c737d04c75 The AppKit thread should not be calling directly into the X server
functions to change state when the keyboard is reloaded; instead,
pass it as an event.
(cherry picked from commit 7e653f806f)
2008-04-02 17:48:24 -07:00
Ben Byer
15b0084f1a formatting cleanup for X11Application.m (no code changes)
(cherry picked from commit eb083d3f68)
2008-04-02 17:48:15 -07:00
Ben Byer
e9e2d88436 moved and renamed QuartzMessageServerThread to
DarwinSendDDXEvent to make more clear what it actually does.
(cherry picked from commit bee2b377ef)
2008-04-02 17:48:01 -07:00
Ben Byer
c1be4e3379 shovelling code around ...
(cherry picked from commit 2143182ba4)
2008-04-02 17:47:59 -07:00
Ben Byer
985c631b2e just a bit of juggling headers around -- we're preparing
to call our Xquartz-specific event handlers directly
as mieqHandlers
(cherry picked from commit 4aedba5aa7)
2008-04-02 17:47:57 -07:00
Ben Byer
89f1d880e8 nuke DarwinEventQueue
(cherry picked from commit 1e0ec02202)
2008-04-02 17:47:52 -07:00
Jeremy Huddleston
8944b77ec0 continue with gutting darwinEvents.c
(cherry picked from commit c34fce7051)
2008-04-02 17:47:42 -07:00
Jeremy Huddleston
aa6d12e93e turns out we weren't actually using these files. oops
(cherry picked from commit bfec44d7b4)
2008-04-02 17:46:59 -07:00
Ben Byer
6c5962e447 remove vestigal DarwinEQPointerPost etc
(cherry picked from commit a25704c423)
2008-04-02 17:45:28 -07:00
Ben Byer
c6f0d5d1e5 gut darwinEQEnqueue, and make it just call mieqEnqueue (for the moment)
(cherry picked from commit a9e081a60c)
2008-04-02 17:45:23 -07:00
Ben Byer
5b6c273eaa add prototype for DarwinEventHandler
(cherry picked from commit 9a03ae33c4)
2008-04-02 17:45:20 -07:00
Ben Byer
3713be8b47 add logging of current thread ID to DEBUG_LOG macro
(cherry picked from commit 5848510cc5)
2008-04-02 17:45:17 -07:00
Ben Byer
1400a51ae7 Begin to move all of our Xquartz DDX-specific event handlers
to miEQ, in preparation to remove the DDX-specific code entirely.
(cherry picked from commit 3f4447b95f)
2008-04-02 17:45:09 -07:00
Jeremy Huddleston
8746daa673 XQuartz: Fixed missing close-paren in preference pane text.
(cherry picked from commit ea37e151dc)
2008-04-02 17:33:22 -07:00
Kristian Høgsberg
b5a0a865c3 Pick up dri2proto from the standard proto header include path. 2008-04-02 19:21:41 -04:00
Kristian Høgsberg
8cde0af3c5 Send the GLX_EXT_texture_from_pixmap attributes to the client. 2008-04-02 19:08:34 -04:00
Kristian Høgsberg
7c20f65fea Add @XORG_CFLAGS@ to satisfy xf86* includes.
Pointed out by Hasso Tepper.
2008-04-02 19:08:33 -04:00
Kristian Høgsberg
b13ab15689 dri2: Unbreak glcore visual setup. 2008-04-02 12:38:36 -04:00
Xiang, Haihao
b31de6a590 dri2: fix crasher if DRI2Connect fails 2008-04-02 16:29:30 +10:00
Hong Liu
ebc56aca8b Bug #15160: quirk Proview AY765C
prefer first detailed timing
2008-04-02 10:46:03 +08:00
Goneri Le Bouder
9500033b9e xfree86: don't crash in AutoConfig if the primary device is not pci
Only call matchDriverFromFiles() if we found a pci device.
Debian bug#472823 (http://bugs.debian.org/472823).
2008-04-01 20:23:38 +02:00
Thomas Jaeger
37b1258f0a XKB: Fix processInputProc wrapping
If input processing is frozen, only wrap realInputProc: don't smash
processInputProc as well.  When input processing is thawed, pIP will be
rewrapped correctly.

This supersedes the previous workaround in 50e80c9.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2008-04-01 15:31:50 +03:00