summaryrefslogtreecommitdiff
path: root/hw
AgeCommit message (Collapse)AuthorFilesLines
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>
2014-03-12config_odev*: Use XNF alloc functionsHans de Goede1-2/+3
config_odev* functions are called in code-paths were we already use XNF* functions in other places, so which are not oom safe already. Besides that oom is something which should simply never happen, so aborting when it does is as good a response as any other. While switching to XNF functions also fixup an unchecked strdup case. Note the function prototypes are kept unchanged, as they are part of the server ABI. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-03-12Xorg: Add a suid root wrapperHans de Goede6-2/+328
With the recent systemd-logind changes it is possible to install the Xorg binary without suid root rights and still have everything working as it should *if* the user only has cards which are supported by kms. This commit adds a little suid root wrapper, which is a bit weird, first we strip the suid-root bit of the Xorg binary, and then we add a wrapper ? The function of this wrapper is to see if a system still needs root-rights, if it does not (it supports kms and the kms drivers are properly loaded), then it will immediately drop all elevated rights before executing the real Xorg binary. If it finds (some) cards which don't support kms, or no cards at all, then it will execute the Xorg server with elevated rights so that ie the nvidia binary driver and the vesa driver can keep working normally. To make it possible for security concious users who don't need the root rights to completely remove the wrapper, Xorg is started in a 3 step process when the wrapper is enabled during build time: 1) A simple shell script which checks if the wrapper is there, if it is it executes the wrapper, if not it directly executes the real Xorg binary 2) The wrapper gets executed, does its checks, normally drops all elevated rights and then executes the real Xorg binary 3) The real Xorg binary does its thing This allows distributions to put the wrapper binary in a separate package, and will allow users to remove this package. IE the plan with Fedora is to make "legacy" drivers depend on the wrapper pkg, and since our default install contains some legacy drivers it will be part of the default install, but users can later yum remove it (which will also automatically remove the legacy driver packages as those won't work without it anyways). The wrapper is loosely modelled after the existing Debian Xwrapper, it uses the same config-file + config-file format, and also allows restricting Xserver execution (through the wrapper) to console users only. There also is a new needs_root_rights config file directive, which can be used to override the auto-detection the wrapper does. Hopefully this will allow Debian to replace their own wrapper with this upstream one. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-03-11Merge remote-tracking branch 'whot/for-keith'Keith Packard1-2/+20
2014-03-11xfree86: handle xorg.conf devices with logindPeter Hutterer1-2/+20
Only devices from the config backend have their attributes set, devices from the xorg.conf only have Option "Device". That option is also set by the config backend, so use it. And since the config backend sets our major/minor but xorg.conf devices don't have that set, make sure we try to stat it first where needed. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2014-03-10Require video drivers to report that they support server managed fdsHans de Goede2-2/+15
This makes how we handle video drivers identical to what we do for input drivers, and this should make live easier for old non kms drivers. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
2014-03-10xf86platformBus: Make doPlatformProbe accept a NULL gdev argumentHans de Goede1-9/+5
And use it from xf86platformAddDevice too, instead of directly calling drvp->platformProbe. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
2014-03-10systemd-logind: Fix vt-enter not working when using a legacy video driverHans de Goede1-1/+2
If there is only a single non kms video device (tested with the vesa driver), then we will never get a resume signal for a drm node, so also call vtenter when we get a resume for an input device. Notes: 1) vtenter checks if it is ok to do the vtenter, so if there are kms video devices the calls for input device resumes are a nop 2) This assumes that there will always be at least one server event fd supporting input device. Since all non legacy input-drivers will be patched to supported server fds this seems a safe assumption. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-03-07Merge remote-tracking branch 'jwrdecoede/for-keith'Keith Packard12-46/+738
2014-03-07Fix xephyr build in --disable-glamor caseJon TURNEY1-3/+8
It broke after commit 9fe052d90cca90fdf750d3a45b151be2ac7f0ebd "xephyr: Build support for rendering with glamor using a -glamor option." See http://tinderbox.x.org/builds/2014-03-07-0004/logs/xserver/#build Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net>
2014-03-05glamor: Add support for DRI3.Eric Anholt1-1/+4
The render-nodes case is untested. v2: Add a flag for wayland to suppress the native DRI3 support. Wayland isn't running as a master itself, so it can't do the auth on its own and has to ask the compositor to do it for us. Dropped XXX about randr provider -- the conclusion from discussion with keithp was that if the driver's dri3_open for a provider on a different screen, that's a core dri3 bug. v3: Don't put quite so much under GLAMOR_NO_DRI3, and add a comment explaining what this is about. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-03-05xorg: Connect up the glamor XV code, xorg DDX-only for now.Eric Anholt1-0/+1
Porting this code to be non-xorg-dependent is going to take significant hacking, so just dump it in the glamoregl module for the moment, so I can hack on it while regression testing. v2: Fix compiler warnings by adding #include dix-config.h at the top, don't try to auto-init (I'll try to fix the xv ABI later). v3: Fix last minute breakage of having reintroduced xf86ScrnToScreen (one of the compat macros). Just use the drawable's pScreen instead. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-03-05xorg: Build a glamor_egl module.Eric Anholt2-1/+45
This is not exposing the API we want long term, but it should get existing DDX drivers up and running while we massage the API into shape. v2: Use LIBADD instead of LDFLAGS to fix deps on libglamor.la, and use version 0.5.1 (the point it was forked from the external repo). Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-03-05xephyr: Pass incoming XCB events to the Xlib event filter.Eric Anholt3-2/+55
This is the same thing that Qt ended up doing to get DRI2's event mangling to happen despite using an XCB event loop. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-03-05xephyr: Build support for rendering with glamor using a -glamor option.Eric Anholt7-16/+554
v2: Avoid making the Ximage for the screen that we'll never use, and drive the screen pixmap creation for glamor ourselves. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Keith Packard <keithp@keithp.com> (v1) Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-03-03hw/xwin: More closely follow ICCCM for setting input focusJon TURNEY1-18/+59
In multiwindow mode, more closely follow ICCCM section 4.1.7 when setting X input focus to a window when the native Windows window acquires input focus: - If InputHint is FALSE, don't use XSetInputFocus() - If the window supports the WM_TAKE_FOCUS protocol, send a WM_TAKE_FOCUS message This helps JDK 1.7 clients acquire the focus correctly. Also, factor out checking client support for a given WM_PROTOCOLS protocol as a separate function. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-03-03hw/xwin: Remove unnecessary casts from malloc/realloc/calloc callsColin Harrison12-49/+35
Remove unnecessary casts from malloc/realloc/calloc calls. This is the style used for the majority of X server code. Signed-off-by: Colin Harrison <colin.harrison@virgin.net> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-03-03hw/xwin: Add missing FORCEEXIT token to XWin configuration file lexerColin Harrison1-0/+1
Somehow this was left out of commmit f3fad371cce0f3836514ad5b29e59fa1ca0627a7 Signed-off-by: Colin Harrison <colin.harrison@virgin.net> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-03-03hw/xwin: Silence bell when volume is zeroColin Harrison1-1/+1
Allow the bell to be turned off with X server option '-f 0', or by 'xset b off'. Signed-off-by: Colin Harrison <colin.harrison@virgin.net> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-03-03hw/xwin: Fix typo in commentColin Harrison1-1/+1
'i' before 'e' except after 'c' Signed-off-by: Colin Harrison <colin.harrison@virgin.net> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-03-03hw/xwin: Align parameter names in prototypes with definitionColin Harrison2-4/+4
A follow up to commits 2d9123fd, 451c5d91 and efe96a17, which changed the parameter name in the definition from index to i, to fix shadowing index() but didn't adjust the prototype declaration. Signed-off-by: Colin Harrison <colin.harrison@virgin.net> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>