Commit Graph

13820 Commits

Author SHA1 Message Date
Kristian Høgsberg
6e539d8817 Xwayland DDX
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-03 15:19:22 -07:00
Kristian Høgsberg
e738276e96 glamor: Expose glamor_destroy_pixmap()
When we create a glamor pixmap by calling glamor_create_pixmap()
directly, we need to call glamor_destroy_pixmap() to destroy it.

Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-04-01 10:31:09 -07:00
Kristian Høgsberg
d148034375 glamor: Add new GLAMOR_CREATE_PIXMAP_NO_TEXTURE pixmap create flag
This flag lets a DDX allocate a glamor pixmap without allocating the
texture that backs it.  The DDX can then allocate the texture itself
and then set it later.

Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-04-01 10:31:09 -07:00
Kristian Høgsberg
fe204185bc glamor: Move glamor_egl_screen_init() prototype to glamor.h
A DDX that implements the glamor EGL functions need to pull in this
prototype but shouldn't need to pull in glamor_priv.h

Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-04-01 10:31:09 -07:00
Kristian Høgsberg
9ba2084321 dri3: Allow asynchronous implementation for dri3_open
By passing the client pointer to the dri3_open implementation, we allow
the clients to implement the open callback asynchronously.  If the
client ignore count is positive after returning from dri3_open, we
assume that authentication is in progress and doesn't send the reply.
The code to send the reply is moved into a helper function, which the
implementation can call upon receiving its authenticaion reply.

Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-04-01 10:31:09 -07:00
Kristian Høgsberg
4ba7b59446 composite: Add exception mechanism for implicit redirection policy
Normally composite will decide to add implicit redirection when a
window with an alternate visual is a parent of a window with a regular
visual or vice versa.  This uses extra pixmap memory and incurs an extra
copy.  This exception mechanism provides a way for a DDX to override this
if the DDX knows that its acceleration architecture will render correctly.

The relevant case is that of an RGB window reparented into a ARGB parent
frame window.  If the DDX knows that the acceleration architecture in use
will pad the alpha channel to opaque when rendering to the RGB window,
the implicit redirection can be avoided.

This patch adds a new composite function:

  CompositeRegisterImplicitRedirectionException()

which lets a DDX register a pair of parent and child window visuals, that
will not be implicitly redirected even if the normal policy would have
made that choice.

Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-04-01 10:31:09 -07:00
Keith Packard
73698d41e4 Make XYToWindow a screen function
This allows DDXen to override the window picking to account for
native windows not seen by the X server.  The bulk of the picking logic
is exposed as a new helper function, miSpriteTrace().  This function
completes the sprite trace filled out by the caller, and can be set up
to start the search from a given toplevel window.

v2: Leave existing XYToWindow API in place for API compatibility

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
2014-04-01 10:30:42 -07:00
Keith Packard
9d20d18fb9 Merge remote-tracking branch 'jturney/master' 2014-03-31 23:24:56 -07:00
Adam Jackson
8468e24430 mi: Hush extension initialization (#75870)
Printing these as ErrorF is fairly obnoxious, since it means the
non-hardware servers now spew stuff to the console for entirely routine
events.  And actually, printing these at all is fairly obnoxious, since
a) we're printing a line for every extension, whether it's enabled or
not, and b) we're not actually initializing the extension at this point.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-03-29 00:01:11 -07:00
Keith Packard
a2880699e8 fb: fix fast-path blt detection
The width parameter is used to disable the blit fast-path (memcpy) when
source and destination rows overlap in memory. This check was added in [0].

Unfortunately, the calculation to determine if source and destination
lines overlapped was incorrect:
  (1) it converts width from pixels to bytes, but width is actually in
      bits, not pixels.
  (2) it adds this byte offset to dst/srcLine, which implicitly converts
      the offset from bytes to sizeof(FbBits).

Fix both of these by converting addresses to byte pointers and width
to bytes and doing comparisons on the resulting byte address.

For example:
A 32-bpp 1366 pixel-wide row will have
  width = 1366 * 32 = 43712 bits
  bpp = 32
  (bpp >> 3) = 4
  width * (bpp >> 3) = 174848 FbBits
  (FbBits *)width => 699392 bytes

So, "careful" was true if the destination line was within 699392 bytes,
instead of just within its 1366 * 4 = 5464 byte row.

This bug causes us to take the slow path for large non-overlapping rows
that are "close" in memory.  As a data point, XGetImage(1366x768) on my
ARM chromebook was taking ~140 ms, but with this fixed, it now takes
about 60 ms.
  XGetImage() -> exaGetImage() -> fbGetImage -> fbBlt()

[0] commit e32cc0b4c8
Author: Adam Jackson <ajax@redhat.com>
Date:   Thu Apr 21 16:37:11 2011 -0400

    fb: Fix memcpy abuse

    The memcpy fast path implicitly assumes that the copy walks
    left-to-right.  That's not something memcpy guarantees, and newer glibc
    on some processors will indeed break that assumption.  Since we walk a
    line at a time, check the source and destination against the width of
    the blit to determine whether we can be sloppy enough to allow memcpy.
    (Having done this, we can remove the check for !reverse as well.)

v3: Convert to byte units

This first checks to make sure the blt is byte aligned, converts all
of the data to byte units and then compares for byte address range
overlap between source and dest.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
2014-03-27 22:59:38 -07:00
Jon TURNEY
bc348bd2c4 Handle -displayfd and an explicit display number sensibly
Handle -displayfd and an explicit display number sensibly, e.g. use the
explicitly specified display number, and write it to the displayfd

v2: displayfd might be 0, so use -1 as invalid value
v3: Rebase for addition of NoListenAll flag

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
2014-03-27 14:34:34 +00:00
Jon TURNEY
a3730271d5 Fix build when configured --enable-debug
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-27 14:34:32 +00:00
Jon TURNEY
5870bd398d Fix ephyr build with --disable-glamor
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-27 14:34:29 +00:00
Jon TURNEY
432fc37e2c Build fbcmap_mi.c once, rather than once for each DDX
Build fbcmap_mi.c once, rather than once for each DDX, and make it part of libfb
or libwfb convenience library.

Since 84e8de1271 we don't have fbcmap.c

This is a sort of revert of 17d85387d1

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-27 14:34:06 +00:00
Jon TURNEY
f23dd02b96 Build Xi/stubs.c once as a convenience library, rather than once for each 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-27 14:09:43 +00:00
Jon TURNEY
45b223e1c2 Build dpmsstubs.c once as a convenience library, rather than once for each 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-27 14:09:33 +00:00
Julien Cristau
7b2a517ba9 Xephyr: restore initial window resize lost in xcb conversion
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-26 22:34:32 -07:00
Keith Packard
1b5d7e7846 glamor: Add glamor_program PolyPoint implementation
This accelerates poly point when possible by off-loading all geometry
computation to the GPU.

Improves x11perf -dot performance by 28109.5% +/- 1022.01% (n=3)

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-26 12:58:40 -07:00
Keith Packard
72a4beff6d glamor: Move glamor_poly_segment to separate glamor_segment.c file
There's no reason to mix PolyPoint and PolySegment in the same file.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-off-by: Eric Anholt <eric@anholt.net>
2014-03-26 12:58:40 -07:00
Keith Packard
029b64c30a glamor: Add infrastructure for generating shaders on the fly
This just adds a bunch of support code to construct shaders from
'facets', which bundle attributes needed for each layer of the
rendering system. At this point, that includes only the primitive and
the fill stuff.

v2: Correct comment in glamor transform about 1/2 pixel correction needed
    for GL_POINT. (Eric Anholt)
v3: Rebase on Markus's cleanups (change by anholt)

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-26 12:58:40 -07:00
Keith Packard
0ca7223742 glamor: Add helper functions to walk pixmap tiling
This adds a few helper functions to make pixmap fbo access symmetrical
between the single fbo and tiled cases.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Eric Anholt <eric@anholt.net>
2014-03-26 12:58:40 -07:00
Keith Packard
209d004469 glamor: Add bounding box to one-fbo pixmaps
This lets code treat the one-fbo pixmaps more symmetrically with the
tiled pixmaps.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Eric Anholt <eric@anholt.net>
2014-03-26 12:58:40 -07:00
Keith Packard
82f91433e2 glamor: Get testing code using small FBOs working again
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-26 12:58:40 -07:00
Keith Packard
11e2f0de71 mi: miPutImage with XYPixmap failed at depth 32 on 64-bit machines
The X server still has 'unsigned long' in a few places to hold 32 bit
values. One of those is in miPutImage where it's holding the temporary
planemask for XYPixmap format images.

It computed the highest plane in the source image with 1 << (depth -
1). On 64-bit machines, taking that value and storing it in an
unsigned long promotes it to a signed 64-bit value
(0xffffffff80000000).

Then, it loops over that value, shifting one bit right each time,
waiting for it to go to zero.. That takes 64 iterations, and ends up
with some mystic planemask values *and* walking off the end of the
source image data and out into space.

A simple cast is all that is required to compute the correct initial
plane mask (0x0000000080000000), at which point the loop operates
correctly once again.

Checking the fbPutImage code, I note that this same bug was fixed
in 2006 by Aaron Plattner in commit
f39fd42429

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
2014-03-26 12:58:40 -07:00
Keith Packard
ae87b53615 dix: Allow NULL stipple in ChangeGC
miOpqStipDrawable resets the stipple after painting. When that stipple
was NULL, ChangeGC needs to handle that and not crash.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-off-by: Eric Anholt <eric@anholt.net>
2014-03-26 12:58:40 -07:00
Markus Wick
2e040f41de glamor: Drop feature dependent optimization on startup.
We don't care that much about startup time to write different code paths...

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-03-26 12:58:40 -07:00
Markus Wick
2e75d974bc glamor: Remove unneeded unbindings.
They are already cleared in glamor_put_vbo_space.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-03-26 12:58:40 -07:00
Markus Wick
7c4e147296 glamor: Always keep GL_ELEMENT_ARRAY_BUFFER bound to the same IB.
We never used glDrawElements() with a different index buffer.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-03-26 12:58:40 -07:00
Markus Wick
82168b1e6e glamor: Select VBO path by ARB_mbr extension.
The mbr path was hard coded enabled for desktop gl and disabled for
gles.  But there are both desktop without mbr and GLES with mbr.

v2: Don't forget to update the fini path, too (change by anholt)

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-03-26 12:58:40 -07:00
Markus Wick
53df6e8c3b glamor: Update GL requirements to 2.1.
We will never ever run on OpenGL 1.2 as we use shaders everywhere.
2.0 may be enough, but we also often use PBOs and our big shaders
won't fit into the first GLSL limits.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-03-26 12:58:39 -07:00
Markus Wick
15d36444ac glamor: Use epoxy_gl_version() instead of rolling our own.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-03-26 12:58:39 -07:00
Markus Wick
9d87f66e86 glamor: Use epoxy_has_gl_extension() instead of rolling our own.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-03-26 12:58:39 -07:00
Markus Wick
708fe0625f glamor: Use glsl "fract/mod" instead of "while" in gradient shaders.
This fixes gtkperf. It seemed to hang forever.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-03-26 12:58:39 -07:00
Eric Anholt
84ff896072 kdrive: Remove duplicated definitions of some XV-related structs.
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-26 12:58:39 -07:00
Gaetan Nadon
370c8c75ca xfree86: glamor_egl subdir must be distributed - breaks distcheck
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-26 12:58:39 -07:00
Gaetan Nadon
870bbf85e6 ephyr: typo where "()" should be "$()" in the Makefile - breaks make dist
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-26 12:58:39 -07:00
Keith Packard
bda6fdc71c Merge remote-tracking branch 'whot/for-keith' 2014-03-25 16:06:03 -07:00
Emil Velikov
e46820fb89 miinitext: introduce LoadExtensionList() to replace over LoadExtension()
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-25 16:00:17 -07:00
Adam Jackson
78167a98a8 xkb: Restore XkbCopyDeviceKeymap
Removed in d35a02a767, tigervnc 1.2.80 and
xf86-video-nested need it for now.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-03-25 08:50:35 +10:00
Kristian Høgsberg
215f3d2e0f os: Add AddClientOnOpenFD() to create a new client for an file descriptor
When the Xwayland server is socket-activated, we need to connect and
initialize the window manager before the activating client gets to
proceed with connecting.  We do this by passing a socket file
descriptor for the window manager connection to the Xwayland server,
which then uses this new function to set it up as an X client.

Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-03-25 08:46:12 +10:00
Emil Velikov
d415b9d69f miinitext: avoid allocating a sentinel ExtensionModule
With all the logic now in place there is no need to allocate a separate
ExtensionModule to be used as a sentinel.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-03-23 18:18:56 +00:00
Emil Velikov
b421ac8e02 miinitext: constify staticExtensions
The array is readonly and should not be tampered with.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-03-23 18:18:56 +00:00
Emil Velikov
5ff34b5a0b miinitext: drop sentinel detection during LoadExtension
All the sentinels from the extension lists were removed, thus the only
case were this would trigger is when the code is broken badly.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-03-23 18:18:56 +00:00
Emil Velikov
6fea450d41 miinitext: move AddStaticExtensions() to LoadExtension()
Separate the function from NewExtensionModule() as the former does
only memory reallocation. No functional change.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-03-23 18:18:55 +00:00
Alan Coopersmith
bf087659f0 Add necessary headers for major()/minor() on Solaris to xf86Xinput.c
Without these, after commit fdb4ec86c2, 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-22 14:42:09 -07:00
Keith Packard
d9fdae5f4a Merge remote-tracking branch 'jturney/master' 2014-03-22 14:09:00 -07:00
Gaetan Nadon
99bee6c054 Default font path: remove the check for ${sysconfdir}/X11/fontpath.d
The location ${sysconfdir}/X11/fontpath.d is unknown at configuration time
(only at make time) as evidenced by the configuration output:

    checking for ${prefix}/etc/X11/fontpath.d... no

Unlike font-util for the X fonts, there is no mechanism to query where
fontpath.d is. Fedora have chosen /etc/X11 and others have followed, but this
is not a standard. It might also be installed at another location, it may or may
not be under the xserver installation prefix. We just don't know. Debian does
not use this at all.

Distros are using --with-default-path when they support fontpath.d, so they
never relied on the server default as it never worked.

The patch essentially is a noop, which leaves the door open for anyone who
could potentially provide a reliable implementation of choosing fontpath.d
when applicable.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-03-22 14:04:25 -07:00
Keith Packard
1782316744 Merge remote-tracking branch 'jwrdecoede/for-keith' 2014-03-22 13:46:15 -07:00
Jon TURNEY
0e5d2996ac hw/xwin: Fix WM_ENDSESSION crash on x86_64
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-22 18:56:46 +00:00
Jon TURNEY
896b53ffa7 hw/xwin: Improve NET_WM_ICON validation
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-22 18:56:43 +00:00