Commit Graph

7069 Commits

Author SHA1 Message Date
Keith Packard
991712f1e8 Merge remote-tracking branch 'ofourdan/for-keith' 2015-07-08 10:43:31 -07:00
Jon TURNEY
0cd228073a hw/xwin: printf format fixes for Pixel type
Pixel is CARD32, so inside the server has type unsigned int (x86_64) or unsigned
long (x86)

Cast to unsigned int and use a %u format

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2015-07-07 16:52:53 +01:00
Jon TURNEY
e3cfeb949a hw/xwin: printf format fixes for WPARAM and LPARAM types
Some Win32 API types are different fundamental types in the 32-bit and 64-bit

This problem is then further compounded by the fact that whilst both 32-bit
Cygwin and 32-bit MinGW use the ILP32 data model, 64-bit MinGW uses the LLP64
data model, but 64-bit Cygwin uses the LP64 data model.

This makes it impossible to write printf format specifiers which are correct for
all those targets, so we use some macros to provide the correct specifier for
the target.

LPARAM and WPARAM are integer types which can contain a pointer

LPARAM is long in ILP32 and long long in LLP64
WPARAM is unsigned int in ILP32 and unsigned long long in LLP64

Generally, these are just used to passs integer parameters, so for simplicity,
cast to int and use an int-compatible format

In the specific case of WM_CHANGECBCHAIN, they are used to pass HWND, so cast to
that type and print using an appropriate format.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2015-07-07 16:52:50 +01:00
Jon TURNEY
4f8661fac9 hw/xwin: printf format fixes for LONG type
Some Win32 API types are different fundamental types in the 32-bit and 64-bit
versions.

This problem is then further compounded by the fact that whilst both 32-bit
Cygwin and 32-bit MinGW use the ILP32 data model, 64-bit MinGW uses the LLP64
data model, but 64-bit Cygwin uses the LP64 data model.

This makes it impossible to write printf format specifiers which are correct for
all those targets

In the Win32 API, DWORD is an signed, 32-bit type.  It is defined in terms of a
long, except in the LP64 data model, where it is an int.

It should always be safe to cast it to int and use %d.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2015-07-07 16:52:47 +01:00
Jon TURNEY
aa83c61f51 hw/xwin: printf format fixes for DWORD type
Some Win32 API types are different fundamental types in the 32-bit and 64-bit
versions.

This problem is then further compounded by the fact that whilst both 32-bit
Cygwin and 32-bit MinGW use the ILP32 data model, 64-bit MinGW uses the LLP64
data model, but 64-bit Cygwin uses the LP64 data model.

This makes it impossible to write printf format specifiers which are correct for
all those targets

In the Win32 API, DWORD is an unsigned, 32-bit type.  It is defined in terms of
an unsigned long, except in the LP64 data model, where it is an unsigned int.

It should always be safe to cast it to unsigned int and use %u or %x.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2015-07-07 16:52:44 +01:00
Jon TURNEY
487f2595c9 hw/xwin: printf format fixes in xevents.c
Window and Atom types derive from XID, which is always unsigned long in client
code, so use %ld format specifier

XTextProperty.nitems is of type unsigned long, so use %lu format specifier

ulReturnBytesLeft is of type unsigned long, so use %lu format specifier

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2015-07-07 16:52:41 +01:00
Jon TURNEY
98798fcf0d hw/xwin: printf format fix in winProcessXEventsTimeout()
remainingTime is computed as a long int, so use %ld format specifier

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2015-07-07 16:52:38 +01:00
Jon TURNEY
5b6f511c2f hw/xwin: printf format fix in winCreateDefColormap()
Use %lu for unsigned long

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2015-07-07 16:52:35 +01:00
Jon TURNEY
eb67967156 hw/xwin: printf format fixes in winAllocatePrivates()
serverGeneration is of type unsigned long, so use %lu format specifier

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2015-07-07 16:52:32 +01:00
Jon TURNEY
0d6c499b99 hw/xwin: printf format fixes in winConfigKeyboard()
struct winInfoRec.keyboard members are of type long, not type int

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2015-07-07 16:52:29 +01:00
Jon TURNEY
ba468e003e hw/xwin: printf format fixes for XID type
XID inside the server has type unsigned int (x86_64) or unsigned long (x86)

Follow the example of the rest of the server and cast to unsigned int and use
a %u or %x format.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2015-07-07 16:52:26 +01:00
Jon TURNEY
dcb797b31f hw/xwin: printf format fixes for HWND type
HWND derives from HANDLE, a pointer type, so we should use the %p format

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2015-07-07 16:52:23 +01:00
Jon TURNEY
f1d1426667 hw/xwin: Ensure format warnings in winclipboard/
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2015-07-07 16:52:20 +01:00
Jon TURNEY
38f340b13e hw/xwin: Remove GetTickCount() from various pieces of debugging output
The use of %d format for the DWORD return value of GetTickCount() isn't
portable, but it doesn't seem to be worth fixing it when this information isn't
very useful (and is redundant to the timestamping of log messages we now have)

Instead just remove these uses of GetTickCount()

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2015-07-07 16:52:18 +01:00
Dave Airlie
e3624aa5fd xserver: fix build with glamor disabled.
This fixes modesetting when glamor is disabled.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2015-07-06 12:01:33 -07:00
Keith Packard
8a8d51358c Merge remote-tracking branch 'airlied/for-keithp' 2015-06-29 21:04:53 -07:00
Keith Packard
b22534d8e6 Merge remote-tracking branch 'jwrdecoede/for-keith' 2015-06-29 21:04:11 -07:00
Kenneth Graunke
13c7d53df8 modesetting: Implement page flipping support for Present.
Based on code by Keith Packard, Eric Anholt, and Jason Ekstrand.

v2:
- Fix double free and flip_count underrun (caught by Mario Kleiner).
- Don't leak flip_vblank_event on the error_out path (Mario).
- Use the updated ms_flush_drm_events API (Mario, Ken).

v3: Hack around DPMS shenanigans.  If all monitors are DPMS off, then
    there is no active framebuffer; attempting to pageflip will hit the
    error_undo paths, causing us to drmModeRmFB with no framebuffer,
    which confuses the kernel into doing full modesets and generally
    breaks things.  To avoid this, make ms_present_check_flip check that
    some CRTCs are enabled and DPMS on.  This is an ugly hack that would
    get better with atomic modesetting, or some core Present work.

v4:
- Don't do pageflipping if CRTCs are rotated (caught by Jason Ekstrand).
- Make pageflipping optional (Option "PageFlip" in xorg.conf.d), but
  enabled by default.

v5: Initialize num_crtcs_on to 0 (caught by Michel Dänzer).

[airlied: took over]
v6: merge async flip support from Mario Kleiner
free sequence after failed vblank queue
handle unflip while DPMS'ed off (Michel)
move flip tracking into its own structure, and
fix up reference counting issues, and add comments.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Acked-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2015-06-30 13:44:09 +10:00
Dave Airlie
4342369e84 modesetting: don't try and load dri2
Since we are shipped with the server and the server has it built-in,
don't bother trying to load it.

Don't remove or invert the if statement on purpose as a later
patch adds stuff in here.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-06-30 13:44:09 +10:00
Dave Airlie
edec6394a4 modesetting: drop unused struct in vblank.c
this isn't used anywhere here.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-06-30 13:44:09 +10:00
Kenneth Graunke
bf262b4300 modesetting: Implement an ms_drm_abort_seq() function.
This is a specialization of ms_drm_abort that matches based on the drm
event queue's sequence number.

Based on code by Keith Packard.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2015-06-30 13:44:09 +10:00
Kenneth Graunke
f2171d0a20 modesetting: Make ms_crtc_on non-static.
I want to use this in present.c.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2015-06-30 13:44:09 +10:00
Kenneth Graunke
f6853baeba modesetting: Improve the ms_flush_drm_events() API.
Previously, ms_flush_drm_events() returned a boolean value, and it was
very easy to interpret the meaning incorrectly.  Now, we return an
integer value.

The possible outcomes of this call are:
- poll() raised an error (formerly TRUE, now -1 - poll's return value)
- poll() said there are no events (formerly TRUE, now 0).
- drmHandleEvent() raised an error (formerly FALSE, now the negative
  value returned by drmHandleEvent).
- An event was successfully handled (formerly TRUE, now 1).

The nice part is that this allows you to distinguish errors (< 0),
nothing to do (= 0), and success (1).  We no longer conflate errors
with success.

v2: Change ms_present_queue_vblank to < 0 instead of <= 0, fixing an
    unintentional behavior change.  libdrm may return EBUSY if it's
    received EINTR for more than a second straight; just keep retrying
    in that case.  Suggested by Jasper St. Pierre.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2015-06-30 13:44:09 +10:00
Dave Airlie
7328fb3f2b modesetting: reverse prime support (v1.1)
This adds support for reverse prime to the modesetting driver.

Reverse prime is where we have two GPUs in the display chain,
but the second GPU can't scanout from the shared pixmap, so needs
an extra copy to the on screen pixmap.

This allows modesetting to support this scenario while still
supporting the USB offload one.

v1.1:
fix comment + ret = bits (Eric)

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-06-30 12:17:56 +10:00
Dave Airlie
a79fbfd707 modesetting: add output master support
This allows a glamor enabled master device to have
slave USB devices attached.

Tested with modesetting on SNB + USB.

It relies on the previous patch to export linear
buffers from glamor.

Acked-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-06-30 12:17:55 +10:00
Dave Airlie
ea0e4d752b glamor: add support for allocating linear buffers (v2)
We need this for doing USB offload scenarios using glamor
and modesetting driver.

unfortunately only gbm in mesa 10.6 has support for the
linear API.

v1.1: fix bad define
v2: update the configure.ac test as per amdgpu. (Michel)
set linear bos to external to avoid cache. (Eric)

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-06-30 12:17:55 +10:00
Dave Airlie
5c55560538 xf86: restrict when we auto add devices as gpu devices.
Michel pointed out I broke Zaphod with the initial auto add
gpu devices change,

Fix this, by only auto adding GPU devices if we are screen 0
and there are no other screens in the layout. Anyone who
wants to assign GPU devices can specify it in the xorg.conf
for this use case.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
2015-06-30 12:17:55 +10:00
Dave Airlie
5064ee276f xf86Rotate: remove unused macros.
These macros aren't used anywhere.

v1.1: drop comment (Aaron)

Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-06-30 12:17:55 +10:00
Dave Airlie
8218dadd30 cursor: drop ARGB_CURSOR
I doubt anyone builds with this turned off or has done for a long
time.

It helps my eyes bleed slightly less when reading the code, I've left
the define in place as some drivers use it.

Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-06-30 12:17:51 +10:00
Chris Wilson
3c859112d3 xwayland: keep temp files out of the client mask
Xwayland opens anonymous files for its sharing buffers, move these
file descriptors out of the range of the client select mask to avoid
reaching the maximum number of clients prematurely.

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

Tested-by: Olivier Fourdan <fourdan@gmail.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-06-25 14:11:35 +02:00
David Herrmann
780a69aff0 systemd-logind: do not rely on directed signals
Right now, Xorg does not install DBus matches for "PauseDevice" /
"ResumeDevice". Therefore, it should usually not receive those DBus
signals from logind. It is just a coincidence that systemd-logind sends
those signals in a directed manner right now. Therefore, dbus-daemon
bypasses the broadcast matches.

However, this is not ABI and Xorg should not rely on this. systemd-logind
is free to send those signals as broadcasts, in which case Xorg will
freeze the VT. Fix this by always installing those matches.

Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Keith Packard <keithp@keithp.com>
Reported-by: Jan Alexander Steffens <jan.steffens@gmail.com>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2015-06-23 09:42:31 +02:00
Hans de Goede
d3352d0987 Xorg.wrap.man: Fix spelling mistake in Xorg.wrap.1
This commit fixes a small mistake in Xorg.wrap.1 .

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2015-06-23 09:42:19 +02:00
Jeremy Huddleston Sequoia
9003a3e5c5 XQuartz: Silence -Wformat-security for NSRunAlertPanel
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2015-06-09 23:42:03 -07:00
Jeremy Huddleston Sequoia
3a6fa11575 XQuartz: Silence -Wunused-function
quartzKeyboard.c:741:1: warning: unused function 'macroman2ucs' [-Wunused-function,Unused Entity Issue]
macroman2ucs(unsigned char c)
^
1 warning generated.

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2015-06-09 23:42:03 -07:00
Jeremy Huddleston Sequoia
9fe7f5ccad XQuartz: Silence -Wunused-variable
X11Controller.m:939:9: warning: unused variable 'remain' [-Wunused-variable,Unused Entity Issue]
    int remain;
        ^

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2015-06-09 23:42:03 -07:00
Jeremy Huddleston Sequoia
0b9c324891 XQuartz: Silence -Wpointer-bool-conversion
X11Controller.m:417:17: error: address of function 'asl_log_descriptor' will always evaluate to 'true'
      [-Werror,-Wpointer-bool-conversion,Value Conversion Issue]
            if (asl_log_descriptor) {
            ~~  ^~~~~~~~~~~~~~~~~~
X11Controller.m:417:17: note: prefix with the address-of operator to silence this warning [Semantic Issue]
            if (asl_log_descriptor) {
                ^
                &

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2015-06-09 23:42:02 -07:00
Jeremy Huddleston Sequoia
7761106639 XQuartz: GLX: Use __glXEnableExtension to build extensions list
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2015-06-09 23:05:22 -07:00
Hans de Goede
c88a325899 systemd-logind: Only use systemd-logind integration together with keeptty
systemd-logind integration does not work when starting X on a new tty, as
that detaches X from the current session and after hat systemd-logind revokes
all rights any already open fds and refuses to open new fds for X.

This means that currently e.g. "startx -- vt7" breaks, and breaks badly,
requiring ssh access to the system to kill X.

The fix for this is easy, we must not use systemd-logind integration when
not using KeepTty, or iow we may only use systemd-logind integration together
with KeepTty.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Aaron Plattner <aplattner@nvidia.com>
2015-06-03 11:31:47 +02:00
Hans de Goede
81bcada14e linux: Add a may_fail paramter to linux_parse_vt_settings
linux_parse_vt_settings() was split out of xf86OpenConsole so that it can
be called earlier during systemd-logind init, but it is possible to run
the xserver in such a way that xf86OpenConsole() is never used.

The FatalError calls in linux_parse_vt_settings() may stop the Xorg xserver
from working when e.g. no /dev/tty0 is present in such a setup.

This commit adds a may_fail parameter to linux_parse_vt_settings() which
can be used to make linux_parse_vt_settings() fail silenty with an error
return in this case, rather then calling FatalError().

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-06-03 11:31:41 +02:00
Hans de Goede
1dba5a0b19 linux: Add linux_parse_vt_settings and linux_get_keeptty helpers
systemd-logind integration does not work when starting X on a new tty, as
that detaches X from the current session and after hat systemd-logind revokes
all rights on any already open fds and refuses to open new fds for X.

This means that currently e.g. "startx -- vt7" breaks, and breaks badly,
requiring ssh access to the system to kill X.

The fix for this is easy, we must not use systemd-logind integration when
not using KeepTty, or iow we may only use systemd-logind integration together
with KeepTty.

But the final KeepTty value is not known until the code to chose which vtno to
run on has been called, which currently happens after intializing
systemd-logind.

This commit is step 1 in fixing the "startx -- vt7" breakage, it factors out
the linux xf86OpenConsole bits which set xf86Info.vtno and keepTty so that
these can be called earlier. Calling this earlier is safe as this code has
no side effects other than setting xf86Info.vtno and keepTty.

Note this basically only moves a large chunk of xf86OpenConsole() into
linux_parse_vt_settings() without changing a single line of it, this is
hard to see in the diff because the identation level has changed.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-06-03 11:31:30 +02:00
Rui Matos
cbb7eb73b5 xwayland: Throttle our cursor surface updates with a frame callback
In some extreme cases with animated cursors at a high frame rate we
could end up filling the wl_display outgoing buffer and end up with
wl_display_flush() failing.

In any case, using the frame callback to throttle ourselves is the
right thing to do.

Signed-off-by: Rui Matos <tiagomatos@gmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2015-05-27 08:21:00 -07:00
Ray Strode
76636ac12f xwayland: default to local user if no xauth file given. [CVE-2015-3164 3/3]
Right now if "-auth" isn't passed on the command line, we let
any user on the system connect to the Xwayland server.

That's clearly suboptimal, given Xwayland is generally designed
to be used by one user at a time.

This commit changes the behavior, so only the user who started the
X server can connect clients to it.

Signed-off-by: Ray Strode <rstrode@redhat.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2015-05-26 11:22:24 -07:00
Ray Strode
c4534a38b6 xwayland: Enable access control on open sockets [CVE-2015-3164 1/3]
Xwayland currently allows wide-open access to the X sockets
it listens on, ignoring Xauth access control.

This commit makes sure to enable access control on the sockets,
so one user can't snoop on another user's X-over-wayland
applications.

Signed-off-by: Ray Strode <rstrode@redhat.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2015-05-26 11:22:17 -07:00
Peter Hutterer
da10d0cb42 dix: hook up the unaccelerated valuator masks
If present, access the unaccelerated valuator mask values for DGA and XI2 raw
events.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-05-20 12:44:58 +10:00
Peter Hutterer
4c2f2cb4c8 dix: Add unaccelerated valuators to the ValuatorMask
Allows a mask to carry both accelerated and unaccelerated motion at the same
time.

This is required for xf86-input-libinput where the pointer acceleration
happens in libinput already, but parts of the server, specifically raw events
and DGA rely on device-specific unaccelerated data.

To ease integration add this as a second set to the ValuatorMask rather than
extending all APIs to carry a second, possibly NULL set of valuators.

Note that a valuator mask should only be used in either accel/unaccel or
standard mode at any time. Switching requires either a valuator_mask_zero()
call or unsetting all valuators one-by-one. Trying to mix the two will produce
a warning.

The server has a shortcut for changing a mask with the
valuator_mask_drop_unaccelerated() call. This saves us from having to loop
through all valuators on every event, we can just drop the bits we know we
don't want.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-05-20 12:44:58 +10:00
Peter Hutterer
f82dc6bd91 xfree86: drop if 0 hunk
Disabled in 2005. bye bye.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-05-20 11:53:36 +10:00
Egbert Eich
910ddf8521 Xephyr: Fix broken image when endianess of client machine and host-Xserver differ
The image is created in the native byte order of the machine Xephyr is
rendered on however drawn in the image byte order of the Xephyr server.
Correct byte order in the xcb_image_t structure and convert to native
before updating the window.
If depths of Xephyr and host server differ this is already taken care of
by the depth conversion routine.
It is a terrible wase to always convert and transmit the entire image
no matter of the size of the damaged area. One should probably use
sub-images here. For now we leave this as an exercise.

Signed-off-by: Egbert Eich <eich@freedesktop.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2015-05-12 09:53:25 -07:00
Egbert Eich
c65eda5e66 Xephyr: Fix screen image draw for the non-Glamor & non-XHSM case
xcb_image_put() prints the entire image, therefore don't use an offset.

Signed-off-by: Egbert Eich <eich@freedesktop.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2015-05-12 09:50:37 -07:00
Egbert Eich
66212ca0d2 Xephyr: Fix compile when debugging is enabled
Signed-off-by: Egbert Eich <eich@freedesktop.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2015-05-12 09:50:26 -07:00
Egbert Eich
b536d56aef Xephyr: Print default server display number if none is specified
Signed-off-by: Egbert Eich <eich@freedesktop.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2015-05-12 09:50:04 -07:00