summaryrefslogtreecommitdiff
path: root/hw
AgeCommit message (Collapse)AuthorFilesLines
2014-04-06XQuartz: Ensure we wait for the server thread to terminateJeremy Huddleston Sequoia1-3/+2
AKA: XQuartz 2.7.5 doesn't delete its /tmp/.X$d-lock http://xquartz.macosforge.org/trac/ticket/823 Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2014-04-03Add a return value to load_cursor_argb() to allow it to report failureMichael Thayer9-33/+49
load_cursor_argb() may need to be able to fail and have the server fall back to a software cursor in at least the following circumstances. 1) The hardware can only support some ARGB cursors and this does not just depend on cursor size. 2) Virtual hardware may not wish to pass through a cursor to the host at a particular time but may wish to accept the same cursor at another time. This patch adds a return value to the API and makes the server do the software fall-back on failure. Signed-off-by: Michael Thayer <michael.thayer@oracle.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-04-03Set a flag property on the root window to say if the X server VT is activeMichael Thayer3-1/+47
An X11 client may need to know whether the X server virtual terminal is currently the active one. This change adds a root window property which provides that information. Intended interface user: the VirtualBox Guest Additions. Signed-off-by: Michael Thayer <michael.thayer@oracle.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-04-03Merge remote-tracking branch 'krh/xwayland-for-keithp'Keith Packard10-2/+2537
2014-04-03Xwayland DDXKristian Høgsberg10-2/+2537
Started out as an Xorg module to be used from Xorg drivers to let Xorg run under a wayland server. The idea was to be able to reuse the 2D acceleration from the Xorg driver. Now with glamor being credible, a better plan is to just make Xwayland its own DDX, similar to Xwin and Xquartz. This is a much better fit, as much of the code in the original approach had to hack around Xorg doing Xorg things like take over the VT, probe input devices and read config files. Another big win is that Xwayland dosn't need to be setuid root. The Xwayland support for DRI3, Glamor and render nodes was done by Axel Davy <axel.davy@ens.fr>, who also did a lot of work on the rebase to the Xwayland DDX. Contributions from: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com> Corentin Chary <corentin.chary@gmail.com> Daniel Stone <daniel@fooishbar.org> Kristian Høgsberg <krh@bitplanet.net> Robert Bragg <robert@linux.intel.com> Scott Moreau <oreaus@gmail.com> Tiago Vignatti <tiago.vignatti@intel.com> Giovanni Campagna <gcampagn@redhat.com> Jonas Ådahl <jadahl@gmail.com> Ray Strode <rstrode@redhat.com> Trevor McCort <tjmccort@gmail.com> Rui Matos <tiagomatos@gmail.com> Axel Davy <axel.davy@ens.fr> Jasper St. Pierre <jstpierre@mecheye.net> Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Axel Davy <axel.davy@ens.fr>
2014-04-03Revert "glx: Make sure we get an FBConfig the root window's visual."Eric Anholt1-1/+0
This reverts commit b5a61239e2fef167c229154d7919ff862503e3f3. Not only did I screw up and introduce a warning, it turns out glXChooseFBConfig() explicitly ignores this attribute. Thanks, GLX. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Julien Cristau <jcristau@debian.org>
2014-04-03Merge remote-tracking branch 'whot/for-keith'Keith Packard7-8/+75
2014-04-03xf86LogInit: log to XDG_DATA_HOME when not running as rootHans de Goede3-4/+39
When no logfile was specified (xf86LogFileFrom == X_DEFAULT) and we're not running as root log to $XDG_DATA_HOME/xorg/Xorg.#.log as Xorg won't be able to log to the default /var/log/... when it is not running as root. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-04-01configure: Change DEFAULT_LOGPREFIX to really be a filename prefixHans de Goede1-1/+1
Rather then a full path prefix, this is a preparation patch for adding support for logging to another location when not running as root. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-03-27Fix build when configured --enable-debugJon TURNEY2-0/+2
Include os.h for ErrorF() to fix implicit-function-declaration warnings when configured with --enable-debug. hw/xfree86/parser/DRI.c: In function 'xf86parseDRISection': hw/xfree86/parser/DRI.c:87:5: error: implicit declaration of function 'ErrorF' [-Werror=implicit-function-declaration] hw/xfree86/parser/Extensions.c: In function 'xf86parseExtensionsSection': hw/xfree86/parser/Extensions.c:77:5: error: implicit declaration of function 'ErrorF' [-Werror=implicit-function-declaration] Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Julien Cristau <jcristau@debian.org>
2014-03-27Fix ephyr build with --disable-glamorJon TURNEY1-1/+4
See http://tinderbox.x.org/builds/2014-03-23-0010/logs/xserver/#build Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Tested-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Julien Cristau <jcristau@debian.org>
2014-03-27Build fbcmap_mi.c once, rather than once for each DDXJon TURNEY7-19/+3
Build fbcmap_mi.c once, rather than once for each DDX, and make it part of libfb or libwfb convenience library. Since 84e8de1271bb11b5b4b9747ae4647f47333a8ab7 we don't have fbcmap.c This is a sort of revert of 17d85387d1e6851d35474b65929e268ca64ef65b v2: Remove libkdrivestubs.la from configure.ac Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
2014-03-27Build Xi/stubs.c once as a convenience library, rather than once for each ↵Jon TURNEY3-6/+6
DDX which wants to use it Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
2014-03-27Build dpmsstubs.c once as a convenience library, rather than once for each ↵Jon TURNEY3-7/+7
DDX which wants to use it Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
2014-03-26Xephyr: restore initial window resize lost in xcb conversionJulien Cristau1-0/+6
The XResizeWindow call wasn't replaced by the xcb equivalent, so we were no longer setting the initial window size, only wm size hints. Regression from commit a2b73da "Xephyr: start converting hostx.c over to xcb" Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74849 Signed-off-by: Julien Cristau <jcristau@debian.org> Reported-by: Laércio de Sousa <lbsousajr@gmail.com> Tested-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-03-26glamor: Get testing code using small FBOs working againKeith Packard1-1/+3
Glamor has a mode where pixmaps will be constructed from numerous small FBOs. This allows testing of the tiled pixmap code without needing to create huge pixmaps. However, the render glyph code assumed that it could create a pixmap large enough for the glyph atlas. Instead of attempting to fix that (which would be disruptive and not helpful), I've added a new pixmap creation usage, GLAMOR_CREATE_NO_LARGE which forces allocation of a single large FBO. Now that we have pixmaps with varying FBO sizes, I then went around and fixed the few places using the global FBO max size and replaced that with the per-pixmap FBO tiling sizes, which were already present in each large pixmap. Xephyr has been changed to pass GLAMOR_CREATE_NO_LARGE when it creates the screen pixmap as it doesn't want to deal with tiling either. Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net>
2014-03-26kdrive: Remove duplicated definitions of some XV-related structs.Eric Anholt2-59/+4
v2: Fix crash because of removed strdup. (by Markus Wick) Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net> (v2)
2014-03-26xfree86: glamor_egl subdir must be distributed - breaks distcheckGaetan Nadon1-1/+1
Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net>
2014-03-26ephyr: typo where "()" should be "$()" in the Makefile - breaks make distGaetan Nadon1-1/+1
make[3]: Entering directory `/home/nadon/xorg/src/xserver/hw/kdrive/ephyr' make[3]: *** No rule to make target `()', needed by `distdir'. Stop. make[3]: Leaving directory `/home/nadon/xorg/src/xserver/hw/kdrive/ephyr' make[2]: *** [distdir] Error 1 Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net>
2014-03-26systemd-logind: Monitor systemd-logind going awayHans de Goede1-2/+32
When we're using server managed-fds through systemd-logind, systemd-logind *must* keep running while we are using it, as it does things like drmSetMaster and drmDropMaster for us on vt-switch. On a systemd-logind restart, we cannot simply re-connect since we will then get a different fd for the /dev/dri/card# node, and we've tied a lot of state to the old fd. I've discussed this with the systemd people, and in the future there may be a restart mechanism were systemd-logind passed fds from the old logind to the new logind. But for now there answer is simply: "Don't restart systemd-logind", and there never really is a good reason to restart it. So to ensure unpleasentness if people do decide to restart systemd-logind anyways (or when it crashes), monitor logind going away and make this a fatal error. This avoids getting a hard-hung machine on the next vt-switch and will hopefully quickly educate users to not restart systemd-logind while they have an X session using it active. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-03-26Buildsys: Create SUID_WRAPPER_DIR before using itHans de Goede1-0/+1
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-03-26suid: adding Xorg.sh.in to EXTRA_DIST is redundantGaetan Nadon1-1/+1
All files specified in AC_CONFIG_FILES get distributed automatically. Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-03-26suid: add generated Xorg.sh to hw/xfree86/.gitignoreGaetan Nadon1-0/+1
Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-03-25miinitext: introduce LoadExtensionList() to replace over LoadExtension()Emil Velikov8-30/+11
Looping around LoadExtension() meant that ExtensionModuleList was reallocated on every extension. Using LoadExtensionList() we pass an array thus the function can do the reallocation in one go, and then loop and setup the ExtensionModuleList. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Keith Packard <keithp@keithp.com> v2: Update ephyr [Keith Packard] v3: Eliminate const warnings in LoadExtensionList [Keith Packard] Signed-off-by: Keith Packard <keithp@keithp.com>
2014-03-22Add necessary headers for major()/minor() on Solaris to xf86Xinput.cAlan Coopersmith1-0/+4
Without these, after commit fdb4ec86c29d85c, it fails to build on Solaris, with errors of: xf86Xinput.c: In function 'xf86stat': xf86Xinput.c:816:5: error: implicit declaration of function 'major' [-Werror=implicit-function-declaration] xf86Xinput.c:817:5: error: implicit declaration of function 'minor' [-Werror=implicit-function-declaration] Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-03-22Merge remote-tracking branch 'jturney/master'Keith Packard16-87/+118
2014-03-22Merge remote-tracking branch 'jwrdecoede/for-keith'Keith Packard10-37/+403
2014-03-22hw/xwin: Fix WM_ENDSESSION crash on x86_64Jon TURNEY1-0/+4
We need to include xwin-config.h into winmsgwindow.c, so that _XSERVER64 is defined, so that the layout of ScreenRec type is correct, so that it's privates can be accessed correctly, so that the WM_GIVEUP message can be sent to the screen window. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-03-22hw/xwin: Improve NET_WM_ICON validationJon TURNEY1-6/+20
Check that we don't overrun the end of the property data while converting icons See http://cygwin.com/ml/cygwin-xfree/2013-06/msg00040.html for testcase. Also, some warning fixes in winXIconToHICON() Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-03-22hw/xwin: Remove obsolete control handling for About dialogJon TURNEY2-59/+0
Remove the unused, cygwin-specific handling for ChangeLog, UG and CG buttons in the About... Dialog. The buttons themselves were removed in commmit 34269a90ea2087f883f5dc8805894fc4998e4b81. Also remove those window control IDs which are now obsolete. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-03-22hw/xwin: Minimize redraw events after resizing/moving windows in multiwindow ↵Oliver Schmidt1-3/+19
mode In multiwindow mode the modal moving/resizing of windows causes a lot of redraw events to be sent to the X clients after the user releases the mouse button. During the moving/resizing client windows are not redrawn as long as the mouse button is pressed, but all redraw/resizing events are queued and executed step after step after the moving/resizing ends. Some clients collect and combine multiple redraw or resizing events, other clients (e.g. xterm) simply execute each redraw or sizing event. The enclosed patch minimizes the events for clients to only one event after the user releases the mouse button to end the moving/resizing. This improves the user experience and reduces strange screen flickerings, especially on slow platforms. The enclosed patch modifies winmultiwindowwndproc.c such that the windows events WM_ENTERSIZEMOVE and WM_EXITSIZEMOVE that are sent by Windows when the modal window resizing/moving begins or ends are considered. Only after WM_EXITSIZEMOVE is the redraw/resizing executed. Signed-off-by: Oliver Schmidt <oschmidt-mailinglists@gmx.de> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-03-22hw/xwin: Add '@<WM_CLIENT_MACHINE>' to window name when it's useful to do soJon TURNEY6-0/+59
Enhance GetWindowName() so it appends the result of XGetWMClientMachine() when it is available and useful to do so Add -hostintitle option to control this behaviour. Add documentation for this option to man page and -help text. Also, fix warning in UpdateName() v2: Provide a HOST_NAME_MAX definition for MinGW v3: Use '@host' rather than ' (on host)'. Don't add host if it's already in the title. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-03-22hw/xwin: Remove prototype for non-existent winMWExtWMUpdateIcon()Colin Harrison1-3/+0
winMWExtWMUpdateIcon() was removed in commit 527cf13135cfd279733060e0028bbfbe02be5167 Signed-off-by: Colin Harrison <colin.harrison@virgin.net> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-03-22hw/xwin: Use AllocDevicePair()Colin Harrison1-4/+5
Use AllocDevicePair() rather than allocating Windows keyboard and pointer devices individually. Signed-off-by: Colin Harrison <colin.harrison@virgin.net> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-03-22hw/xwin: Consistently use 'L' for long int constantsColin Harrison1-3/+3
Signed-off-by: Colin Harrison <colin.harrison@virgin.net> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-03-22hw/xwin: Remove an unneeded includeColin Harrison1-1/+0
Signed-off-by: Colin Harrison <colin.harrison@virgin.net> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-03-22hw/xwin: Use boolean AND rather than bitwise AND in WIN_POLLING_MOUSE_TIMER_IDColin Harrison1-3/+3
For clarity, use boolean AND rather than bitwise AND in WIN_POLLING_MOUSE_TIMER_ID processing. Signed-off-by: Colin Harrison <colin.harrison@virgin.net> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-03-22hw/xwin: Fix declaration after statement warning in ddxGiveUp()Colin Harrison1-2/+2
Signed-off-by: Colin Harrison <colin.harrison@virgin.net> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-03-22hw/xwin: Fix typo in commentColin Harrison1-1/+1
Signed-off-by: Colin Harrison <colin.harrison@virgin.net> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-03-22hw/xwin: Fix const discarded warning in winGenerateAuthorization()Jon TURNEY1-2/+2
Fix const discarded warning in winGenerateAuthorization() in !XCSECURITY case In function ‘winGenerateAuthorization’: hw/xwin/winauth.c:123:38: warning: passing argument 2 of ‘GenerateAuthorization’ discards ‘const’ qualifier from pointer target type [enabled by default] hw/xwin/winauth.c:99:1: note: expected ‘char *’ but argument is of type ‘const char *’ Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-03-17Merge remote-tracking branch 'anholt/glamor-megaseries'fooKeith Packard3-3/+30
2014-03-17glx: Make sure we get an FBConfig the root window's visual.Eric Anholt1-0/+1
Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2014-03-17glamor: Do glyph private init at screeninit time, and other stuff at CSR.Eric Anholt1-3/+0
This hasn't actually been a problem, since the server hasn't allocated any glyphs before our glyph private initialization during CreateScreenResources. But it's generally not X Server style to do things this way. Now that glamor itself drives both parts of glyphs setup, DDX drivers no longer need to tell glamor to initialize glyphs. We do retain the old public symbol so they can keep running with no changes. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Markus Wick <markus@selfnet.de>
2014-03-17xephyr: Don't forget to glViewport() before drawing the screen.Eric Anholt3-0/+29
Fixes misrendering with cairogears. I had noticed the failure while trying to figure out what was going on with traps. Cairogears was apparently putting its results on the screen through putimage, which is a texture upload, so the last GL drawing was done to the size of the cairogears window, not the size of the xephyr screen. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2014-03-13xf86Xinput: release server managed fd before removing the device from the listHans de Goede1-5/+5
So that the fd in use test in systemd_logind_release_fd works properly. Note we cannot change the test inside systemd_logind_release_fd as it must work for devices which were never added to the xf86InputDevs too. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-03-13systemd-logind: Correctly deal with InputDevs sharing a device-nodeHans de Goede1-0/+27
InputDevices may share a single device-node, this happens ie with Wacom tablets. This patch makes take_fd and release_fd properly deal with this, together with the earlier patch for updating the fd in all matching xf86InputDevs on pause / resume this completes support for such shared device-nodes. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-03-13systemd-logind: Add a systemd_logind_set_input_fd_for_all_devs helperHans de Goede1-10/+23
And use it where appropriate. Setting the fd for all matching InputDevices is necessary when we've multiple InputDevices sharing a single device-node, such as happens with Wacom tablets. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-03-13systemd_logind_find_info_ptr_by_devnum: Move to higher inside the fileHans de Goede1-14/+14
This is a preparation patch for adding support for server managed fds for InputDevices where multiple input devices share the same device node (and thus also their major and minor). Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-03-13systemd_logind_find_info_ptr_by_devnum: Add a start argumentHans de Goede1-3/+5
Modify systemd_logind_find_info_ptr_by_devnum to take a start argument, so that it can be used to find all occurences of a devnum in an InputInfo list, rather then just the first. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-03-12Remove config_odev_add_*attribute checks in various placesHans de Goede1-4/+1
Note that there are more callers but those were already not doing any error checking. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>