summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-02-25Allow for missing or disabled compat_outputHEADmasterKeith Packard4-17/+46
When the compat output is missing (I don't think this is actually possible), or is disabled (and hence has no crtc), we would like to avoid dereferencing NULL pointers. This patch creates inline functions to extract the current compat output, crtc or associated RandR crtc structure, carefully checking for NULL pointers everywhere. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-02-25Share enum definition for det_monrec_parameter sync_sourceKeith Packard1-2/+6
There were two separate enum definitions, one inside det_monrec_parameter struct and one for a local variable (which was then stored inside the struct). Sharing a single definition makes the code more obviously correct while making the compiler happier. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-02-25DRI2: initialize event->drawable in DRI2SwapEventRobert Bragg1-0/+2
We weren't initialising the drawable in the event structure so the client side DRI2WireToEvent used for translating the event into a GLX event wouldn't be able to lookup up the corresponding GLXDrawable before passing the event on. Signed-off-by: Robert Bragg <robert@linux.intel.com> Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-02-24Merge remote branch 'whot/for-keith'Keith Packard2-13/+0
2010-02-24glx: Compile fix to let server compile with new and old mesaKristian Høgsberg1-0/+7
We broke the __DRI2_FLUSH API since it was never released, but since it's taking a little longer than expected to get the X server side of the changes ready, fix things up so it compiles. Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-02-23dix: try to ring the bell even if the current device doesn't have one. (#24503)Peter Hutterer1-8/+0
Evdev devices do not have the bell proc set, but XTEST devices do. By exiting early, the bell only rings if the last keyboard used was the XTEST keyboard and hence the bell proc is still set on the master but not if an evdev keyboard was used last. The better approach here is to try to ring the bell on all devices attached to this master device in case one or more actually do produce an audible sound. That's also XKB's behaviour if XkbUseCoreKbd is specified as device identifier. X.Org Bug 24503 <http://bugs.freedesktop.org/show_bug.cgi?id=24503> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Adam Jackson <ajax@redhat.com>
2010-02-23dix: remove now-erroneous comment about frozen slave devices.Peter Hutterer1-5/+0
A direct grab on a slave device through XI2 detaches it, regardless of whether the grab is sync or async. So this comment doesn't apply to XI2 anyway. For XI1, aside from your life being miserable already, it doesn't matter as XI1 does not have a concept of attachment. You can freeze a device and if you don't freeze _all_ other devices at the same time, the master device can still happily send events to the client. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Adam Jackson <ajax@redhat.com>
2010-02-22xselinux: Bump extension minor version.Eamon Walsh1-1/+1
Changes introduced in this version: - 3 window-related requests now handle pixmaps also. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> Reviewed-by: Keith Packard <keithp@keithp.com>
2010-02-22xselinux: Rename window-related requests that now support pixmaps.Eamon Walsh2-14/+14
Renamed requests: SetWindowCreateContext -> SetDrawableCreateContext GetWindowCreateContext -> GetDrawableCreateContext GetWindowContext -> GetDrawableContext Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> Reviewed-by: Keith Packard <keithp@keithp.com>
2010-02-22xselinux: Allow GetWindowContext to be used for pixmaps as well.Eamon Walsh1-3/+11
Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> Reviewed-by: Keith Packard <keithp@keithp.com>
2010-02-22xselinux: Remove reference counting calls for SID objects.Eamon Walsh3-73/+20
Starting with libselinux 2.0.86, SID objects are no longer reference counted and the sidput() and sidget() calls are no-ops. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> Reviewed-by: Keith Packard <keithp@keithp.com>
2010-02-22Don't print a failure message when XACE denies an input event delivery.Eamon Walsh1-25/+25
A denial is normal and the behavior should be to drop the event. Having the log message creates excessive log spam. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> Reviewed-by: Keith Packard <keithp@keithp.com>
2010-02-22Revert "Remove some debug messages that trigger on XACE event delivery failure."Eamon Walsh1-3/+9
The log messages still need to be there for non-XACE failures. This reverts commit 4be354c4c2da5168b302601b91bd80cfaca7e193. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> Reviewed-by: Keith Packard <keithp@keithp.com>
2010-02-22libselinux now has a pkgconfig file. Use it.Eamon Walsh3-16/+3
Also remove HAVE_NETLINK_AVC_ACQUIRE_FD tests, because we now require a version of libselinux that has it. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> Reviewed-by: Keith Packard <keithp@keithp.com>
2010-02-22xselinux: Allow SetWindowCreateContext to be used for pixmaps as well.Eamon Walsh1-1/+1
Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> Reviewed-by: Keith Packard <keithp@keithp.com>
2010-02-22Always enable outputs that have been forced on in the configuration fileSimon Farnsworth1-1/+2
If the user has gone to the effort of manually enabling an output in the configuration file assume that they know what they're doing. X.org Bug 14611 <http://bugs.freedesktop.org/show_bug.cgi?id=14611> Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-02-22Merge remote branch 'whot/for-keith'Keith Packard5-72/+91
2010-02-22Xi: assume BadMode for non-BadMatch errors returned from SetDeviceMode.Peter Hutterer1-0/+10
The XI protocol spec only allows for two errors on the SetDeviceMode requests: BadMatch or BadMode. BadMode however is a dynamically assigned extension error and the driver doesn't have access to the actual error number. Hence, if a SetDeviceMode driver returns an error other than BadMatch, assume BadMode. The two exceptions are BadAlloc and BadImplementations, pass these on to the client (any request is allowed to return either of those). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-02-22Xi: assume BadMode for non-BadMatch errors returned from SetDeviceMode.Peter Hutterer1-0/+10
The XI protocol spec only allows for two errors on the SetDeviceMode requests: BadMatch or BadMode. BadMode however is a dynamically assigned extension error and the driver doesn't have access to the actual error number. Hence, if a SetDeviceMode driver returns an error other than BadMatch, assume BadMode. The two exceptions are BadAlloc and BadImplementations, pass these on to the client (any request is allowed to return either of those). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2010-02-22Re-enable RECORD extension.Chris Dekter5-72/+91
RECORD was disabled during the switch to internal events. This patch modifies the record callback to work with internal events instead of xEvents. The InternalEvents are converted to core/Xi events as needed. Since record is a loadable extension, the EventTo* calls must be externed. Signed-off-by: Chris Dekter <cdekter@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-02-17EXA/mixed: Clean up exaPrepareAccessReg_mixed() a little.Michel Dänzer1-12/+19
Signed-off-by: Michel Dänzer <daenzer@vmware.com> Acked-by: Maarten Maathuis <madman2003@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-02-17exa/mixed: fix gnome-panel corruptionMaarten Maathuis1-8/+13
- A mapped pixmap can't be used for acceleration, any decent memory manager will refuse this. - Source pixmaps migrated with a bounding region are incomplete (from the gpu point of view), so do the upload unconditionally, instead of just for deferred destination pixmaps. - Fixes fd.o bug #26076. Signed-off-by: Maarten Maathuis <madman2003@gmail.com> Acked-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-02-17os: Prevent core dump from being truncated.Rami Ylimaki9-14/+14
The problem fixed by this patch can be reproduced on Linux with the following steps. - Access NULL pointer intentionally in ProcessOtherEvent on key press. - Instead of saving core dump to a file, write it into a pipe. echo "|/usr/sbin/my-core-dumper" > /proc/sys/kernel/core_pattern - Dump the core by pressing a key. While the core is being dumped into the pipe, the smart schedule timer will cause a pending SIGALRM. Linux kernel stops writing data to the pipe when there are pending signals. This causes the core dump to be truncated. On my system I'm expecting a 6 MB dump but the size will be 60 kB instead. The problem is solved if we block the SIGALRM caused by expired smart schedule timer. I haven't been able to reproduce this problem in the following cases. - Save core dump to a file instead of a pipe. - kill -SEGV `pidof Xorg` - Press a key to dump core while gdb is attached to Xorg. - Give option -dumbSched to Xorg. Also note that the fix works only when NoTrapSignals has the default value FALSE. The problem can still be reproduced if error signals aren't trapped. In addition to pending SIGALRM, there is a similar problem with pending SIGIO from the keyboard driver during core dump. Signed-off-by: Rami Ylimaki <ext-rami.ylimaki@nokia.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-02-17os: Introduce OsAbort for proper core dumps.Rami Ylimaki2-0/+14
Signed-off-by: Rami Ylimaki <ext-rami.ylimaki@nokia.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-02-17parser: corrected xf86getBoolValue to use case insensitive compareOliver McFadden1-8/+8
commit c6e8637e29e0ca11dfb35c02da7ca6002ac8c597 introduced this regression; it can cause existing config files to be parsed incorrectly. Acked-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Oliver McFadden <oliver.mcfadden@nokia.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-02-17Solaris xf86OSRingBell() off-by-one error in filling iov[] arrayAlan Coopersmith1-2/+3
When generating sound buffers for /dev/audio bells, insert waveform for beep *or* silence, but not both, so we don't write one entry past the end of the iov buffer when the final bit of soundwave ends up in the final entry allocated in the iov array. Fixes OpenSolaris bug 6894890: http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6894890 Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-02-17Use C-style comments in x86emuMatt Turner2-4/+4
Signed-off-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-02-15XQuartz: Fix a possible buffer overrun in quartzAudioJeremy Huddleston1-18/+18
Also dropped deprecated API while there Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-02-15XQuartz: clang static analysis fixesJeremy Huddleston8-35/+37
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-02-15XQuartz: Fix linking (CloseInput())Jeremy Huddleston1-0/+6
Fixes regresison from d33adcdf03c69407d151e732fa0cf9947151eb19 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-02-15udev: Don't filter subsystem "input"Thomas Jaeger1-6/+0
This allows serial wacom devices to work, whose subsystem is "tty". Signed-off-by: Thomas Jaeger <ThJaeger@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-02-15xfree86: Reorder InputClass option prioritiesDan Nicholson4-20/+23
Currently the config and InputClasses are merged together so that the options from the config backend have the highest priority. This is bad since it means options such as a default XKB layout set by the backend cannot be changed by the user. This patch changes order of precedence to be: 1. xorg.conf 2. xorg.conf.d (later files have higher priority) 3. config backend In order to allow this ordering, the config parsing has been changed to read the xorg.conf.d files before xorg.conf. This has the consequence that the core device picking which looks for the first InputDevice may not find it in xorg.conf. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-02-15Xi: reset the sli pointers after copying device classes. (#25640)Peter Hutterer1-0/+20
If the indicator flags have the XkbSLI_IsDefault bit set, the indicator map and names aren't their own bit of memory but rather point into the device->key->xkbInfo->desc structure. XkbCopySrvLedInfo knows about this and leaves the pointers alone. When copying the classes from the slave to the master, these pointers are copied and still point to the dev->key class of the slave device. If the slave device is removed, the memory becomes invalid and a call to modify this data (e.g. XkbSetIndicators) may cause a deadlock. The copying of dev->key relies on dev->kbdfeed to be already set up. Hence the pointers need to be reset once _both_ kbdfeed and key have been copied into the master device. X.Org Bug 25640 <http://bugs.freedesktop.org/show_bug.cgi?id=25640> Fedora Bug 540584 <https://bugzilla.redhat.com/show_bug.cgi?id=540584> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2010-02-15dix: move config_init into the DDX.Peter Hutterer10-2/+46
The only DDX currently using hotplugging is the xfree86 one and it looks like it'll stay that way for a bit. Move the initialization to the DDX, since Xephyr, Xnest, and friends don't need HAL or udev notifications. Add CloseInput (counterpart to InitInput) to be able to clean up the config initialization from the DDX as well. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2010-02-12dix: restore lastDeviceEventTime update in dixSaveScreensJulien Cristau1-2/+7
This was removed in 6b5978dcf1f7ac3ecc2f22df06f7000f360e2066 (Do not reset lastDeviceEventTime when we do dixSaveScreens), but caused a regression for XResetScreenSaver. Add the lastDeviceEventTime update back, but restrict it to that case. X.Org bug#25855 <http://bugs.freedesktop.org/25855> Reported-by: Lubos Lunak <l.lunak@suse.cz> Tested-by: Lubos Lunak <l.lunak@suse.cz> Signed-off-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-02-12Don't double-swap the RandR PropertyNotify eventPeter Harris1-5/+0
The event is already swapped in randr.c/SRROutputPropertyNotifyEvent, so it should not be swapped here. X.Org Bugzilla #26511: http://bugs.freedesktop.org/show_bug.cgi?id=26511 Tested-by: Leonardo Chiquitto <leonardo@ngdn.org> Acked-by: Adam Jackson <ajax at redhat.com> Reviewed-by: Julien Cristau <jcristau at debian.org> Signed-off-by: Peter Harris <pharris@opentext.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-02-12xfree86: Add qxl driver to the autoconfig logicSoeren Sandmann1-0/+1
The qxl driver is for the QXL virtualized graphics device. Signed-off-by: Søren Sandmann Pedersen <ssp@redhat.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-02-12Bump to 1.7.99.901 -- 1.8 RC1xorg-server-1.7.99.901Keith Packard1-2/+2
2010-02-12Merge remote branch 'jturney/master'Keith Packard22-355/+502
2010-02-11Add tag matching to input attributes.Peter Hutterer8-0/+68
Tags may be a list of comma-separated strings that match against a MatchTag InputClass section. If any of the tags specified for a device match against the MatchTag of the section, this match is evaluated true and passed on to the next match condition. Tags are specified as "input.tags" (hal) or "ID_INPUT.tags" (udev), the value of the tags is case-sensitive and require an exact match (not a substring match). i.e. "quirk" will not match "QUIRK", "need_quirk" or "quirk_needed". Example configuration: udev: ENV{ID_INPUT.tags}="foo,bar" hal: <merge key="input.tags" type="string">foo,bar</merge> xorg.conf: Section "InputClass" Identifier "foobar quirks" MatchTag "foo|foobar" Option "Foobar" "on" EndSection Where the xorg.conf section matches against any device with the tag "foo" or tag "foobar" set. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Tested-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2010-02-11Add xstrtokenize to the dix.Peter Hutterer3-41/+46
Move tokenize out of the parser, make it a dix util function instead. Splitting a string into multiple substrings is useful by other places, so let's use it across the line. Future users include config/hal, config/udev and of course the parser. Example usage: char **substrings = xstrtokenize(my_string, "\n"); Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2010-02-11xfree86: Set fnmatch pathname flag for InputClass device matchingDan Nicholson1-1/+1
Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-02-11xfree86: Allow multiple arguments to InputClass matchesDan Nicholson4-29/+136
In order to keep the number of InputClass sections manageable, allow matches to contain multiple arguments. The arguments will be separated by the '|' character. This allows a policy to apply to multiple types of devices. For example: Section "InputClass" Identifier "Inverted Mice" MatchProduct "Crazy Mouse|Silly Mouse" Option "InvertX" "yes" EndSection This applies to the MatchProduct, MatchVendor and MatchDevicePath entries. Currently there is no way to escape characters, so names or patterns cannot contain '|'. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-02-11xfree86: Use "Ignore" option in InputClass to skip devicesDan Nicholson2-2/+37
Sometimes it is desirable to skip adding specific input devices to the server. The "Ignore" option is used similarly to Monitor sections so that matched devices will not be added. BadIDChoice is returned to the config backend so that it will clean up all resources. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-02-11xfree86: Handle config files ending without newlineDan Nicholson1-7/+19
The config parser expects to find a newline at the end of each line, so files ending without one would confuse it. A newline is inserted at the end of the buffer in these situations. Additionally, switching to the next config file is moved to the higher level to allow parsing of the last line of the previous file to complete before shifting the index and resetting the line number. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Tested-by: Stephan Raue<stephan.raue@gmx.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-02-11xfree86: Make InputClass docs and comments match realityDan Nicholson2-4/+4
Drivers and options specified in InputClass sections work on a "first match wins" strategy. Let's be consistent when documenting it. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-02-09Add labels for multitouch valuatorsBenjamin Tissoires2-0/+22
Thoses definitions have been included in the kernel but the X server is not updated accordingly. Without these definitions, the multitouch axes are not correctly labelled. Signed-off-by: Benjamin Tissoires <tissoire@cena.fr> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-02-05Cygwin/X: Avoid a collision between DEBUG and a token nameJon TURNEY2-3/+3
Rename a token to avoid a collision between DEBUG defined via AC_DEFINE if --enable-debug is configured, and the token for the 'debug' instruction in the XWin preferences file Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-02-05Cygwin/X: Avoid cursor size log spamJon TURNEY1-2/+1
Fedora 12 likes to use a 39x26 animated wait cursor. Avoid spamming the log with warnings that each frame can't be completely contained in the 32x32 native cursor Also reformat log message so it doesn't contain a '\n\t'. I mean, it's not like we might want to grep the log or something... Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-02-05Repair '-nolock'Jon TURNEY1-4/+0
commit 446fe9eecddd1337f9d5164dd7c301e1ba3dfe32 removes the AC_DEFINE for SERVER_LOCK and conditional compilation checking it, making it always on everywhere, except in os/utils.c where code is left under SERVER_LOCK, which now never gets built, making the '-nolock' option non-functional... This seems to have been broken since Xserver 1.7.0, but this option is actually of some slight use on cygwin, as if /tmp resides on a FAT filesystem (yes, I know...), hard links aren't supported. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>