Commit Graph

5085 Commits

Author SHA1 Message Date
Peter Hutterer
23ae68a4c7 dix: before copying the classes the first time, set the VCK's classes to NULL.
XkbFinishDeviceInit does the following:
  xkbi->kbdProc= pXDev->kbdfeed->CtrlProc;
  pXDev->kbdfeed->CtrlProc= XkbDDXKeybdCtrlProc;

If we directly copy the device classes for the VCK, pXDev->kbdfeed->CtrlProc
at the time of copying is still XbkDDXKeybdCtrlProc. So at some point
XkbDDXKeybdCtrlProc is called, and calls itself, and calls itself, and...

Setting the device's classes to NULL seems to fix things. The memory isn't
lost, it gets stored into the devPrivates and freed at device closing time.
2008-02-26 15:35:28 +10:30
Peter Hutterer
ce9fb2f8c4 Xi: MDs return the paired device's ID in attached field of ListInputDevices. 2008-02-26 13:51:19 +10:30
Peter Hutterer
d61f481a44 Xi: remove GetPairedPointer handling.
obsolete, ListInputDevices provides this information now.
2008-02-25 17:52:45 +10:30
Peter Hutterer
27b2127893 Xi: remove ungrab handling of ExtendedUngrabDevice request.
This can be done by UngrabDevice, no need for separate codepaths.
2008-02-25 17:00:42 +10:30
Peter Hutterer
f14a62f823 dix: set evlen to the size of the reallocated memory.
What a good idea this is... I'm very proud of myself.
2008-02-19 21:44:10 +10:30
Peter Hutterer
750d702676 dix: Ensure enough memory for ClassesChangedEvent for a new device.
Before we enable the device through the driver, we size it up and make sure
that the events in the event list contain enough bytes for a possible
ClassesChangedEvent lateron.
2008-02-19 17:23:51 +10:30
Peter Hutterer
74628d6397 dix: change GetEventList to return length of list and set parameter in place.
Changing DDXs to use new prototype too.
2008-02-19 16:53:15 +10:30
Peter Hutterer
77dba004a9 dix: add InputEventListLen and SetMinimumEventSize
The latter is used to increase the amount of allocated memory for the event
list. This will be needed for ClassesChangedEvents that can be of more or less
arbitrary size (larger than 32 anyway).
2008-02-19 15:52:35 +10:30
Peter Hutterer
3fe64d8d27 Move input event list initialisation and storage from DDX to DIX.
Rather than letting the DDX allocate the events, allocate them once in the DIX
and just pass it around when needed.

DDX should call GetEventList() to obtain this list and then pass it into
Get{Pointer|Keyboard}Events.
2008-02-18 18:46:01 +10:30
Peter Hutterer
09a8fc5c7a Xi: make SizeDeviceInfo public and re-use from CreateClassesChangedEvent. 2008-02-18 18:42:46 +10:30
Peter Hutterer
6d9d18bf77 dix: add support for WindowAccessAllowAll in device access checking.
AllowAll is the last check before the parent window is checked. This allows
to override a DenyAll in the parent window in a simpler way than before (the
previous method required all devices to be in the permit list).
2008-02-18 17:25:15 +10:30
Peter Hutterer
088067c891 Xi: even if ChangeDeviceHierarchy fails, we may need to send an event.
Changes are committed instantly, so if at least one change was successful, we
must send an event to the client, even if subsequent ones fail.
2008-02-18 16:46:07 +10:30
Benjamin Close
660739c6bc dix: Handle the case where a device cursor was removed correctly
In the case that the device cursor was the first in the list of cursors
the window knew about, unsetting the cursor could lead to a segfault
due to pPrev being NULL. Instead catch the condition and correctly remove
the node from the list. Since there is no cursor now set on the device,
we simply return success as the parent windows cursor will propogate
down later.

Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au>
2008-02-18 16:39:19 +10:30
Peter Hutterer
24db282301 dix: set num_events to 1 by default. (no RawDeviceEvents anymore)
This should have been part of acb412d539.
2008-02-18 16:16:19 +10:30
Peter Hutterer
921c298c4c Xi: QueryDevicePointer doesn't have a shared field anymore. 2008-02-14 09:48:19 +10:30
Peter Hutterer
b885588756 Xi: remove FakeDeviceData calls. And one leftover from GrabAccessControl.
FakeDeviceData needs more thoughtful integration.
2008-02-14 09:47:31 +10:30
Peter Hutterer
c99a9a9729 Xi: remove raw device events.
Need to be better refined.
2008-02-14 09:43:49 +10:30
Peter Hutterer
b35a9efa16 Xi: Remove files for GrabAccessControl. 2008-02-14 09:42:37 +10:30
Peter Hutterer
b81c330f70 mi: remove RawDeviceEvent's ID changing. 2008-02-14 09:32:54 +10:30
Peter Hutterer
acb412d539 dix: Don't generate RawDeviceEvents anymore.
These events have been removed from the protocol pending some more refinement
and more thoughtful integration.
2008-02-14 09:29:50 +10:30
Peter Hutterer
0b0a097973 xkb: when copying the keymap, make sure the structs default to 0/NULL.
It actually does help if a pointer is NULL rather than pointing to nirvana
when you're trying to free it lateron. Who would have thought?
(cherry picked from commit 7a97ca667405a42d008265c3a870210cc1da97dd)
2008-02-09 08:03:01 +10:30
Peter Hutterer
9d5edebe96 Xi: finish XKB initialisation before copying the keymap. 2008-02-07 21:24:45 +10:30
Peter Hutterer
96eafa3d4f xkb: when copying sections, make sure num_rows is set too.
(cherry picked from commit 41991fb991)
2008-02-07 21:24:38 +10:30
Peter Hutterer
e5e531ce96 Merge branch 'master' into mpx
Conflicts:

	dix/events.c
2008-01-31 16:36:17 +10:30
Benjamin Tissoires
6c38682084 kdrive: AddInputClient takes a ClientPtr. 2008-01-31 15:51:32 +10:30
Peter Hutterer
1692dcf197 dix: print out event type if a bogus pointer event occurs. 2008-01-30 13:04:58 +10:30
Peter Hutterer
d954f9c803 xkb: don't update LEDs if they don't exist. (Bug #13961)
In some weird cases we call this function when there is no SrvLedInfo on the
device. And it turns out null-pointer dereferences are bad.

X.Org Bug 13961 <http://bugs.freedesktop.org/show_bug.cgi?id=13961>
2008-01-30 10:39:54 +10:30
Coleman Kane
df325be394 Bug 13101: xorg-server has a typo in hw/xfree86/os-support/bsd/i386_video.c
X.Org Bug #13101 <https://bugs.freedesktop.org/show_bug.cgi?id=13101>
Patch #12360 <https://bugs.freedesktop.org/attachment.cgi?id=12360>
2008-01-29 09:48:00 -08:00
Julien Goodwin
94f412cb7e Loader: Fix verbosity confusion
'Loading foo' is verbosity 3, whereas 'already built-in' is verbosity 0.
This means that gdm's log would just be full of bare 'module already
built-in' messages.
2008-01-29 14:46:15 +11:00
Julien Goodwin
442838fcb3 xorg.conf.man: Fix monitor/output confusion in monitor positioning
On the Intel driver at least, LeftOf/RightOf/Above/Below in xorg.conf refers
to output names, not monitor names.  Fix nomenclature in xorg.conf.man.
2008-01-29 14:46:15 +11:00
Peter Hutterer
5b8641a5fd xfree86: fix AlwaysCore handling. (Bug #14256)
Assume AlwaysCore being set by default, just like the other options.

X.Org Bug 14256 <http://bugs.freedesktop.org/show_bug.cgi?id=14256>
2008-01-29 10:01:42 +10:30
Peter Hutterer
975ab11799 config: don't reset connection info on disconnect.
If dbus is restarted, we try to connect again and this is difficult if the
busname and/or busobject is not set.
(cherry picked from commit 210eeef495)
2008-01-29 09:13:25 +10:30
Peter Hutterer
7dde5a694a config: check connection != NULL before getting dbus' dispatch status.
(cherry picked from commit d232665223)
2008-01-29 09:13:25 +10:30
Peter Hutterer
f0ba770716 config: only shutdown libhal if the connection is valid.
Thanks to libdbus' extensive use of assert we won't just get an error, it'll
bring the whole server down for us.
(cherry picked from commit fb07fab2c0)
2008-01-29 09:13:25 +10:30
Peter Hutterer
2cb0ebec2b config: add a debug message, fix a whitespace error.
(cherry picked from commit 7732898aaa)
2008-01-29 09:13:25 +10:30
Jeremy Huddleston
4fc2d3cef8 Rootless: RootlessEnsureFrame: Added check for !IsRoot
This was causing an issue with Apple-DRI and was reported here:
http://trac.macosforge.org/projects/xquartz/ticket/51
(cherry picked from commit 116800279d)
2008-01-28 12:25:29 -08:00
David Nusinow
16b0614c8c Merge commit 'upstream/master' 2008-01-26 16:13:25 -05:00
Peter Hutterer
0ac1755977 Merge branch 'master' into mpx
Conflicts:

	Xext/sampleEVI.c
2008-01-26 13:55:07 +10:30
Eamon Walsh
e915a26397 xselinux: Move the extension to extmod instead of being built-in. 2008-01-25 19:22:19 -05:00
Peter Hutterer
210eeef495 config: don't reset connection info on disconnect.
If dbus is restarted, we try to connect again and this is difficult if the
busname and/or busobject is not set.
2008-01-26 09:39:54 +10:30
Eamon Walsh
f6a78ee143 XACE: Remove the extension code entirely, XACE is completely static now. 2008-01-25 18:04:10 -05:00
Eamon Walsh
7724c30a75 XACE: Stop using fake requestVectors in favor of a simple hook call. 2008-01-25 17:28:17 -05:00
Eamon Walsh
f82329b081 XACE: Don't need to actually register a protocol extension. 2008-01-25 16:20:46 -05:00
Peter Hutterer
d232665223 config: check connection != NULL before getting dbus' dispatch status. 2008-01-25 13:54:47 +10:30
Peter Hutterer
fb07fab2c0 config: only shutdown libhal if the connection is valid.
Thanks to libdbus' extensive use of assert we won't just get an error, it'll
bring the whole server down for us.
2008-01-25 13:45:22 +10:30
Peter Hutterer
7732898aaa config: add a debug message, fix a whitespace error. 2008-01-25 11:50:07 +10:30
Eamon Walsh
46794d0c96 xselinux: Rename SelectionManager to more generic SecurityManager. 2008-01-24 19:49:13 -05:00
Peter Hutterer
466f655219 Xi: if deviceid is > 127 assume GE mask is for all devices (XiSelectEvent). 2008-01-25 10:27:30 +10:30
Peter Hutterer
379f057646 Xext: add GEDeviceMaskIsSet (GE mask checking per device)
If a mask was set for the NULL device, then we pretend the mask is set for all
devices.
2008-01-25 10:27:26 +10:30
Peter Hutterer
91dc8c43d2 Xi: Change window access right check to RecieveAccess in XiSelectEvent. 2008-01-25 10:27:21 +10:30