summaryrefslogtreecommitdiff
path: root/hw
AgeCommit message (Collapse)AuthorFilesLines
2010-03-15hw/xfree86: move reference counting out of the UseHWCursor[ARGB] functionsHEADmasterRoland Scheidegger1-0/+6
The problem is that the xf86_use_hw_cursor(_argb) functions may get this correctly now, some drivers will replace these generic versions with their own functions. It is pretty insane to expect them to do reference counting of the cursor (as an example, look at driver/xf86-video-vmware to see how that looks like as a workaround). There are even places in xserver itself which replace these two functions. The segfaults if no reference counting is done are caused because the reference count of the cursor reached zero, hence the cursor was freed, however xf86CursorEnableDisableFBAccess() brought it back to life from the dead (from the SavedCursor). This patch hence adds reference counting in xf86CursorSetCursor. As per Michel Daenzer's suggestion, also free the cursor upon xf86CursorCloseScreen. In theory with this it should be possible to remove the reference counting in the UseHwCursor functions I think, though it should also be safe to keep them. Signed-off-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-03-15hw/xfree86: fix refcounting in xf86_use_hw_cursorRoland Scheidegger1-2/+2
This is the same fix as was done in fcdc1d78cca3b8bb6b77d53eda7e21d649df6943 for xf86_use_hw_cursor_argb. Signed-off-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-03-15Merge remote branch 'jeremyhu/master'Keith Packard4-12/+16
2010-03-15XQuartz: remove undefined XSERVER_CFLAGS variableGaetan Nadon4-5/+5
This is a variable local to configure.ac which is not AC_SUBST() It is undefined in any generated Makefile. Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-03-11XQuartz: Use an empty xkb keymap by defaultJeremy Huddleston2-11/+11
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-03-11XQuartz: Include os.h for OsAbort()Jeremy Huddleston1-0/+4
Fixes regression from 5b9a52be7e975e59e0bbc6b43539ecaff96b2ecd Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-03-11XQuartz: GLX: Fix prototype for swapBuffersJeremy Huddleston1-1/+1
This was a regression introduced by 04a54f69a8085ab3fe11a8713bd8b6b16ed1db27 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-03-11xfree86: fix xf86Config.c build error in --enable-debug mode. (#26971)Peter Hutterer1-1/+1
xf86Config.c: In function 'configInputDevices': xf86Config.c:1514: error: request for member 'lay_identifier' in something not a structure or union make[5]: *** [xf86Config.lo] Error 1 Introduced with e1165632bdfbd720889ed1adf5f7ab338032c0ee. X.Org Bug 26971 <http://bugs.freedesktop.org/show_bug.cgi?id=26971> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Dan Nicholson <dbn.lists@gmail.com>
2010-03-11xfree86: don't warn about nonexisting core pointer/keyboard in config.Peter Hutterer1-16/+8
In the vast majority of cases there is no xorg.conf that specifies a core pointer/keyboard. Skip this warning, since we'll get another notification about how the server relies on the config backend for input devices anyway. Leave the warning in for the error case (AEI off). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Fernando Carrijo <fcarrijo@yahoo.com.br> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2010-03-03Replace assembly with generic unaligned access codeMatt Turner1-162/+74
Removes Alpha assembly, and probably works around unaligned accesses on other sensitive platforms. Signed-off-by: Matt Turner <mattst88@gmail.com> Acked-by: Adam Jackson <ajax@redhat.com> Compiled-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-03-03dmx: fix OsAbort()-related build error in examples/xinput.cPeter Hutterer1-1/+1
5b9a52be7e975e59e0bbc6b43539ecaff96b2ecd changed the server to use OsAbort() instead of abort(). xinput in dmx is a client program though and fails to link if it tries to use OsAbort(). Switch it back to using abort(). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Fernando Carrijo <fcarrijo@yahoo.com.br> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Rami Ylimaki <ext-rami.ylimaki@nokia.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-02-25Allow for missing or disabled compat_outputKeith 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-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-17os: Prevent core dump from being truncated.Rami Ylimaki4-4/+4
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-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-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-15dix: move config_init into the DDX.Peter Hutterer8-0/+44
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-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-12Merge remote branch 'jturney/master'Keith Packard19-348/+486
2010-02-11Add tag matching to input attributes.Peter Hutterer5-0/+48
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 Hutterer1-41/+3
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-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-05Cygwin/X: Make transient windows resizable againJon TURNEY1-5/+38
Reverts the change which makes parented windows non-resizeable Because this was trying to do something which we should be doing, as an alternative we try checking WM_NORMAL_HINTS for windows which shouldn't be resizable If a window has a maximum size specified, no maximize box If a window has a fixed size (max size == min size, per EWMH 1.3 Implementation Notes), no resizing frame Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-02-05Cygwin/X: Discourage other WMs in multiwindow modeJon TURNEY1-5/+9
Tidying up of other WM detection code when ading SWT/Motif fix in commit 71519a572fe15b85c0eb2b02636c9e871f2c858f was rather over-agressive and now allows other WMs to think they can start when the internal WM is running. Revert to the behaviour of selecting ButtonPressMask events as well on the root window, so other WMs will be dissuaded from starting Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-02-05Cygwin/X: Update XWin man pageJon TURNEY1-171/+230
Restructure to group similar options and offer some commentary on those groups Review option descriptions, clarify and bring up-to-date Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-02-05Cygwin/X: Update DDX specific -help textJon TURNEY2-85/+104
Alphabetize options Review option descriptions, clarify and bring up to date Add missing option descriptions Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-02-05Cygwin/X: XSupportsLocale() failure is non-criticalJon TURNEY2-7/+3
Treat XSupportsLocale() returning false as non-critical to internal client theads startup, and issue a warning, not an error Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-02-05Cygwin/X: Report BUILDERSTRING with version informationYaakov Selkowitz2-0/+3
Report BUILDERSTRING with version information Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-02-05Cygwin/X: Copy the state of the Windows keyboard device to the Virtual Core ↵Jon TURNEY1-0/+4
Keyboard at startup. Otherwise, this happens lazily after the first keypress, which can lead to applications which are started from a shell window and inspect the keyboard state before a character is typed getting the wrong idea about the desired keymap (e.g. xemacs shows this behaviour) Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-02-05Cygwin/X: Tidy up system.XwinrcJon TURNEY1-1/+4
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-02-05Cygwin/X: Look for system.Xwinrc in SYSCONFDIR/X11Yaakov Selkowitz3-4/+6
Look for system.Xwinrc in SYSCONFDIR/X11 (usually /etc/X11) Rename sample system.Xwinrc file not to have a X11R6 path in it's name Add makefile install rule for system.XWinrc Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-02-05Cygwin/X: Update resources file and About dialogYaakov Selkowitz3-28/+27
Use the configured vendor web address in the About dialog Update resources file: rework About dialog, use 'MS Shell Dlg 2' logical font for all dialogs, add ellipsis to exit option in tray menu as it (may) trigger another dialog. Get short vendor name from xwin-config.h, like other configuration data presented in the About dialog box, rather than creating the PROJECT_NAME define Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-02-05Xming: Use 8 point font for URL in About dialogColin Harrison1-2/+2
Use an 8 point font for URL in About dialog, to match the rest of the text in that dialog Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2010-02-05Xming: Add a manifest fileColin Harrison2-0/+17
Use manifests to enable XP style controls (only effective for XP and later and when themes are enabled). The addition of manifests shouldn't cause compatibility problems with older Windows versions. Manifest must have execute permissions, otherwise attempts to execute XWin.exe in the same directory will fail... Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2010-02-05Cygwin/X: Window placement refinement for multiwindow modeJon TURNEY1-0/+7
Window placement refinement for multiwindow mode, ensure a window actually ends up somewhere visible if it tries to create itself offscreen (which can happen for e.g. if it has a stored position from a different sized display) Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-02-05Cygwin/X: Respect the system's ownership of the clipping regionJon TURNEY1-0/+3
Respect the system's ownership of the clipping region used for shaped windows Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-02-05Xming: Always update the Windows title Unicode (wide-character) in ↵Colin Harrison1-35/+25
-multiwindow mode. Apply the Windows title wide-character in -multiwindow mode. Windows should now display correct client X Window titles for locales with wide characters. Copyright (C) Colin Harrison 2005-2008 http://www.straightrunning.com/XmingNotes/ http://sourceforge.net/projects/xming/ Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>