Commit Graph

12700 Commits

Author SHA1 Message Date
Laércio de Sousa
c73c36b537 xserver: enable InputClass option "GrabDevice" by default for non-seat0 seats (#69478)
This patch contributes to fill the remaining gaps which make
systemd-multi-seat-x wrapper still necessary in some multiseat setups.

This also replaces previous evdev patch that does the same thing
for that particular driver.

When option "-seat" is passed with an argument different from "seat0",
option "GrabDevice" for input devices is enabled by default
(no need of enabling it in xorg.conf's "InputClass" section).

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=69478

Signed-off-by: Laércio de Sousa <lbsousajr@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-09-25 03:52:54 +10:00
Peter Hutterer
160c2db32d dmx: provide enough space for axis mappings
relmap/absmap is used as a evdev-axis-to-x-axis mapping. ABS_X maps to
axis 0, ABS_Y to 1, etc. skipping over non-existing axes so that the third bit
set in the ABS_* range is axis 2, and so on. This requires us to actually have
enough space to have all the ABS_*/REL_* range.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-09-25 03:52:54 +10:00
Keith Packard
7d3d4ae55d damage: Must translate initial window damage by window offset
Damage is reported relative to the drawable origin, but the window
borderClip is absolute. Translate the region by the window position
before reporting damage to adjust.

Reported-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-09-20 17:42:13 -05:00
Jeremy Huddleston Sequoia
8010d3a48b XQuartz: pbproxy: Fix build with -DDEBUG
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2013-09-16 07:06:57 -07:00
Jeremy Huddleston Sequoia
39c548da0c XQuartz: Fix build with moved pseudoramiX
Regression from: e716baedc4

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2013-09-16 07:06:48 -07:00
Keith Packard
47ff382d1f Merge remote-tracking branch 'jturney/master' 2013-09-09 15:13:42 -07:00
Thomas Klausner
6f89ae3e64 Fix typo in configure warning.
Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-09-06 07:04:23 +10:00
Thomas Klausner
47218a6e09 Fix bug in cursor handling.
CreateCursor (Xlib call XCreatePixmapCursor) with a non-bitmap
source pixmap and a None mask is supposed to error out with BadMatch,
but didn't.

From der Mouse <mouse@Rodents-Montreal.ORG>, changed following
comments by Alan Coopersmith <alan.coopersmith@oracle.com>.

Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-09-06 07:04:18 +10:00
Chris Clayton
1110b71e36 kdrive: fix build error on gcc 4.8 for out-of-bounds array access
I'm getting a error building xorg-server-1.14.1.902 with thelatest snapshot
of gcc-4.8:

input.c:225:43: error: array subscript is above array bounds
[-Werror=array-bounds]

This is because kdNumInputFds can become equal to KD_MAX_INPUT_FDS in
KdRegisterFd(). This means that in KdUnregisterFd(), kdInputFds[j + 1] can
be beyond the end of the array.

Signed-off-by: Chris Clayton <chris2553@googlemail.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-09-06 07:04:17 +10:00
Marc Haesen
3752a81580 hw/xwin: Remove unnecessary and incorrect HWND casts
Signed-off-by: Marc Haesen <marha@users.sourceforge.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-08-30 14:22:22 +01:00
Jon TURNEY
34932cef6c hw/xwin: Fix compilation of winauth.c with -Werror=implicit-function-declaration
/jhbuild/checkout/xorg/xserver/hw/xwin/winauth.c: In function ‘MitGenerateCookie’:
/jhbuild/checkout/xorg/xserver/hw/xwin/winauth.c:87:5: error: implicit declaration of function ‘MitAddCookie’ [-Werror=implicit-function-declaration]

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Marc Haesen <marha@users.sourceforge.net>
2013-08-30 12:59:08 +01:00
Jon TURNEY
2a08554a0b hw/xwin: Remove unused extern g_fUseUnicode from winclipboardwndproc.c
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Marc Haesen <marha@users.sourceforge.net>
2013-08-30 12:59:06 +01:00
Jon TURNEY
69401f38a6 hw/xwin: Remove unneeded forward declaration of winProcessXEventsTimeout()
Remove unneeded forward declaration of winProcessXEventsTimeout(), the actual
definition immediately follows.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Marc Haesen <marha@users.sourceforge.net>
2013-08-30 12:59:03 +01:00
Jon TURNEY
9c45a1ad44 hw/xwin: Remove prototype for non-existent winDeinitClipboard()
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Marc Haesen <marha@users.sourceforge.net>
2013-08-30 12:59:00 +01:00
Jon TURNEY
acc46fc217 hw/xwin: Remove unused externs from winclipboardwrappers.c
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Marc Haesen <marha@users.sourceforge.net>
2013-08-30 12:58:58 +01:00
Jon TURNEY
fcc7767f8c hw/xwin: Remove unused winProcQueryTreeOrig variable
Unused since 47c7b6d3e6 "Remove no-longer needed
tricks used to prevent the clipboard client from being killed"

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Marc Haesen <marha@users.sourceforge.net>
2013-08-30 12:58:56 +01:00
Jon TURNEY
8fa882a980 hw/xwin: Fix ARGB cursor conversion on x86_64
Fix erroneous use of unsigned long * for lpBits in winXCursorToHCURSOR() which
leads to ARGB cursors being vertically streched on x86_64 by interleaving blank
rows of pixels.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Marc Haesen <marha@users.sourceforge.net>
2013-08-30 12:58:54 +01:00
Jon TURNEY
4bfb2dce5e hw/xwin: Fix an issue in winSetSpansNativeGDI() identifed by -Warray-bounds
The BITMAPINFO local only has room for a single RBGQUAD in bmiColors, but we
access two (black and white for a mono-color DIB).  Fix by changing to a dynamic
allocation big enough for a BITMAPINFO and a RGBQUAD.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Marc Haesen <marha@users.sourceforge.net>
2013-08-30 12:58:51 +01:00
Jon TURNEY
784c006adb hw/xwin: Fix -Warray-bounds warning in winXCursorToHCURSOR()
Rewrite winXCursorToHCURSOR() so access to BITMAPINFO bmiColors member doesn't
trigger an -Warray-bounds warning.

Note that the underlying storage is allocated as a BITMAPV4HEADER, so has
sufficent room for the extra RGBQUADs bmiColors after the BITMAPINFO bmiHeader.

wincursor.c: In function 'winSetCursor':
wincursor.c:293:24: error: array subscript is above array bounds [-Werror=array-bounds]
wincursor.c:294:24: error: array subscript is above array bounds [-Werror=array-bounds]
wincursor.c:295:24: error: array subscript is above array bounds [-Werror=array-bounds]
wincursor.c:296:24: error: array subscript is above array bounds [-Werror=array-bounds]
wincursor.c:297:24: error: array subscript is above array bounds [-Werror=array-bounds]
wincursor.c:298:24: error: array subscript is above array bounds [-Werror=array-bounds]
wincursor.c:299:24: error: array subscript is above array bounds [-Werror=array-bounds]
wincursor.c:300:24: error: array subscript is above array bounds [-Werror=array-bounds]

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Marc Haesen <marha@users.sourceforge.net>
2013-08-30 12:58:49 +01:00
Marc Haesen
41d03c9ccc hw/xwin: Correct size of _WINDOWSWM_NATIVE_HWND property on x86_64
Use the correct size of a HWND on x86_64 in XChangeProperty() and
XGetWindowProperty() calls for the _WINDOWSWM_NATIVE_HWND property.

Signed-off-by: Marc Haesen <marha@users.sourceforge.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-08-30 12:58:15 +01:00
Colin Harrison
390cfec10e hw/xwin: Correct winprefs.c function signatures for x64.
Correct SetupRootMenu(), SetupSysMenu(), HandleCustomWM_INITMENU() and
HandleCustomWM_COMMAND() function signatures which use unsigned long parameters,
where just a specific HWND or HMENU handle type should have been used.

Signed-off-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Marc Haesen <marha@users.sourceforge.net>
2013-08-30 12:56:35 +01:00
Jon TURNEY
e716baedc4 Move pseudoramiX code where it can be shared between Xwin and Xquartz
Move pseudoramiX code to a separate top-level directory.  Link Xwin and Xquartz
with libPseudoramiX

I'm not sure moving this to a top-level directory is appropriate, but I'm not
sure where else it fits.

Future work: pseudoramiX can probably be consolidated with the rrxinerama code
(which I think provides fake xinerama data when real XINERAMA is disabled and we
only have one screen)

v2: fix distcheck

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Marc Haesen <marha@users.sourceforge.net>
2013-08-30 12:52:30 +01:00
Jon TURNEY
ce0217b982 hw/xwin: Fix winglobals.h for MinGW64 build
Include pthread.h in winglobals.h to fix build with latest MinGW64 headers

In file included from
winmultiwindowicons.c:47:0:
winglobals.h:92:1: error: unknown type name ‘pthread_mutex_t’

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Marc Haesen <marha@users.sourceforge.net>
2013-08-30 12:52:27 +01:00
Jon TURNEY
b27756dbe6 hw/xwin: Fix inclusion of shlobj.h in MinGW64 build
Fix build with latest MinGW64 headers by wrapping Status type in shlobj.h as well

In file included from InitOutput.c:51:0:
/usr/i686-w64-mingw32/sys-root/mingw/include/shlobj.h:1231:44: error: expected identifier or ‘(’ before ‘int’
/usr/i686-w64-mingw32/sys-root/mingw/include/shlobj.h:1248:44: error: expected identifier or ‘(’ before ‘int’

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Marc Haesen <marha@users.sourceforge.net>
2013-08-30 12:52:24 +01:00
Peter Hutterer
94d4e29aed Xi: allow for XIAllowEvent requests larger than XI < 2.2 size (#68554)
XIAllowEvents changed length in XI 2.2 (for the touchid). A bug in libXi
causes libXi to always use the new request length if the server supports
2.2, regardless of the client's XIQueryVersion request.

The server takes the client's XIQueryVersion request into account though,
resulting in a BadLength error if a 2.[0,1] client calls XIAllowEvents on a
XI 2.2+ server.

Can't fix this in libXi, so work around this in the server.

X.Org Bug 68554 <http://bugs.freedesktop.org/show_bug.cgi?id=68554>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-08-30 14:26:55 +10:00
Peter Hutterer
82939e0239 dix: check for grab type before checking XI2 mask
if the grab type isn't XI2, grab->xi2mask is random. That random data may
have the enter/leave mask set, leading to events sent to the client that the
client can't handler.

Source of these errors:
  _xgeWireToEvent: Unknown extension 131, this should never happen.

Simplest reproducer:
   Start Xephyr, press button inside window, move out. As the pointer leaves
   the Xephyr window, the errors appear.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-08-30 14:26:55 +10:00
Peter Hutterer
16894df1ff Xi: replace loop with memset
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-08-30 14:26:55 +10:00
Peter Hutterer
8f2292b683 include: wrap EMASKSIZE in parentheses
Otherwise things like EMASKSIZE * foo will yield interesting results.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-08-30 14:26:55 +10:00
Peter Hutterer
d803f296c6 test: fix the gcc diagnostics pragma
pop without push restores the commandline options. The proper way is to
push, then ignore, then pop.

And while we're at it, change the pop argument to a comment - pop ignores
the argument, but be proper about it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-08-30 14:26:55 +10:00
Egbert Eich
05ea6307fa DIX/Xi: Pass correct client to CheckDeviceGrabAndHintWindow()
If we have a client which has registered for a DeviceButton grab
be sure to pass this to CheckDeviceGrabAndHintWindow(). Since the
order of clients is arbitrary there is no guarantee that the last
client in the list is the one that belongs to this class.

Signed-off-by: Egbert Eich <eich@freedesktop.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-08-30 14:26:55 +10:00
Eric Anholt
e01a3f65d3 ephyr: Fix warning about XID vs unsigned long * by changing function args
There's no reason to pass the data back out to the caller, since the
caller was dropping it on the floor.  The original data is a CARD32,
so no need to mess with weird unsigned longs.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-08-21 09:10:49 -07:00
Eric Anholt
f1cefe020b ephyr: Drop is_ok logging.
The only cases that lead to !is_ok are already EPHYR_LOG_ERROR, and it
fixes set-but-unused compiler warnings.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-08-21 09:10:48 -07:00
Eric Anholt
77c7a2014e kdrive: Fix const cast warnings in arguments processing.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-08-21 09:10:46 -07:00
Eric Anholt
7107937e47 kdrive: Fix const cast warnings in driver name handling.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-08-21 09:10:45 -07:00
Eric Anholt
56c405d46a kdrive: Fix a few easy cast warnings.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-08-21 09:10:44 -07:00
Eric Anholt
a9c48a07ee kdrive: Drop dead code.
This is unused as of the introduction of a helper in
e7150db535

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-08-21 09:10:41 -07:00
Eric Anholt
873ae962bd ephyr: Fix dead code warning.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-08-21 09:10:39 -07:00
Eric Anholt
34af2eebe1 ephyr: Fix const-cast warnings for setting window title.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-08-21 09:10:37 -07:00
Eric Anholt
7edf5066db ephyr: Fix const cast warnings in ephyrhostvideo.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-08-21 09:10:34 -07:00
Julien Cristau
fe7463b8ce dix: add missing include for DeleteWindowFromAnySelections
Fixes build error with XACE disabled:
window.c:886:5: error: implicit declaration of function 'DeleteWindowFromAnySelections' [-Werror=implicit-function-declaration]
     DeleteWindowFromAnySelections(pWin);
     ^

Debian bug#701372

Reported-by: Matthias Klose <doko@debian.org>
Signed-off-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-08-18 02:39:44 +02:00
Keith Packard
6a49f8836a Add .dir-locals.el
Enforce X.org style with an emacs configuration file

Signed-off-by: Keith Packard <keithp@keithp.com>
2013-08-17 12:17:36 +02:00
Keith Packard
f67d022523 Merge commit '9680f6a12d642c2e4bfa09bf459d678214059d74' 2013-08-06 07:12:12 +02:00
Alan Coopersmith
5a36cdd915 Allow disabling XFree86-DGA, DRI, VidModeExtension extensions
Code to recognize these in extension enable/disable options was wrapped
in #ifdef XorgLoader, but that's not defined when building miinitext.c
since the great module merge of 1.13.  Change to an #ifdef that is defined.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Robert Hooker <robert.hooker@canonical.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-08-06 06:39:55 +02:00
Peter Hutterer
9680f6a12d xfree86: de-duplicate some AM_CPPFLAGS
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-08-06 13:14:56 +10:00
Peter Hutterer
bbef8e46f2 Replace INCLUDES with AM_CPPFLAGS
newer automake gets quite noisy about this.
hw/xfree86/ddc/Makefile.am:7: warning:
'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
and many more of these.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-08-06 13:08:13 +10:00
Julien Cristau
c218ba8423 xfree86: improve check for posix saved ids
Replace hardcoded SVR4 || linux || CSRG_BASED with an autoconf check and
the _POSIX_SAVED_IDS macro.

Suggested-by: Mark Kettenis <mark.kettenis@xs4all.nl>
Signed-off-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-08-06 13:03:25 +10:00
Julien Cristau
930c6ff15d test: include dix-config.h in hashtabletest.c
Missing _XSERVER64 define caused inconsistent sizeof(XID) between the
test and hashtable code, leading to test failures on 64bit big endian
archs like s390x or ppc64.

Signed-off-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-08-06 13:02:36 +10:00
Maarten Lankhorst
b6e5c4669e test/xi2: fix protocol-xiqueryversion test
The old code was broken and allowed setting client version >= XIVersion,
this was fixed in the previous patch, but updating the value for XIVersion
broke the tests, so fix the tests too.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-08-01 14:56:54 +10:00
Maarten Lankhorst
500e844a24 Xi: Clamp XIClient maximal version to XIVersion
Do not allow setting client version to an arbitrary value >= XIVersion.
Fixes a test error with test/xi2/protocol-xiqueryversion.c, introduced by
commit 4360514d1c "Xi: Allow clients to ask for 2.3 and then 2.2 without failing"

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-08-01 14:51:41 +10:00
Dave Airlie
e1ab8f239b xfree86/man: document AutoAddGPU
This at least mentions AutoAddGPU and hints at when you might
want to disable it.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-08-01 14:45:56 +10:00