Compare commits

...

149 Commits

Author SHA1 Message Date
Adam Jackson 2c7fa2a423 xserver 1.17.4 2015-10-28 12:30:47 -04:00
Martin Peres bbf1893cc0 os: make sure the clientsWritable fd_set is initialized before use
In WaitForSomething(), the fd_set clientsWritable may be used
unitialized when the boolean AnyClientsWriteBlocked is set in the
WakeupHandler(). This leads to a crash in FlushAllOutput() after
x11proto's commit 2c94cdb453bc641246cc8b9a876da9799bee1ce7.

The problem did not manifest before because both the XFD_SIZE and the
maximum number of clients were set to 256. As the connectionTranslation
table was initalized for the 256 clients to 0, the test on the index not
being 0 was aborting before dereferencing the client #0.

As of commit 2c94cdb453bc641246cc8b9a876da9799bee1ce7 in x11proto, the
XFD_SIZE got bumped to 512. This lead the OutputPending fd_set to have
any fd above 256 to be uninitialized which in turns lead to reading an
index after the end of the ConnectionTranslation table. This index would
then be used to find the client corresponding to the fd marked as
pending writes and would also result to an out-of-bound access which
would usually be the fatal one.

Fix this by zeroing the clientsWritable fd_set at the beginning of
WaitForSomething(). In this case, the bottom part of the loop, which
would indirectly call FlushAllOutput, will not do any work but the next
call to select will result in the execution of the right codepath. This
is exactly what we want because we need to know the writable clients
before handling them. In the end, it also makes sure that the fds above
MaxClient are initialized, preventing the crash in FlushAllOutput().

Thanks to everyone involved in tracking this one down!

Reported-by: Karol Herbst <freedesktop@karolherbst.de>
Reported-by: Tobias Klausmann <tobias.klausmann@mni.thm.de>
Signed-off-by: Martin Peres <martin.peres@linux.intel.com>
Tested-by: Tobias Klausmann <tobias.klausmann@mni.thm.de>
Tested-by: Martin Peres <martin.peres@linux.intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91316
Cc: Ilia Mirkin  <imirkin@alum.mit.edu>
Cc: Olivier Fourdan <ofourdan@redhat.com
Cc: Adam Jackson <ajax@redhat.com>
Cc: Alan Coopersmith <alan.coopersmith@oracle.com
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2015-10-27 16:12:03 -04:00
Julien Cristau 6e3892045e Xext: fix build with --disable-xace
Regression from 990cf5b282

Signed-off-by: Julien Cristau <jcristau@debian.org>
Cc: Andrew Eikum <aeikum@codeweavers.com>
Cc: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
(cherry picked from commit 524844c8c1)
2015-10-27 11:10:52 -04:00
Michel Dänzer bf003230f9 DRI2: Sync radeonsi_pci_ids.h from Mesa
Fixes DRI2 client driver name mapping for newer AMD GPUs with the
modesetting driver, allowing the DRI2 extension to initialize.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit ac2f27f1a9)
2015-10-27 11:10:44 -04:00
Adam Jackson 780022a8a5 xserver 1.17.3
Signed-off-by: Adam Jackson <ajax@redhat.com>
2015-10-26 13:03:59 -04:00
Chris Wilson d9344ef3ea present: Fix missed notify MSC computation
Only treat divisor==0 as async to immediately report the actual vblank.
If the user species a non-zero divisor, we should compute the missed
vblank properly or else we report too early.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mario Kleiner <mario.kleiner.de@gmail.com>
(cherry picked from commit 413cb2ff1d)
2015-10-26 12:20:55 -04:00
Hans de Goede 88f22fc5da linux: Do not call FatalError from xf86CloseConsole
FatalError ends up calling xf86CloseConsole itself, so calling FatalError
from within xf86CloseConsole is not a good idea.

Make switch_to log errors using xf86Msg(X_WARNING, ...) and return success
(or failure).

This makes switch_to match the other error checking done in xf86CloseConsole
which all logs warnings and continues.

Add checking of the return value in xf86OpenConsole and call
FatalError there when switch_to fails, to preserve the error-handling
behavior of xf86OpenConsole.

BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1269210
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
(cherry picked from commit 2092f12a24)
2015-10-26 12:20:52 -04:00
Keith Packard 0ca79007c9 fonts: Continue when font calls return Suspended more than once
Patch 3ab6cd31cb fixed Xinerama
interactions with font servers by not putting clients to sleep
multiple times. However, it introduced additional changes dealing with
libXfont routine returning Suspended more than once for the same
request. This additional change was to abandon processing of the
current request and free the closure data by jumping to
'xinerama_sleep' in each of the functions.

Font library functions shouldn't return Suspended more than once,
except for ListFontsWithInfo, which produces multiple replies, and
thus ends up returning Suspended many times during processing.

With the jump to xinerama_sleep occurring after the first reply was
processed, the closure for the request was freed and future calls into
the ListFontsWithInfo callback resulted in dereferencing freed
memory.

This patch removes the added branches, reverting the code to its
previous behaviour, which permitted multiple Suspended returns and
simply waited for the client to be signaled again so that the callback
could continue processing the request.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit f9a04d19ae)
2015-10-26 12:20:46 -04:00
Jeremy Huddleston 82000d6d03 glx: Fix header length error checking in __glXDisp_RenderLarge
glxcmds.c:2206:46: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare,Semantic Issue]
        if ((cmdlen = safe_pad(hdr->length)) < 0)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
(cherry picked from commit e09875701b)
2015-10-26 12:20:41 -04:00
Jeremy Huddleston 2ae94d6e89 xdmcp: Declare XdmcpFatal _X_NORETURN
xdmcp.c:1404:1: warning: function 'XdmcpFatal' could be declared with attribute 'noreturn'
[-Wmissing-noreturn,Semantic Issue]

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
(cherry picked from commit 9a2a05a9a7)
2015-10-26 12:20:35 -04:00
Jeremy Huddleston a88460ca82 xdmauth: Correct miscall of abs() to instrad call labs()
xdmauth.c:230:13: warning: absolute value function 'abs' given an argument of type 'long' but has parameter of
type
'int'
      which may cause truncation of value [-Wabsolute-value,Semantic Issue]
        if (abs(now - client->time) > TwentyFiveMinutes) {
            ^
xdmauth.c:230:13: note: use function 'labs' instead [Semantic Issue]
        if (abs(now - client->time) > TwentyFiveMinutes) {
            ^~~
            labs
xdmauth.c:302:9: warning: absolute value function 'abs' given an argument of type 'long' but has parameter of type
'int' which
      may cause truncation of value [-Wabsolute-value,Semantic Issue]
    if (abs(client->time - now) > TwentyMinutes) {
        ^
xdmauth.c:302:9: note: use function 'labs' instead [Semantic Issue]
    if (abs(client->time - now) > TwentyMinutes) {
        ^~~
        labs

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
(cherry picked from commit 85eb90ea45)
2015-10-26 12:20:29 -04:00
Jeremy Huddleston 0f051cb4c3 randr: Correct a miscall of abs() to instead call fabs()
rrtransform.c:124:22: warning: using integer absolute value function 'abs' when
      argument is of floating point type [-Wabsolute-value,Semantic Issue]
            if ((v = abs(f_transform->m[j][i])) > max)
                     ^
rrtransform.c:124:22: note: use function 'fabs' instead [Semantic Issue]
            if ((v = abs(f_transform->m[j][i])) > max)
                     ^~~
                     fabs

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
(cherry picked from commit 9f0fcd14b5)
2015-10-26 12:20:24 -04:00
Jeremy Huddleston 8a30fd207c mi: Correct a miscall of abs() to instead call fabs()
miarc.c:1714:9: warning: using integer absolute value function
'abs' when
      argument is of floating point type [-Wabsolute-value,Semantic Issue]
    if (abs(parc->angle2) >= 360.0)
        ^
miarc.c:1714:9: note: use function 'fabs' instead [Semantic Issue]
    if (abs(parc->angle2) >= 360.0)
        ^~~
        fabs

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
(cherry picked from commit 610dd8a58a)
2015-10-26 12:20:17 -04:00
Chris Wilson 0c5ef339ae render: Propagate allocation failure from createSourcePicture()
All the callers were already checking for failure, except that
createSourcePicture() itself was failing to check whether it
successfully allocated the Picture.

[ajax: Rebase, fix line wrap of preceding line]

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 211d4c2d35)
2015-10-26 12:20:11 -04:00
Arcady Goldmints-Orlov 025ae119a7 Fix alphamap interactions with wfb
Set a destructor function on pixman images and call fbFinishAccess()
from there, rather than directly from free_pixman_pict(). This ensures
that fbFinishAccess() gets called even if pixman still has a reference
to the image after free_pixman_pict(), as is the case for alphamaps.

[ajax: Squash an unused variable warning in the non-wfb build]

Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Arcady Goldmints-Orlov <arcadyg@nvidia.com>
Reviewed-by: Søren Sandmann <ssp@redhat.com>
(cherry picked from commit fbac451724)
2015-10-26 12:20:06 -04:00
Alan Coopersmith 62e2aa02ef dri2: better checks for integer overflow in GetBuffers*
Check for integer overflow before using stuff->count in a multiplication,
to avoid compiler optimizing out due to undefined behaviour, but only
after we've checked to make sure stuff->count is in the range of the
request we're parsing.

Reported-by: jes@posteo.de
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
(cherry picked from commit 6ca496b7c3)
2015-10-26 12:20:03 -04:00
Keith Packard 616239c15d Xext/xselinux: Warning fixes
There's a 'const char *' adventure here that I'm mostly ignoring; some
client information gets const poisoned. Worked around by adding a
couple of casts. Ick.

Added an _X_ATTRIBUTE_PRINTF to SELinuxLog.

Ignore a couple of unused return values.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 9af111fe04)
2015-10-26 12:19:58 -04:00
Eric Anholt 87151fefb0 x86emu: Fix some set-but-not-used warnings.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit e6f8a0340b)
2015-10-26 12:19:52 -04:00
Chris Wilson 20bdec9171 render: Fix leak of filter params
==11097== 2,048 (+1,640) bytes in 32 (+26) blocks are definitely lost in loss record 1,570 of 1,719
==11097==    at 0x4C2A2DB: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==11097==    by 0x225EF3: SetPicturePictFilter (filter.c:339)
==11097==    by 0x22DF4F: ProcRenderSetPictureFilter (render.c:1773)
==11097==    by 0x15D25D: Dispatch (dispatch.c:432)
==11097==    by 0x14C7B9: main (main.c:298)

[ajax: Fixed whitespace]

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
(cherry picked from commit c7f84c880b)
2015-10-26 12:19:46 -04:00
Ville Syrjälä 5c0aea5fb3 xfree86: Fix the 1792x1344-75 EST III mode
The correct refresh rate for this mode is 75, not 85.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
(cherry picked from commit 98e170971c)
2015-10-26 12:19:43 -04:00
Michal Srb 293d0efe3c randr: Allow RRSelectInput for ProviderChange and ResourceChange events
[ajax: To be clear, we already have code to emit these events, and it
 looks like it works, but to get them you'd have had to also ask for one
 of the other notify types.  This makes it possible to listen for e.g.
 ProviderChange alone.]

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Michal Srb <msrb@suse.com>
(cherry picked from commit 91c7acfc34)
2015-10-26 12:19:38 -04:00
Dave Airlie 833e3e84a0 exa: initialise mask_off_x and mask_off_y
These get used at the end of the function in a calculation,
even though the result isn't used its not pretty.

Pointed out by coverity.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
(cherry picked from commit 4c7cefe240)
2015-10-26 12:19:36 -04:00
Andrea Canciani 26a5364d50 render: Allow single-stop gradients
The Render specification allows single-stop gradients and pixman 0.22
(X server requires >= 0.27.2 now) can rasterize them correctly.

[ajax: update commit message]

Signed-off-by: Andrea Canciani <ranma42@gmail.com>
Reviewed-by: Soren Sandmann <ssp@redhat.com>
(cherry picked from commit 7ed0c3912e)
2015-10-26 12:19:29 -04:00
Cyril Brulebois a22b828dad man: Fix case for MIT-unspecified.
include/site.h says that COMPILEDDISPLAYCLASS is MIT-unspecified, rather
than MIT-Unspecified. Fix the manpage accordingly.

Signed-off-by: Cyril Brulebois <kibi@debian.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
(cherry picked from commit 4803f71391)
2015-10-26 12:19:28 -04:00
Alan Coopersmith 92f6b36397 protocol.txt: Add MIT-SHM 1.2 requests
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
(cherry picked from commit a31bbc450a)
2015-10-26 12:19:26 -04:00
Alan Coopersmith 0b2a9db19b protocol.txt: Add DRI3 1.0 requests
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
(cherry picked from commit 424ba5de56)
2015-10-26 12:19:25 -04:00
Alan Coopersmith d135b4cf6b protocol.txt: Add Present 1.0 requests
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
(cherry picked from commit 7e6b7c7994)
2015-10-26 12:19:23 -04:00
Alan Coopersmith 32f3432ea6 protocol.txt: Remove extensions that died before Xorg was born
Adobe-DPS-Extension, DEC-XTRAP, X3D-PEX, XIE

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
(cherry picked from commit 1ea8fb96bc)
2015-10-26 12:19:21 -04:00
Tiago Vignatti 5c5bc6a9c2 dix: remove dead extensions to protocol.txt
lbx and mbe.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
(cherry picked from commit 593270038d)
2015-10-26 12:19:20 -04:00
Robert Hooker a55bfcc0df Add new GLX events errors and requests to protocol.txt
Based off of glproto 1.4.11.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Robert Hooker <robert.hooker@canonical.com>
(cherry picked from commit 3cd56dd2cf)
2015-10-26 12:19:18 -04:00
Robert Hooker 9cb53672b4 Add DRI2 2.2/2.3 events and requests to protocol.txt
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Robert Hooker <robert.hooker@canonical.com>
(cherry picked from commit 272ba9f021)
2015-10-26 12:19:17 -04:00
Adam Jackson 8810c46a98 rootless: Fix bogus handling of broken root clip
gcc quite correctly complains about this:

    In file included from ../../include/scrnintstr.h:51:0,
                     from rootlessValTree.c:98:
    In function 'RegionUninit.isra.1',
        inlined from 'RegionEmpty' at ../../include/regionstr.h:194:5,
        inlined from 'RootlessMiValidateTree' at rootlessValTree.c:490:9:
    ../../include/regionstr.h:166:9: warning: attempt to free a non-heap object 'RegionBrokenData' [-Wfree-nonheap-object]
             free((_pReg)->data);

So that'd crash if you ever got there.  RegionNull will do almost the
same thing only without the free(), so let's do that instead; it might
still not be an entirely sane way to recover, but it at least won't
crash.

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit fa0bb01899)
2015-10-26 12:19:15 -04:00
Keith Packard 9a4ea1f5ea os/xdmcp: Just send XDMCP keepalive packets once every three minutes
There was a complicated scheme to increase the time between keepalives
from 3 minutes up to as much as 24 hours in an attempt to reduce
network traffic from idle X terminals. X terminals receiving X
traffic, or receiving user input would use the 3 minute value; X
terminals without any network traffic would use a longer value.

However, this was actually broken -- any activity in the X server,
either client requests or user input, would end up resetting the
keepalive timeout, so a user mashing on the keyboard would never
discover that the XDMCP master had disappeared and have the session
terminated, which was precisely the design goal of the XDMCP keepalive
mechanism.

Instead of attempting to fix this, accept the cost of a pair of XDMCP
packets once every three minutes and just perform keepalives
regularly.

This will also make reworking the block and wakeup handler APIs to
eliminate select masks easier.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit db1089eafc)
2015-10-26 12:19:09 -04:00
Keith Packard abe4485101 os/xdmcp: Remove dead 'restart' code
The X server used to wait for the user to hit a key or move the mouse
before restarting the session after a keepalive failure. This,
presumably, was to avoid having the X server continuously spew XDMCP
protocol on the network while the XDM server was dead.

Switching into this state was removed from the server some time before
XFree86 4.3.99.16, so the remaining bits of code have been dead for
over a decade, and no-one ever noticed.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit a3a4029133)
2015-10-26 12:19:02 -04:00
Egbert Eich c72d4f0027 randr: Remove senseless checks for xf86RandR12Key
When xf86RandR12Key is not set we will not get to the places where
these tests are done as the functions in question are not called.
In most cases we would have crashed before these checks anyway.

Signed-off-by: Egbert Eich <eich@freedesktop.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 3cd7d33380)
2015-10-26 12:18:59 -04:00
Chris Wilson 7a53179425 randr/prime: Don't stop on the first pipe when disabling ReplaceScanoutPixmap
As we define sizeFits based on whether a CRTC is active, and skip trying
to redirect the scanout on a disable pipe, we then attempt to undo it
later and fail because crtc->scanout_pixmap != DRI2_Pixmap and
!sizeFits. Paper over this failure by skipping unredirected CRTC when
disabling.

v2: Unwind upon failure

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84653
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Dave Airlie <airlied@redhat.com>
Reported-by: Christoph Haag <haagch@frickel.club>
Tested-by: Christoph Haag <haagch@frickel.club>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 245040f0d0)
2015-10-26 12:18:53 -04:00
Alan Coopersmith a85808ce3f Remove DECnet from Xserver.man
DECnet support died in modularization (X11R7.0)

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
(cherry picked from commit 9d65a0de95)
2015-10-26 12:18:52 -04:00
Aaron Plattner 49d04a4336 privates: Clear screen-specific keys during CloseScreen
The modesetting driver corrupts memory when used after a server regeneration
because not enough memory is allocated for its pixmap privates.  This happens
because its call to dixRegisterScreenSpecificPrivateKey() does nothing because
key->initialized is still TRUE from the first server generation.  However, the
key is not in the screen's linked list of screen-specific privates because
that's freed and reallocated during the server generation loop in dix_main().

Fix this by clearing key->initialized before CloseScreen and add a call to
dixFreeScreenSpecificPrivates() for GPU screens.

v2: Just set key->initialized to FALSE and move dixFreeScreenSpecificPrivates()
calls to after CloseScreen.

v3: Move dixFreeScreenSpecificPrivates() calls back to just before CloseScreen.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 82eb490b0a)
2015-10-26 12:18:46 -04:00
Adam Jackson daf15b5516 render: Simplify SProcRenderScale
Since ProcRenderScale throws BadImplementation anyway it's pointless to
waste time carefully swapping the request.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
(cherry picked from commit 67dd34fa73)
2015-10-26 12:18:39 -04:00
Ian Scott 10a9448892 Xephyr: Paint with subimage for non-Glamor & non-XSHM case
This improves the case for when we paint an area without SHM.
xcb_image_subimage() is used to create a subimage for the damaged area, which
is converted to native format if necessary.

Signed-off-by: Ian Scott <ian.scott@arteris.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
(cherry picked from commit a579e6ba77)
2015-10-26 12:18:36 -04:00
Daniel Drake 0134dc1b56 Keep SIGALRM restart flag after Popen
Commit 94ab7455 added SA_RESTART to the SIGALRM handler.  However, the
Popen code tears down and recreates the SIGALRM handler via OsSignal(),
and this flag is dropped at this time.

Clean the code to use just a single codepath for creating this signal
handler, always applying SA_RESTART.

[ajax: Fixed commit id]

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Daniel Drake <drake@endlessm.com>
(cherry picked from commit 1f915e8b52)
2015-10-26 12:18:29 -04:00
Daniel Drake f92c0b9f94 Allow system call restarts upon signal interruption
The X server frequently deals with SIGIO and SIGALRM interruptions.
If process execution is inside certain blocking system calls
when these signals arrive, e.g. with the kernel blocked on
a contended semaphore, the system calls will be interrupted.

Some system calls are automatically restartable (the kernel re-executes
them with the same parameters once the signal handler returns) but
only if the signal handler allows it.

Set SA_RESTART on the signal handlers to enable this convenient
behaviour.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Daniel Drake <drake@endlessm.com>
(cherry picked from commit 94ab7455ab)
2015-10-26 12:18:21 -04:00
Felix Janda d2e4a9d4ac On linux use <termios.h> instead of <termio.h>
<termio.h> is obsolete. Using <termios.h> instead fixes building with
musl libc.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Felix Janda <felix.janda@posteo.de>
(cherry picked from commit e8e3368298)
2015-10-26 12:18:15 -04:00
Adam Jackson e863ab57eb glxproxy: Fix an obvious thinko in QueryExtensionsString
gcc 5.1 throws a rather amusing warning here:

glxcmdsswap.c: In function ‘__glXSwapQueryExtensionsString’:
glxcmdsswap.c:439:1: warning: function might be candidate for attribute
‘noreturn’ [-Wsuggest-attribute=noreturn]
 __glXSwapQueryExtensionsString(__GLXclientState * cl, GLbyte * pc)

This is entirely accurate, albeit curiously phrased: swapping some bits
hanging off the end of a null pointer will make Xdmx crash, so from the
perspective of code generation the function will indeed not return.

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit dfa8b37cfb)
2015-10-26 12:18:12 -04:00
Ingo Schwarze 1688b7517e remove bogus \/ escapes
some X manuals use then escape sequence \/ when they want to render
a slash.  That's bad because \/ is not a slash but an italic
correction, never producing any output, having no effect at all in
terminal output, and only changing spacing in a minor way in typeset
output.

Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 634e357be2)
2015-10-26 12:18:11 -04:00
Keith Packard e9385b42a3 mi: Always initialize edge1 and edge2 in miLineArc
This eliminates a warning generated when miLineArcD is inlined and the
compiler can't figure out that edge1 and edge2 are always initialized
before being used.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit bca4f4b56c)
2015-10-26 12:18:04 -04:00
Dave Airlie 00b3f5a2ed rootless: rename w->_w to avoid shadow warnings
fixes:
In file included from rootlessWindow.c:51:0:
rootlessWindow.c: In function 'RootlessResizeWindow':
rootlessCommon.h:198:19: warning: declaration of 'w' shadows a parameter [-Wshadow]
         WindowPtr w = pWin;                     \
                   ^
rootlessWindow.c:1292:9: note: in expansion of macro 'HUGE_ROOT'
         HUGE_ROOT(pWin);
         ^
rootlessWindow.c:1262:35: note: shadowed declaration is here
                      unsigned int w, unsigned int h, WindowPtr pSib)
                                   ^
In file included from rootlessWindow.c:51:0:
rootlessCommon.h:207:19: warning: declaration of 'w' shadows a parameter [-Wshadow]
         WindowPtr w = pWin;                     \
                   ^
rootlessWindow.c:1296:9: note: in expansion of macro 'NORMAL_ROOT'
         NORMAL_ROOT(pWin);
         ^
rootlessWindow.c:1262:35: note: shadowed declaration is here
                      unsigned int w, unsigned int h, WindowPtr pSib)
                                   ^

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit d471000436)
2015-10-26 12:18:03 -04:00
Dave Airlie 3aacda0aea rootless: fix warnings due to lack of const keeping.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 7f506b8099)
2015-10-26 12:17:57 -04:00
Adam Jackson 02c94ccddf xwayland: Don't (double) destroy input resources in CloseScreen
By the time we get here we've already done CloseDownDevices, so on the
second regeneration you get:

    Invalid read of size 4
       at 0x43402A: RemoveDevice (devices.c:1125)
       by 0x427902: xwl_seat_destroy (xwayland-input.c:568)
       by 0x42649C: xwl_close_screen (xwayland.c:116)
       by 0x4B7F67: CursorCloseScreen (cursor.c:187)
       by 0x536003: AnimCurCloseScreen (animcur.c:106)
       by 0x539831: present_close_screen (present_screen.c:64)
       by 0x43E486: dix_main (main.c:351)
       by 0x30D70206FF: (below main) (libc-start.c:289)
     Address 0x980e1a0 is 64 bytes inside a block of size 904

       at 0x4A07D6A: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
       by 0x434158: RemoveDevice (devices.c:1157)
       by 0x42F77B: CloseDeviceList (devices.c:1017)
       by 0x430246: CloseDownDevices (devices.c:1047)
       by 0x43E3EB: dix_main (main.c:333)
       by 0x30D70206FF: (below main) (libc-start.c:289)

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 533fb62739)
2015-10-26 11:53:11 -04:00
Adam Jackson 71e4b536cd xwayland: Don't (double) destroy RANDR resources in CloseScreen
By the time we get here we've already been through FreeAllResources,
which has already torn down the RANDR objects, so on the second
regeneration you get:

    Invalid read of size 4
       at 0x51C6F0: RRCrtcDestroy (rrcrtc.c:659)
       by 0x4285F5: xwl_output_destroy (xwayland-output.c:191)
       by 0x426464: xwl_close_screen (xwayland.c:112)
       by 0x4B7F77: CursorCloseScreen (cursor.c:187)
       by 0x536013: AnimCurCloseScreen (animcur.c:106)
       by 0x539841: present_close_screen (present_screen.c:64)
       by 0x43E496: dix_main (main.c:351)
       by 0x30D70206FF: (below main) (libc-start.c:289)
     Address 0x4cc6640 is 0 bytes inside a block of size 728 free'd
       at 0x4A07D6A: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
       by 0x51BCCF: RRCrtcDestroyResource (rrcrtc.c:689)
       by 0x45CD91: doFreeResource (resource.c:872)
       by 0x45DE56: FreeClientResources (resource.c:1138)
       by 0x45DF06: FreeAllResources (resource.c:1153)
       by 0x43E3BD: dix_main (main.c:321)
       by 0x30D70206FF: (below main) (libc-start.c:289)

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 11f4cc47a8)
2015-10-26 11:53:06 -04:00
Eric Anholt 75399d32f6 glamor: Don't try to free the pixmap priv if we fail to allocate FBO.
Fixes a regression since a2a2f6e34b.  I
missed this in testing on x86, because we never fail to allocate an
FBO.  We do hit this path on VC4, though.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit ea03e314f9)
2015-10-26 11:52:58 -04:00
Alan Coopersmith 288b355f48 Xserver.man: -retro is used when starting the server, not the stipple
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit 6916d32ab3)
2015-10-26 11:52:41 -04:00
Adam Jackson abfda3b941 glx: Implement GLX_ARB_context_flush_control
This extension allows clients to opt out of the implicit glFlush on
context release, which is quite nice for performance for clients using
multiple contexts.  The server doesn't really need to be aware of the
client's decision, at least for direct contexts, but it does need to not
reject the context attribute out of hand.

This patch won't do anything unless built against a Mesa that defines
the __DRI2_FLUSH_CONTROL extension (and a new enough glxext.h, but
that's been there since 10.3 at least).

Reviewed-by: James Jones <jajones@nvidia.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit 995ff11422)
2015-10-26 11:52:23 -04:00
Fredrik Höglund 23d52080a5 present: Don't stash the MSC value when present_get_ust_msc fails
Otherwise we stash an uninitalized value, and later use it to compute
the msc_offset for the window.  Also initialize ust and crtc_msc so we
never use uninitalized values when present_get_ust_msc fails.

This fixes clients getting stuck waiting indefinitely for an idle
event when a CRTC is turned off.

Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
(cherry picked from commit f6ce23fbfc)
2015-10-26 11:40:10 -04:00
Dave Airlie 2a561fac70 glx: fix regression with copy sub buffer disappearing
So copy sub buffer isn't a core extensions it's a driver extension
which means we are using totally the wrong interface to query for it
here, which means bad things happen when you roll out this code,
for instance MESA_copy_sub_buffer stops working.

This is just the hack I'm sticking in Fedora to avoid the regression
for now, but hopefully will inspire us.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 6da3f5d04f)
2015-10-26 11:37:19 -04:00
Michel Dänzer 92effabee1 glamor: Make our EGL context current before calling into GL in glamor_init
Without this, the context of another screen may be current, or no context
at all if glamor_egl_init failed for another screen.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit 0a458a908e)
2015-10-26 11:30:25 -04:00
Dave Airlie a420301a8b glamor: make current in prepare paths
Lots of the accel paths only make current once they start
doing someting, so a lot of them call the bail paths without
make current, which means on PRIME systems for example
we end up in the wrong context.

Add a prepare pixmap in the prepare fallback path.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90667
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit db5337afb2)
2015-10-26 11:30:15 -04:00
Michel Dänzer fb17307b1b glamor: Use glamor_prepare_access_box() for PutImage/GetImage fallback
Fixes slow text display in xdvi.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91260
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit 1a18513a4e)
2015-10-26 11:30:10 -04:00
Michel Dänzer 8415eca0ab glamor: Use a single glTexImage2D call for core font atlas texture data v2
Instead of one glTexSubImage2D call for each glyph.

This significantly reduces the amount of time it takes for xterm to start
up on a fresh X server with the radeonsi driver.

v2: Use GLYPHWIDTHBYTESPADDED instead of hardcoding 4 bytes glyph
    alignment (Keith Packard)

[ajax 1.17: fix up summary as suggested by Michel]

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 732e3b9c08)
2015-10-26 11:28:47 -04:00
Jeremy Huddleston Sequoia eb9dea1e25 XQuartz: Cleanup formatting of DarwinEQInit that was butchered by automation a few years ago
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
(cherry picked from commit 27ad21254f)
2015-10-19 11:07:54 -07:00
Jeremy Huddleston Sequoia 5e7aaf5e93 XQuartz: Make sure that darwin_all_modifier_mask_additions is 0-terminated
Found by ASan

X.Org X Server 1.17.99.901 Build Date: 20151018
================================================================
==40471==ERROR: AddressSanitizer: global-buffer-overflow on address 0x000101fed7a4 at pc 0x000101584030 bp 0x70000029f920 sp 0x70000029f918
READ of size 4 at 0x000101fed7a4 thread T7
    #0 0x10158402f in DarwinEQInit darwinEvents.c:377
    #1 0x10157f3bc in InitInput darwin.c:566
    #2 0x101be87ad in dix_main main.c:268
    #3 0x10159131b in server_thread quartzStartup.c:66
    #4 0x7fff8a535c12 in _pthread_body (/usr/lib/system/libsystem_pthread.dylib+0x3c12)
    #5 0x7fff8a535b8f in _pthread_start (/usr/lib/system/libsystem_pthread.dylib+0x3b8f)
    #6 0x7fff8a533374 in thread_start (/usr/lib/system/libsystem_pthread.dylib+0x1374)

0x000101fed7a4 is located 0 bytes to the right of global variable 'darwin_all_modifier_mask_additions' defined in 'darwinEvents.c:181:12'
(0x101fed7a0) of size 4
SUMMARY: AddressSanitizer: global-buffer-overflow darwinEvents.c:377 DarwinEQInit
Shadow bytes around the buggy address:
  0x1000203fdaa0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x1000203fdab0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x1000203fdac0: f9 f9 f9 f9 00 00 00 00 00 00 f9 f9 f9 f9 f9 f9
  0x1000203fdad0: 00 00 00 00 00 00 00 00 f9 f9 f9 f9 00 00 00 00
  0x1000203fdae0: 00 00 f9 f9 f9 f9 f9 f9 00 00 00 00 00 f9 f9 f9
=>0x1000203fdaf0: f9 f9 f9 f9[04]f9 f9 f9 f9 f9 f9 f9 00 00 00 00
  0x1000203fdb00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x1000203fdb10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x1000203fdb20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x1000203fdb30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x1000203fdb40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07
  Heap left redzone:       fa
  Heap right redzone:      fb
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack partial redzone:   f4
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
Thread T7 created by T0 here:
    #0 0x10242ee99 in wrap_pthread_create
(/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/7.0.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib+0x37e99)
    #1 0x101591089 in create_thread quartzStartup.c:78
    #2 0x101590ed9 in QuartzInitServer quartzStartup.c:95
    #3 0x1015697eb in X11ApplicationMain X11Application.m:1277
    #4 0x101575dc0 in X11ControllerMain X11Controller.m:984
    #5 0x10159171a in server_main quartzStartup.c:127
    #6 0x101540fc0 in do_start_x11_server bundle-main.c:436
    #7 0x101544869 in _Xstart_x11_server mach_startupServer.c:189
    #8 0x101545c96 in mach_startup_server mach_startupServer.c:398
    #9 0x7fff8d1b70f3 in mach_msg_server (/usr/lib/system/libsystem_kernel.dylib+0x110f3)
    #10 0x1015416e7 in main bundle-main.c:774
    #11 0x7fff8bd975ac in start (/usr/lib/system/libdyld.dylib+0x35ac)
    #12 0x0  (<unknown module>)

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
(cherry picked from commit 3db7e332d3)
2015-10-19 11:07:22 -07:00
Ken Thomases 52506f60b6 XQuartz: Fix how we calculate the height of the OSX menu bar
+[NSScreen mainScreen] does not mean the primary display.  It used to mean the
one with the key window.  When "Displays have separate spaces" is enabled, it
means the active screen, the one whose menu bar is mostly opaque.  As such, it
may not be the screen whose lower-left corner is located at (0, 0).  That's
why its max-Y is not necessarily comparable to its height.  That only works
for the primary display.

This code could use [[NSScreen screens] firstObject].  This is always the
primary display, the one whose lower-left corner is at (0, 0).

Once that's done, the above change should be reverted.  The height of the
visible frame would be the full height of the screen minus the menu bar _and
the Dock_ if the Dock is along the bottom of the screen.

Actually, there's a theoretically-simpler approach: use
-[NSMenu menuBarHeight].  That replaces a long-deprecated method
+[NSMenuView menuBarHeight].  However, there was a bug in Tiger that led to
the former not working while the latter still worked. I haven't actually
checked recently.

CrossOver's still-kicking X server code uses this code, which tries all of
the above:

       NSScreen* primaryScreen = [[NSScreen screens] objectAtIndex:0];
       aquaMenuBarHeight = [[NSApp mainMenu] menuBarHeight];
       if (!aquaMenuBarHeight) aquaMenuBarHeight = [NSMenuView menuBarHeight];
       if (!aquaMenuBarHeight) aquaMenuBarHeight =
           NSHeight([primaryScreen frame]) - NSMaxY([primaryScreen visibleFrame]);

Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
(cherry picked from commit 4513f924a7)
2015-10-14 00:36:58 -07:00
Jeremy Huddleston Sequoia 3a7ed42d33 XQuartz: Remove InfoPlist.strings
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
(cherry picked from commit 6e6827aac3)
2015-10-14 00:36:54 -07:00
Jeremy Huddleston Sequoia d939043594 XQuartz: Relax App Transport Security for communicating with the update server
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
(cherry picked from commit df80e2649a)
2015-10-14 00:36:47 -07:00
Jeremy Huddleston Sequoia ba00d8fe70 XQuartz: Silence -Wformat-security for NSRunAlertPanel
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
(cherry picked from commit 9003a3e5c5)
2015-10-14 00:36:42 -07:00
Jeremy Huddleston Sequoia 434890171d 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>
(cherry picked from commit 3a6fa11575)
2015-10-14 00:36:34 -07:00
Jeremy Huddleston Sequoia 601e9b5f8c 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>
(cherry picked from commit 9fe7f5ccad)
2015-10-14 00:36:31 -07:00
Jeremy Huddleston Sequoia 414fc605a9 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>
(cherry picked from commit 0b9c324891)
2015-10-14 00:36:23 -07:00
Jeremy Huddleston Sequoia c15e48bb03 XQuartz: GLX: Use __glXEnableExtension to build extensions list
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
(cherry picked from commit 3790001ea29658872aebda00a03170e392b47878)
2015-10-14 00:36:18 -07:00
Adam Jackson 061ff2621c glx/swrast: Do more GLX extension setup
This gets you nice things like core contexts when using Xvfb.

Also, no, MESA_copy_sub_buffer is not enabled automatically.

Reviewed-by: James Jones <jajones@nvidia.com>
Reviewed-by: Jon Turney <jon.turney@dronecode.org.uk>
Signed-off-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit 2d7194334a)
2015-07-29 11:16:33 -04:00
Adam Jackson 9e744ac376 fb: Make rootless-agnostic
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit 315661a425)
2015-07-29 11:16:33 -04:00
Julien Cristau b46ff18b24 mi: fix typo in warning about overflowing queue
Debian bug#726041

Reported-by: Vincent Hobeïka <vincent.hobeika@gmail.com>
Signed-off-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit ac94cdb9df)
2015-07-29 11:16:33 -04:00
Peter Harris df4f69d462 Fix border tile origin when background is ParentRelative
According to
http://www.x.org/releases/X11R7.7/doc/xproto/x11protocol.html#requests:CreateWindow
"The border tile origin is always the same as the background tile
origin."

ChangeWindowAttributes goes to some effort to make sure it repaints
the border tile whenever the background origin may have changed, but
miPaintWindow was ignoring the background origin.

Found by xts XChangeWindowAttributes-3

Signed-off-by: Peter Harris <pharris@opentext.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit b4061cf5f7)
2015-07-29 11:16:33 -04:00
Andrew Eikum d23171754a dix: Send KeyPress and KeyRelease events to the XACE_KEY_AVAIL hook
While it's documented in the XACE spec, the XACE_KEY_AVAIL hook is
currently never actually invoked by the xserver.

This hook was added in 13c6713c82 (25 Aug 2006), but as the keyboard
processing was moved into XKB, the hook was forgotten and silently
dropped. The code calling this hook was removed by 7af53799c (4 Jan
2009), but it was probably already unused before that.

This patch re-adds support for this hook. The "count" hook parameter is
unused.

Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 990cf5b282)
2015-07-29 11:16:33 -04:00
Andrew Eikum 9180329054 xace: Add XaceHookIsSet helper function
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 5dc2a9aae4)
2015-07-29 11:16:33 -04:00
Alan Coopersmith 3f26c83726 dmx: include header for DMXExtensionInit() in dmx.c
Gets rid of gcc 4.8 warning:

dmx.c:1193:1: warning: no previous prototype for ‘DMXExtensionInit’ [-Wmissing-prototypes]
 DMXExtensionInit(void)
 ^

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Rémi Cardona <remi@gentoo.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 4a758f59a8)
2015-07-29 11:16:33 -04:00
Alan Coopersmith cb7ee9808a dmx: constify GCOps & GCFuncs pointers
Gets rid of 16 instances of gcc 4.8 warnings:

In file included from dmxgc.c:41:0:
dmx.h:327:23: warning: assignment discards ‘const’ qualifier from
 pointer target type [enabled by default]
     (_saved)->_entry  = (_actual)->_entry;    \
                       ^
dmxgc.h:80:5: note: in expansion of macro ‘DMX_WRAP’
     DMX_WRAP(funcs, &dmxGCFuncs, _pGCPriv, (_pGC));   \
     ^
dmxgc.c:192:5: note: in expansion of macro ‘DMX_GC_FUNC_EPILOGUE’
     DMX_GC_FUNC_EPILOGUE(pGC);
     ^

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Rémi Cardona <remi@gentoo.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit a0e44ddfb0)
2015-07-29 11:16:33 -04:00
Alan Coopersmith 03dd982d2b dmx: Mark glxIsExtensionSupported as a const char *
Gets rid of 9 instances of gcc 4.8 warning:

glxcmds.c: In function ‘CreateContext’:
glxcmds.c:378:13: warning: passing argument 1 of ‘glxIsExtensionSupported’
 discards ‘const’ qualifier from pointer target type [enabled by default]
             else if (glxIsExtensionSupported("GLX_SGIX_fbconfig")) {
             ^
In file included from glxserver.h:49:0,
                 from glxcmds.c:41:
glxscreens.h:53:12: note: expected ‘char *’ but argument is of type
 ‘const char *’
 extern int glxIsExtensionSupported(char *ext);

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Rémi Cardona <remi@gentoo.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 9682c47e22)
2015-07-29 11:16:33 -04:00
Alan Coopersmith 78df8521cf dmx: remove redundant redeclarations of variables from other headers
Gets rid of these gcc 4.8 warnings:

dmxcb.c:50:12: warning: redundant redeclaration of ‘PanoramiXPixWidth’
 [-Wredundant-decls]
 extern int PanoramiXPixWidth;
            ^
In file included from dmxcb.c:49:0:
../../Xext/panoramiXsrv.h:12:22: note: previous declaration of
 ‘PanoramiXPixWidth’ was here
 extern _X_EXPORT int PanoramiXPixWidth;
                      ^
dmxcb.c:51:12: warning: redundant redeclaration of ‘PanoramiXPixHeight’
 [-Wredundant-decls]
 extern int PanoramiXPixHeight;
            ^
In file included from dmxcb.c:49:0:
../../Xext/panoramiXsrv.h:13:22: note: previous declaration of
 ‘PanoramiXPixHeight’ was here
 extern _X_EXPORT int PanoramiXPixHeight;
                      ^
dmxcb.c:52:12: warning: redundant redeclaration of ‘PanoramiXNumScreens’
 [-Wredundant-decls]
 extern int PanoramiXNumScreens;
            ^
In file included from dmxcb.c:49:0:
../../Xext/panoramiXsrv.h:11:22: note: previous declaration of
 ‘PanoramiXNumScreens’ was here
 extern _X_EXPORT int PanoramiXNumScreens;
                      ^

dmxpict.c:60:12: warning: redundant redeclaration of ‘RenderErrBase’
 [-Wredundant-decls]
 extern int RenderErrBase;
            ^
In file included from ../../render/glyphstr.h:29:0,
                 from ../../render/picturestr.h:28,
                 from dmx.h:65,
                 from dmxpict.c:42:
../../render/picture.h:176:22: note: previous declaration of ‘RenderErrBase’
 was here
 extern _X_EXPORT int RenderErrBase;
                      ^

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Rémi Cardona <remi@gentoo.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 45ec646d77)
2015-07-29 11:16:33 -04:00
Alan Coopersmith 3af4160822 dmx: remove redundant declaration of dmxFontPrivateIndex from dmxfont.h
Gets rid of 8 instances of gcc 4.8 warning:

In file included from glxcmds.c:38:0:
../../../hw/dmx/dmxfont.h:57:12: warning: redundant redeclaration of
 ‘dmxFontPrivateIndex’ [-Wredundant-decls]
 extern int dmxFontPrivateIndex;
            ^
In file included from glxcmds.c:35:0:
../../../hw/dmx/dmx.h:388:12: note: previous declaration of
 ‘dmxFontPrivateIndex’ was here
 extern int dmxFontPrivateIndex;        /**< Private index for Fonts     */
            ^

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Rémi Cardona <remi@gentoo.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 1033b85196)
2015-07-29 11:16:33 -04:00
Alan Coopersmith 649f37fa01 dmx: glxproxy prototype cleanup
Gets rid of 107 -Wmissing-prototypes & -Wredundant-decls warnings
from gcc 4.8

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Rémi Cardona <remi@gentoo.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit ac64a653fb)
2015-07-29 11:16:32 -04:00
Alan Coopersmith 069180bd2a dmx: more unshadowing of variables
Gets rid of gcc 4.8 warnings:

dmxinputinit.c: In function ‘dmxInputScanForExtensions’:
dmxinputinit.c:877:14: warning: declaration of ‘display’ shadows a global declaration [-Wshadow]
     Display *display;
              ^
In file included from ../../../include/windowstr.h:60:0,
                 from dmxinputinit.c:72:
../../../include/opaque.h:52:30: warning: shadowed declaration is here [-Wshadow]
 extern _X_EXPORT const char *display;
                              ^

glxcmds.c: In function ‘__glXCreatePbuffer’:
glxcmds.c:3397:21: warning: declaration of ‘pc’ shadows a parameter [-Wshadow]
             CARD32 *pc = (CARD32 *) (be_req + 1);
                     ^
glxcmds.c:3314:52: warning: shadowed declaration is here [-Wshadow]
 __glXCreatePbuffer(__GLXclientState * cl, GLbyte * pc)
                                                    ^

glxscreens.c: In function ‘CalcServerVersionAndExtensions’:
glxscreens.c:139:35: warning: declaration of ‘req’ shadows a previous local [-Wshadow]
         xGLXQueryServerStringReq *req;
                                   ^
glxscreens.c:68:26: warning: shadowed declaration is here [-Wshadow]
     xGLXQueryVersionReq *req;
                          ^
glxscreens.c:140:36: warning: declaration of ‘reply’ shadows a previous local [-Wshadow]
         xGLXQueryServerStringReply reply;
                                    ^
glxscreens.c:69:27: warning: shadowed declaration is here [-Wshadow]
     xGLXQueryVersionReply reply;
                           ^

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Rémi Cardona <remi@gentoo.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit bd563fd48f)
2015-07-29 11:16:32 -04:00
Alan Coopersmith 00a962261a dmx: attempt to untangle nested loops using same index variable
This doesn't just make gcc sad, it makes my brain sad.

Change from:
    for (i = 0; i < dmxNumScreens; i++) {
        int i;
        for (i = 0; i < nconfigs; i++) {
            for (j = 0; j < dmxScreen->beNumVisuals; j++) {

to the easier to follow:
    for (i = 0; i < dmxNumScreens; i++) {
        for (j = 0; j < nconfigs; j++) {
            for (k = 0; k < dmxScreen->beNumVisuals; k++) {

Gets rid of gcc 4.8 warning:

dmxinit.c: In function ‘InitOutput’:
dmxinit.c:765:17: warning: declaration of ‘i’ shadows a previous local [-Wshadow]
             int i;
                 ^
dmxinit.c:608:9: warning: shadowed declaration is here [-Wshadow]
     int i;
         ^

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Rémi Cardona <remi@gentoo.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 57e08fae82)
2015-07-29 11:16:32 -04:00
Alan Coopersmith 25292a3bc1 dmx: remove unused variables
Gets rid of gcc 4.8 warnings:

dmxscrinit.c: In function ‘dmxBEScreenInit’:
dmxscrinit.c:83:15: warning: unused variable ‘gcvals’ [-Wunused-variable]
     XGCValues gcvals;
               ^

dmxwindow.c: In function ‘dmxResizeWindow’:
dmxwindow.c:860:19: warning: variable ‘pSibPriv’ set but not used [-Wunused-but-set-variable]
     dmxWinPrivPtr pSibPriv;
                   ^

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Rémi Cardona <remi@gentoo.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 0fbebad724)
2015-07-29 11:16:32 -04:00
Alan Coopersmith 43251c13d7 dmx: fix printf format argument warnings
Gets rid of these gcc 4.8 warnings:

dmxinit.c: In function ‘dmxErrorHandler’:
dmxinit.c:167:16: warning: format ‘%x’ expects argument of type ‘unsigned int’,
 but argument 3 has type ‘XID64’ [-Wformat=]
                ev->resourceid);
                ^
dmxinit.c:171:16: warning: format ‘%x’ expects argument of type ‘unsigned int’,
 but argument 3 has type ‘XID64’ [-Wformat=]
                ev->resourceid);
                ^
dmxinit.c:175:16: warning: format ‘%x’ expects argument of type ‘unsigned int’,
 but argument 3 has type ‘XID64’ [-Wformat=]
                ev->resourceid);
                ^
dmxinit.c:181:12: warning: format ‘%d’ expects argument of type ‘int’,
 but argument 3 has type ‘long unsigned int’ [-Wformat=]
            ev->serial);
            ^
dmxinit.c:183:12: warning: format ‘%d’ expects argument of type ‘int’,
 but argument 3 has type ‘long unsigned int’ [-Wformat=]
            dpy->request);
            ^
dmxinit.c: In function ‘InitOutput’:
dmxinit.c:637:9: warning: format ‘%d’ expects argument of type ‘int’,
 but argument 3 has type ‘long unsigned int’ [-Wformat=]
         dmxLog(dmxInfo, "Generation:         %d\n", dmxGeneration);
         ^

dmxprop.c: In function ‘dmxPropertyCheckOtherWindows’:
dmxprop.c:223:24: warning: format ‘%lu’ expects argument of type ‘long
 unsigned int’, but argument 4 has type ‘Window’ [-Wformat=]
                        dmxScreen->name, win, tp.value);
                        ^
dmxprop.c: In function ‘dmxPropertyWindow’:
dmxprop.c:364:16: warning: format ‘%lu’ expects argument of type ‘long
 unsigned int’, but argument 5 has type ‘Window’ [-Wformat=]
                other->index, other->name, other->scrnWin);
                ^
dmxprop.c:364:16: warning: format ‘%lu’ expects argument of type ‘long
 unsigned int’, but argument 8 has type ‘Window’ [-Wformat=]

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Rémi Cardona <remi@gentoo.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit f358f0d50c)
2015-07-29 11:16:32 -04:00
Alan Coopersmith d4b0ab8332 dmx: move format strings inline so gcc can check
Gets rid of gcc 4.8 warnings:

dmxprint.c: In function ‘dmxConfigPrintPair’:
dmxprint.c:284:25: warning: format not a string literal,
  argument types not checked [-Wformat-nonliteral]
                         p->ysign < 0 ? '-' : '+', p->y);
                         ^
dmxprint.c:289:9: warning: format not a string literal,
  argument types not checked [-Wformat-nonliteral]
         dmxConfigOutput(addSpace, 0, p->comment, format, p->x, p->y);
         ^

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Rémi Cardona <remi@gentoo.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 11af200b00)
2015-07-29 11:16:32 -04:00
Alan Coopersmith 9041051664 dmx: Add _X_ATTRIBUTE_PRINTF to dmxConfigLog() & dmxConfigOutput()
Gets rid of gcc 4.8 warnings:

dmxparse.c: In function ‘dmxConfigLog’:
dmxparse.c:61:5: warning: function might be possible candidate for
 ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
     vprintf(format, args);      /* RATS: All calls to dmxConfigLog from
     ^

dmxprint.c: In function ‘dmxConfigOutput’:
dmxprint.c:149:9: warning: function might be possible candidate for
 ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
         pos += vfprintf(str, format, args);     /* assumes no newlines! */

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Rémi Cardona <remi@gentoo.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 5e01eac10e)
2015-07-29 11:16:32 -04:00
Alan Coopersmith 838952c97e Get rid of const warnings in XSERVER_INPUT_EVENT dtrace probe calls
Use typedefs to work around dtrace dropping const qualifiers from probe
arguments when generating Xserver-dtrace.h.   Add new probes.h header to
avoid having to replicate these typedefs in every file with dtrace probes.

Gets rid of these warnings from gcc 4.8:
 getevents.c:1096:9:
  warning: passing argument 6 of '__dtrace_Xserver___input__event' discards
  'const' qualifier from pointer target type [enabled by default]
 getevents.c:1096:9:
  warning: passing argument 7 of '__dtrace_Xserver___input__event' disards
  'const' qualifier from pointer target type [enabled by default]
 getevents.c:1651:9:
  warning: passing argument 6 of '__dtrace_Xserver___input__event' disards
  'const' qualifier from pointer target type [enabled by default]
 getevents.c:1651:9:
  warning: passing argument 7 of '__dtrace_Xserver___input__event' disards
  'const' qualifier from pointer target type [enabled by default]
 getevents.c:1791:9:
  warning: passing argument 6 of '__dtrace_Xserver___input__event' disards
  'const' qualifier from pointer target type [enabled by default]
 getevents.c:1791:9:
  warning: passing argument 7 of '__dtrace_Xserver___input__event' disards
  'const' qualifier from pointer target type [enabled by default]
 getevents.c:1921:9:
  warning: passing argument 6 of '__dtrace_Xserver___input__event' disards
  'const' qualifier from pointer target type [enabled by default]
 getevents.c:1921:9:
  warning: passing argument 7 of '__dtrace_Xserver___input__event' disards
  'const' qualifier from pointer target type [enabled by default]

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 9e002dfcd7)
2015-07-29 11:16:32 -04:00
Adam Jackson 2123f7682d xserver 1.17.2
Signed-off-by: Adam Jackson <ajax@redhat.com>
2015-06-16 11:42:47 -04:00
Dave Airlie 8a5fb096d4 glamor: don't do render ops with matching source/dest (v2)
XRender defines this, GL really doesn't like it.

kwin 4.x and qt 4.x seem to make this happen for the
gradient in the titlebar, and on radeonsi/r600 hw
this draws all kinds of wrong.

v2: bump this up a level, and check it earlier.
(I assume the XXXX was for this case.)

[This corresponds to fa12f2c150 in master,
fixed up for 1.17 branch. - ajax]

Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-06-16 11:21:26 -04:00
Rui Matos ea9e021843 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>
(cherry picked from commit cbb7eb73b5)
2015-06-16 11:21:26 -04:00
Chris Wilson 6cc61df989 present: Copy unflip contents back to the Screen Pixmap
As we unflip after the flip Window no longer passes the pixel ownership
test for the full Screen Pixmap, we can no longer utilize that Window to
copy the contents back to the backing pixmap. To first flip means that
the Window was originally backed by the Screen Pixmap and wholly covered
the Pixmap, thus we need to copy the last frame contents to the Screen
Pixmap when the flip chain is complete.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com>
(cherry picked from commit 806470b9f6)
2015-06-16 11:21:26 -04:00
Vicente Olivert Riera 8b7e1f362b backtrace.c: Fix word cast to a pointer
backtrace.c uses a word size provided by libunwind. In some
architectures like MIPS, libunwind makes that word size 64-bit for all
variants of the architecture.

In the lines #90 and #98, backtrace.c tries to do a cast to a pointer,
which fails in all MIPS variants with 32-bit pointers, like MIPS32 or
MIPS64 n32, because it's trying to do a cast from a 64-bit wide variable
to a 32-bit pointer:

Making all in os
make[2]: Entering directory
`/home/test/test/1/output/build/xserver_xorg-server-1.15.1/os'
  CC     WaitFor.lo
  CC     access.lo
  CC     auth.lo
  CC     backtrace.lo
backtrace.c: In function 'xorg_backtrace':
backtrace.c:90:20: error: cast to pointer from integer of different size
[-Werror=int-to-pointer-cast]
	 if (dladdr((void *)(pip.start_ip + off), &dlinfo) &&
dlinfo.dli_fname &&
		    ^
backtrace.c:98:13: error: cast to pointer from integer of different size
[-Werror=int-to-pointer-cast]
	     (void *)(pip.start_ip + off));
	     ^
cc1: some warnings being treated as errors
make[2]: *** [backtrace.lo] Error 1
make[2]: *** Waiting for unfinished jobs....

Making the cast to a pointer-sized integer, and then to a pointer fixes
the problem.

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

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit baa50f60ac)
2015-06-03 09:05:39 -04:00
Ray Strode c424458c93 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>
(cherry picked from commit 76636ac12f)
2015-06-03 09:05:39 -04:00
Ray Strode 01b4f5bc89 os: support new implicit local user access mode [CVE-2015-3164 2/3]
If the X server is started without a '-auth' argument, then
it gets started wide open to all local users on the system.

This isn't a great default access model, but changing it in
Xorg at this point would break backward compatibility.

Xwayland, on the other hand is new, and much more targeted
in scope.  It could, in theory, be changed to allow the much
more secure default of a "user who started X server can connect
clients to that server."

This commit paves the way for that change, by adding a mechanism
for DDXs to opt-in to that behavior.  They merely need to call

LocalAccessScopeUser()

in their init functions.

A subsequent commit will add that call for Xwayland.

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>
(cherry picked from commit 4b4b9086d0)
2015-06-03 09:05:39 -04:00
Ray Strode bebaaa2216 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>
(cherry picked from commit c4534a38b6)
2015-06-03 09:05:39 -04:00
Egbert Eich 761be9cceb 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>
(cherry picked from commit 910ddf8521)
2015-06-03 09:05:39 -04:00
Egbert Eich f775f24773 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>
(cherry picked from commit c65eda5e66)
2015-06-03 09:05:39 -04:00
Egbert Eich 6395873ea9 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>
(cherry picked from commit 66212ca0d2)
2015-06-03 09:05:38 -04:00
Egbert Eich 70ce575307 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>
(cherry picked from commit b536d56aef)
2015-06-03 09:05:38 -04:00
Egbert Eich a4882ac792 Xephyr: Don't crash when no command line argument is specified
The DDX specific command line parsing function only gets called
if command line arguments are present. Therefore this function
is not suitable to initialize mandatory global variables.
Replace main() instead.

Signed-off-by: Egbert Eich <eich@freedesktop.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 5af73f4908)
2015-06-03 09:05:38 -04:00
Jonathan Gray 0dc9da5ce9 glamor: fix build when DRI3 is not defined
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 00f79416b1)
2015-06-03 09:05:38 -04:00
Jonathan Gray 828a1e3803 glamor: remove const from the return type of glamor_get_drawable_location()
Fixes a build error with gcc 4.2.1 on OpenBSD due to
-Werror=return-type from xorg-macros.

error: type qualifiers ignored on function return type

Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 7c609c911a)
2015-06-03 09:05:38 -04:00
Michel Dänzer 68eb9afb20 modesetting: Include dix-config.h from dumb_bo.c
Fixes mmap failures with 32-bit builds.

Signed-off-by: Michel Dänzer <michel@daenzer.net>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 145ae03814)
2015-06-03 09:05:38 -04:00
Michel Dänzer 554cb404a5 Add AC_SYS_LARGEFILE defines to dix-config.h
Without this, AC_SYS_LARGEFILE doesn't actually have any effect.

Signed-off-by: Michel Dänzer <michel@daenzer.net>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 4962c8c088)
2015-06-03 09:05:38 -04:00
Adel Gadllah ae3aa32688 modesetting: Fix software cursor fallback
The code in drmmode_set_cursor does not properly handle the case where
drmModeSetCursor2 returns any other error than EINVAL and silently fails to set
a cursor.

So only return when the drmModeSetCursor2 succeeds (i.e returns 0) and disable
the cursor2 usage on EINVAL.

References: https://bugzilla.redhat.com/show_bug.cgi?id=1205725
Signed-off-by: Adel Gadllah <adel.gadllah@gmail.com>
Reviewed-by: Michel Dänzer <michel@daenzer.net>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit c3ce9d8fd4)
2015-06-03 09:05:38 -04:00
Dima Ryazanov d8a39245d6 xwayland: Implement smooth scrolling
We don't even need to simulate button clicks; it's done automatically.
This also fixes scrolling in Qt5 apps.

Signed-off-by: Dima Ryazanov <dima@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 81a51a6cac)
2015-06-03 09:05:38 -04:00
Jason Gerecke 5b23104d58 dix: Do not allow device transform to be set on valuatorless devices
If a device does not have any valuators, it makes no sense to set the
device transformation. Return a BadMatch error to let the caller know
that they're trying something stupid.

Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 9ff89a2e46)
2015-06-03 09:05:38 -04:00
Rui Matos 6f7a3366a2 dix/events: Set currentTime to the given time stamp in NoticeTime
The refactoring in commit efc1035ca9
removed the actual update of currentTime.

Signed-off-by: Rui Matos <tiagomatos@gmail.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit fa62ca68ef)
2015-06-03 09:05:38 -04:00
Brent Collins 1a87dbc2ce shm: Fix xselinux resource initialization for xinerama pixmaps
This is necessary to avoid a NULL pointer deference when the pixmap is
used later.

[ajax: massaged commit message, fixed it to compile]

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89748
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Brent Collins <bcollins@trustedcs.com>
(cherry picked from commit 7470578520)
2015-06-03 09:05:38 -04:00
Chris Wilson 4f3df05728 shm: Fix use-after-free in ShmDestroyPixmap
We pass the pPixmap->drawable.id to the ShmDetachSegment function after
the pPixmap is freed. Fortunately, we don't use the value inside
ShmDetachSegment and can simply pass zero instead.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Michel Dänzer <michel@daenzer.net>
(cherry picked from commit bcec9f867d)
2015-06-03 09:05:38 -04:00
Olivier Fourdan 40f35e4488 dix: Fix image byte order on big endian hardware
Make sure X_BIG_ENDIAN/X_LITTLE_ENDIAN are defined before actually using
them.

Otherwise, image byte order could be wrong on big endian hardware even
though endianess detection is correct.

Reported-by: Tim Waugh <twaugh@redhat.com>
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit 1af15aaf27)
2015-06-03 09:05:38 -04:00
Jason Gerecke 5497f56b87 xfree86: Return NULL from xf86CompatOutput if no compat_output is defined
If no compat_output is defined, we inadvertently (attempt to) return
whatever data is at index -1. Instead, return NULL since that's what
callers are expecting.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
(cherry picked from commit 28159eff6b)
2015-06-03 09:05:37 -04:00
Robert Ancell 9e39ba30f1 xwayland: Fix error strings
Fix missing newlines from error string and fix grammar.

Signed-off-by: Robert Ancell <robert.ancell@canonical.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
(cherry picked from commit cad831f398)
2015-06-03 09:05:37 -04:00
Colin Harrison 953520ef98 os/utils.c: Don't try to build os_move_fd() for WIN32
Signed-off-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
(cherry picked from commit a9b4b7b796)
2015-06-03 09:05:37 -04:00
Jon TURNEY cc88bb64ad hw/xnest: Fix build for MinGW
Include the wrapped windows.h via X11/Xwindows.h before xcb_keysyms.h to avoid
type clashes caused by the unwrapped windows.h that includes.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
(cherry picked from commit 2b114d6a51)
2015-06-03 09:05:37 -04:00
Jon TURNEY 36bba39db1 hw/xwin/winclipboard: Link xwinclip with -lpthread
Link xwinclip with -lpthread to fix build for MinGW

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
(cherry picked from commit 5bf3e5c832)
2015-06-03 09:05:37 -04:00
Colin Harrison 5ea517fd39 os/xdmcp.c: Include Xtrans.h when building for WIN32
Xtrans.h must be included on WIN32 to prototype _XSERVTransWSAStartup()

xserver/os/xdmcp.c: In function ‘get_addr_by_name’:
xserver/os/xdmcp.c:1483:5: error: implicit declaration of function ‘_XSERVTransWSAStartup’ [-Werror=implicit-function-declaration]

Signed-off-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
(cherry picked from commit 8363ef2764)
2015-06-03 09:05:37 -04:00
Alan Coopersmith 2a2f676dce Accept x86_64 as well as i*86 for $host_cpu in Solaris on x86
Needed when using a compiler that defaults to 64-bit output when
configure is checking for $host_cpu.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Thomas Klausner <wiz@NetBSD.org>
(cherry picked from commit d4e85afac6)
2015-06-03 09:05:37 -04:00
Ray Strode 9b9d621f11 systemd-logind: don't second guess D-Bus default timeout
At the moment, the X server uses a non-default timeout for D-Bus
messages to systemd-logind. The only timeouts normally used with
D-Bus are:

1) Infinite
2) Default

Anything else is just as arbitrary as Default, and so rarely makes
sense to use instead of Default.

Put another way, there's little reason to be fault tolerant against
a local root running daemon (logind), that in some configurations, the
X server already depends on for proper functionality.

This commit changes systemd-logind to just use the default timeouts.

Downstream-bug: https://bugzilla.redhat.com/show_bug.cgi?id=1209347
Signed-off-by: Ray Strode <rstrode@redhat.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit b1029716e4)
2015-06-03 09:05:37 -04:00
Ray Strode bb5a8da756 systemd-logind: filter out non-signal messages from message filter
It's possible to receive a message reply in the message filter if a
previous message call timed out locally before the reply arrived.

The message_filter function only handles signals, at the moment, and
does not properly handle message replies.

This commit changes the message_filter function to filter out all
non-signal messages, including spurious message replies.

Downstream-bug: https://bugzilla.redhat.com/show_bug.cgi?id=1209347
Signed-off-by: Ray Strode <rstrode@redhat.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 792e925167)
2015-06-03 09:05:37 -04:00
Keith Packard 2c818e7b5d mi: Partial pie-slice filled arcs may need more space for spans
The mi filled arc code estimates that a filled arc will produce no
more spans than the arc is tall. This is true for most arcs except
for pie-slice arcs strictly between 180 and 360 degrees where the missing
portion of the arc faces up or down such that we get two spans on some
scanlines.

For those, we need to reserve room for another height/2 spans. This
patch just does it for all partial pie-sliced arcs to make the test
easier to understand; it's just over-allocating a bit of memory, so
that's safe.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit 41932dfbc8)
2015-06-03 09:05:37 -04:00
Hans de Goede 72b66d508a Re-enable non serverfd input devices immediately on vtenter
Non serverfd input devices will never get a systemd-logind dbus resume signal,
causing them to never get re-enabled.

This commit changes xf86VTEnter() to enable them immediately, fixing this.

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=89756
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 21e7d2bb5c)
2015-06-03 09:05:37 -04:00
Aaron Plattner 2ce54b8139 xfree86: Add GPU screens even if there are no active GDevs
xf86platformProbeDev creates GPU screens for any platform devices that were not
matched by a GDev in the loop above, but only if there was at least one device.
This means that it's impossible to configure a device as a GPU screen if there
is only one platform device that matches that driver.

Instead, create a GPU screen (if possible) for any platform device that was not
claimed by the GDev loop.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit e36236eade)
2015-06-03 09:05:37 -04:00
Aaron Plattner 905126c66c xfree86: Fix xf86_check_platform_slot's handling of PCI
If a PCI entity is found, xf86_check_platform_slot performs a device ID check
against the xf86_platform_device passed in.  However, it just returns
immediately without checking the rest of the entities first.  This leads to this
situation happening:

1. The nvidia driver creates an entity 0 with bus.type == BUS_PCI
2. The intel driver creates entity 1 for its platform device, opening
   /dev/dri/card0
3. xf86platformProbeDev calls probeSingleDevice on the Intel platform device,
   which calls doPlatformProbe, which calls xf86_check_platform_slot.
4. xf86_check_platform_slot compares the Intel platform device against the
   NVIDIA PCI entity.  Since they don't have the same device ID, it returns
   TRUE.
5. doPlatformProbe calls xf86ClaimPlatformSlot, which creates a duplicate entity
   for the Intel one.

Fix this by only returning FALSE if the PCI ID matches, and continuing the loop
otherwise.  In the scenario above, this allows it to continue on to find the
Intel platform device that matches the second entity.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 4ecda36259)
2015-06-03 09:05:37 -04:00
Jon TURNEY d8153d1767 glamor: Fix build when configured --enable-glamor --disable-xshmfence
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>
(cherry picked from commit 8102927282)
2015-06-03 09:05:37 -04:00
Olivier Fourdan e0bb4a1ec7 glamor: check max native ALU instructions
When using glamor (either in Xephyr or Xwayland) on hardware with too
low instructions limit, glamor fallbacks to sw due to large shaders.

This makes glamor unbearably slow on such hardware.

Check reported value for GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB
and fail in glamor_init() if the limit is lower than 128.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=88316
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit 4218a1e066)
2015-06-03 09:05:36 -04:00
Maarten Lankhorst 9d4c8ff673 glamor: GL_TEXTURE_MAX_LEVEL is not available on GLES2
Remove the calls to GL_TEXTURE_MAX_LEVEL. Setting the filtering is
a sufficient hint to the driver about texture mipmap allocation.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit 0e1372e1bd)
2015-06-03 09:05:36 -04:00
Maarten Lankhorst 3bfeccf88a glamor: Use GL_FRAMEBUFFER instead of GL_READ_FRAMEBUFFER
The latter might not be available on GLES2.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit c1f35c3d86)
2015-06-03 09:05:36 -04:00
Maarten Lankhorst 6a37a33e4c glamor: do not check for gl errors in glamor_build_program
According to Eric Anholt the check for glGetError is not needed here.
Because a opengl error might be set before this function is called
keeping the check could result in glamor_build_program returning
failure when building the shader succeeded.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit b66501b4fd)
2015-06-03 09:05:36 -04:00
Maarten Lankhorst 1ec335ca15 glamor: only use (un)pack_subimage when available
Check for GL_EXT_unpack_subimage and GL_NV_pack_subimage to
check if GL_(UN)PACK_ROW_LENGTH is available. Set the offsets
manually to prevent calls to GL_(UN)PACK_SKIP_*.

v2: Check support for GL_NV_pack_subimage as suggested by Matt Turner.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit 7c6f483670)
2015-06-03 09:05:36 -04:00
Olivier Fourdan 5df6982a14 xwayland: Add dependency on glamor libs
So that Xwayland gets re-linked each time glamor is modified.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit 4f534c26c6)
2015-06-03 09:05:36 -04:00
Olivier Fourdan e2bddc36af ephyr: Fail if glamor is requested but not usable
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit 251a067993)
2015-06-03 09:05:36 -04:00
Emil Velikov e2c6135179 randr: use randr: prefix in ErrorF()
To provide some information about the origin of the message.

Cc: Dave Airlie <airlied@redhat.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 93ef0e580e)
2015-06-03 09:05:36 -04:00
Emil Velikov 8c3a0a1904 randr: remove chatty error messages
All of these seem like left over from developments stage. Remove them as
they can cause excessive flood in the logs.

Cc: Dave Airlie <airlied@redhat.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit a08ee77398)
2015-06-03 09:05:36 -04:00
Jon TURNEY 660b4469f2 hw/xwin: Report Cygwin version information in log
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
(cherry picked from commit b2aaf69e62)
2015-06-03 09:05:36 -04:00
Jon TURNEY c3db722ffe hw/xwin/glx: Improve code generator to deal with latest Khronos OpenGL registry XML
Improve the parsing of the <proto> XML element

Include all text from the param element, in the order it appears in the xml
document, as part of the formal parameter declaration

This is needed to correctly handle the XML description added in svn r27498 of
glPathGlyphIndexRangeNV()'s baseAndCount parameter of type GLuint[2]

This fixes the way the parameter declaration is generated so it is in the
correct form 'GLuint baseAndCount_[2]' and not 'GLuint baseAndCount[2]_'

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
(cherry picked from commit d02f9611c8)
2015-06-03 09:05:36 -04:00
Jon TURNEY 6fa7510e6a hw/xwin/glx: Refactor parsing of the <proto> XML element
Factor out duplicated code used in parsing of the <proto> XML element in the
code generator

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
(cherry picked from commit 5071cb7e0a)
2015-06-03 09:05:36 -04:00
Jon TURNEY 1de38b588e os: Teach vpnprintf() how to handle "%*.*s"
XdmcpFatal uses the format specifier %*.*s, which vpnprintf() doesn't
understand, which causes a backtrace and prevents the reason for the XDMCP
failure being logged.

See also:
https://bugs.freedesktop.org/show_bug.cgi?id=66862
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=758574

"%*.*s" is also currently used in a few other places, so teach vpnprintf() how
to handle it

$ fgrep -r "%*.*s" *
hw/dmx/config/scanner.l:    fprintf(stderr, "parse error on line %d at token \"%*.*s\"\n",
hw/dmx/dmxlog.c:        ErrorF("(%s) dmx[i%d/%*.*s]: ", type,
hw/dmx/input/dmxinputinit.c:                dmxLogCont(dmxInfo, "\t[i%d/%*.*s",
os/access.c:        ErrorF("Xserver: siAddrMatch(): type = %s, value = %*.*s -- %s\n",
os/access.c:                ("Xserver: siCheckAddr(): type = %s, value = %*.*s, len = %d -- %s\n",
os/xdmcp.c:    FatalError("XDMCP fatal error: %s %*.*s\n", type,

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
(cherry picked from commit d3080d421b)
2015-06-03 09:05:36 -04:00
Jon TURNEY 44930264eb os: XDMCP options like -query etc. should imply -listen tcp
In X server 1.17, the default configuration is now -nolisten tcp.  In this
configuration, XDMCP options don't work usefully, as the X server is not
listening on the port for the display that it tells the display manager to
connect to.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
(cherry picked from commit 491cf02e19)
2015-06-03 09:05:36 -04:00
Jon TURNEY 74ab42c85b ephyr: Avoid a segfault with 'DISPLAY= Xephy -glamor'
ephyr_glamor_connect() returns NULL if we failed, but applying
xcb_connection_has_error() to NULL is not permitted.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
(cherry picked from commit f42520c5f1)
2015-06-03 09:05:36 -04:00
Jürg Billeter dee92c7805 int10: Fix error check for pci_device_map_legacy
pci_device_map_legacy returns 0 on success.

Signed-off-by: Jürg Billeter <j@bitron.ch>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 0a78b599b3)
2015-06-03 09:05:35 -04:00
Alan Coopersmith 19da4355ee Clear ListenTransConns entries in CloseWellKnownConnections
Since _XSERVTransClose frees the connection pointer passed to it,
remove that pointer from the array, so we don't try to double free it
if we come back into CloseWellKnownConnections again.

Should fix https://bugzilla.yoctoproject.org/show_bug.cgi?id=6665 in which
the shutdown section of the main() loop called CloseWellKnownConnections()
and then moved on to ddxGiveUp(), which failed to release the VT and thus
called AbortServer(), which called CloseWellKnownConnections() again.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 7ea64fb437)
2015-06-03 09:05:35 -04:00
Michal Srb a4132357c2 Expose GetMaster to modules.
Add _X_EXPORT to GetMaster function. It is required by tigervnc's VNC module.

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 5c4202ea85)
2015-06-03 09:05:35 -04:00
Dave Airlie 650a1fd274 os/access: fix regression in server interpreted auth
This was reported on irc on Fedora when rawhide went to 1.17.1.

regression occured in: 2566835b43
 os: Eliminate uninitialized value warnings from access.c

siAddrMatch doesn't need addr to be a useful value, it checks
some things like localuser without having an address at all.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Tested-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 9d9bd38fe1)
2015-06-03 09:05:35 -04:00
Egbert Eich 7a45d1684f symbols: Fix sdksyms.sh to cope with gcc5
Gcc5 adds additional lines stating line numbers before and
after __attribute__() which need to be skipped.

Signed-off-by: Egbert Eich <eich@freedesktop.org>
Tested-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 21b896939c)
2015-06-03 09:05:35 -04:00
Keith Packard 3b0d1ba226 Release 1.17.1
Signed-off-by: Keith Packard <keithp@keithp.com>
2015-02-10 14:43:59 -08:00
Olivier Fourdan f160e72267 xkb: Check strings length against request size
Ensure that the given strings length in an XkbSetGeometry request remain
within the limits of the size of the request.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 20079c36cf)
2015-02-10 14:40:00 -08:00
Olivier Fourdan 29be310c30 xkb: Don't swap XkbSetGeometry data in the input buffer
The XkbSetGeometry request embeds data which needs to be swapped when the
server and the client have different endianess.

_XkbSetGeometry() invokes functions that swap these data directly in the
input buffer.

However, ProcXkbSetGeometry() may call _XkbSetGeometry() more than once
(if there is more than one keyboard), thus causing on swapped clients the
same data to be swapped twice in memory, further causing a server crash
because the strings lengths on the second time are way off bounds.

To allow _XkbSetGeometry() to run reliably more than once with swapped
clients, do not swap the data in the buffer, use variables instead.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 81c90dc8f0)
2015-02-10 14:39:59 -08:00
170 changed files with 1270 additions and 878 deletions

View File

@ -260,7 +260,7 @@ ShmDestroyPixmap(PixmapPtr pPixmap)
pScreen->DestroyPixmap = ShmDestroyPixmap;
if (shmdesc)
ShmDetachSegment(shmdesc, pPixmap->drawable.id);
ShmDetachSegment(shmdesc, 0);
return ret;
}
@ -427,7 +427,7 @@ ProcShmAttach(ClientPtr client)
/*ARGSUSED*/ static int
ShmDetachSegment(void *value, /* must conform to DeleteType */
XID shmseg)
XID unused)
{
ShmDescPtr shmdesc = (ShmDescPtr) value;
ShmDescPtr *prev;
@ -971,6 +971,12 @@ ProcPanoramiXShmCreatePixmap(ClientPtr client)
stuff->offset);
if (pMap) {
result = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->pid,
RT_PIXMAP, pMap, RT_NONE, NULL, DixCreateAccess);
if (result != Success) {
pDraw->pScreen->DestroyPixmap(pMap);
return result;
}
dixSetPrivate(&pMap->devPrivates, shmPixmapPrivateKey, shmdesc);
shmdesc->refcnt++;
pMap->drawable.serialNumber = NEXT_SERIAL_NUMBER;

View File

@ -213,6 +213,21 @@ XaceHook(int hook, ...)
return prv ? *prv : Success;
}
/* XaceHookIsSet
*
* Utility function to determine whether there are any callbacks listening on a
* particular XACE hook.
*
* Returns non-zero if there is a callback, zero otherwise.
*/
int
XaceHookIsSet(int hook)
{
if (hook < 0 || hook >= XACE_NUM_HOOKS)
return 0;
return XaceHooks[hook] != NULL;
}
/* XaceCensorImage
*
* Called after pScreen->GetImage to prevent pieces or trusted windows from

View File

@ -65,6 +65,9 @@ extern _X_EXPORT int XaceHook(int /*hook */ ,
... /*appropriate args for hook */
);
/* determine whether any callbacks are present for the XACE hook */
extern _X_EXPORT int XaceHookIsSet(int hook);
/* Special-cased hook functions
*/
extern _X_EXPORT int XaceHookDispatch(ClientPtr ptr, int major);
@ -109,6 +112,7 @@ extern _X_EXPORT void XaceCensorImage(ClientPtr client,
#ifdef __GNUC__
#define XaceHook(args...) Success
#define XaceHookIsSet(args...) 0
#define XaceHookDispatch(args...) Success
#define XaceHookPropertyAccess(args...) Success
#define XaceHookSelectionAccess(args...) Success
@ -116,6 +120,7 @@ extern _X_EXPORT void XaceCensorImage(ClientPtr client,
#define XaceCensorImage(args...) { ; }
#else
#define XaceHook(...) Success
#define XaceHookIsSet(...) 0
#define XaceHookDispatch(...) Success
#define XaceHookPropertyAccess(...) Success
#define XaceHookSelectionAccess(...) Success

View File

@ -147,7 +147,7 @@ SELinuxLabelClient(ClientPtr client)
strncpy(subj->command, cmdname, COMMAND_LEN - 1);
if (!cached)
free(cmdname); /* const char * */
free((void *) cmdname); /* const char * */
}
finish:
@ -294,6 +294,9 @@ SELinuxAudit(void *auditdata,
audit->extension ? audit->extension : "");
}
static int
SELinuxLog(int type, const char *fmt, ...) _X_ATTRIBUTE_PRINTF(2, 3);
static int
SELinuxLog(int type, const char *fmt, ...)
{
@ -316,6 +319,7 @@ SELinuxLog(int type, const char *fmt, ...)
va_start(ap, fmt);
vsnprintf(buf, MAX_AUDIT_MESSAGE_LENGTH, fmt, ap);
rc = audit_log_user_avc_message(audit_fd, aut, buf, NULL, NULL, NULL, 0);
(void) rc;
va_end(ap);
LogMessageVerb(X_WARNING, 0, "%s", buf);
return 0;
@ -476,7 +480,7 @@ SELinuxExtension(CallbackListPtr *pcbl, void *unused, void *calldata)
}
/* Perform the security check */
auditdata.extension = rec->ext->name;
auditdata.extension = (char *) rec->ext->name;
rc = SELinuxDoCheck(subj, obj, SECCLASS_X_EXTENSION, rec->access_mode,
&auditdata);
if (rc != Success)

View File

@ -1730,6 +1730,18 @@ ProcessDeviceEvent(InternalEvent *ev, DeviceIntPtr device)
break;
}
/* send KeyPress and KeyRelease events to XACE plugins */
if (XaceHookIsSet(XACE_KEY_AVAIL) &&
(event->type == ET_KeyPress || event->type == ET_KeyRelease)) {
xEvent *core;
int count;
if (EventToCore(ev, &core, &count) == Success && count > 0) {
XaceHook(XACE_KEY_AVAIL, core, device, 0);
free(core);
}
}
if (DeviceEventCallback && !syncEvents.playingEvents) {
DeviceEventInfoRec eventinfo;
SpritePtr pSprite = device->spriteInfo->sprite;

View File

@ -26,9 +26,9 @@ dnl
dnl Process this file with autoconf to create configure.
AC_PREREQ(2.60)
AC_INIT([xorg-server], 1.17.0, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
RELEASE_DATE="2015-02-02"
RELEASE_NAME="Côte de veau"
AC_INIT([xorg-server], 1.17.4, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
RELEASE_DATE="2015-10-28"
RELEASE_NAME="Cider Donut"
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([foreign dist-bzip2])
@ -1976,7 +1976,7 @@ if test "x$XORG" = xyes; then
sparc*)
SOLARIS_INOUT_ARCH="sparcv8plus"
;;
i*86)
i*86|x86_64*)
if test x$SOLARIS_64 = xyes ; then
SOLARIS_INOUT_ARCH="amd64"
else
@ -2423,7 +2423,8 @@ if test "$KDRIVE" = yes; then
fi
;;
esac
KDRIVE_LOCAL_LIBS="$MAIN_LIB $DIX_LIB $KDRIVE_LIB"
KDRIVE_MAIN_LIB="$MAIN_LIB"
KDRIVE_LOCAL_LIBS="$DIX_LIB $KDRIVE_LIB"
KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $FB_LIB $MI_LIB $KDRIVE_PURE_LIBS"
KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $KDRIVE_OS_LIB"
KDRIVE_LIBS="$KDRIVE_LOCAL_LIBS $XSERVER_SYS_LIBS $GLX_SYS_LIBS $DLOPEN_LIBS $TSLIB_LIBS"
@ -2435,6 +2436,7 @@ AC_SUBST([KDRIVE_INCS])
AC_SUBST([KDRIVE_PURE_INCS])
AC_SUBST([KDRIVE_CFLAGS])
AC_SUBST([KDRIVE_PURE_LIBS])
AC_SUBST([KDRIVE_MAIN_LIB])
AC_SUBST([KDRIVE_LOCAL_LIBS])
AC_SUBST([KDRIVE_LIBS])
AM_CONDITIONAL(KDRIVELINUX, [test "x$KDRIVELINUX" = xyes])

View File

@ -31,6 +31,9 @@
#include <sys/types.h>
#endif
typedef const uint8_t *const_uint8_p;
typedef const double *const_double_p;
provider Xserver {
/* reqType, data, length, client id, request buffer */
probe request__start(string, uint8_t, uint16_t, int, void *);
@ -49,7 +52,7 @@ provider Xserver {
/* client id, event type, event* */
probe send__event(int, uint8_t, void *);
/* deviceid, type, button/keycode/touchid, flags, nvalues, mask, values */
probe input__event(int, int, uint32_t, uint32_t, int8_t, uint8_t*, double*);
probe input__event(int, int, uint32_t, uint32_t, int8_t, const_uint8_p, const_double_p);
};
#pragma D attributes Unstable/Unstable/Common provider Xserver provider

View File

@ -177,6 +177,9 @@ DeviceSetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop,
if (!isfinite(f[i]))
return BadValue;
if (!dev->valuator)
return BadMatch;
if (!checkonly)
DeviceSetTransform(dev, f);
}

View File

@ -131,10 +131,7 @@ int ProcInitialConnection();
#ifdef XSERVER_DTRACE
#include "registry.h"
#include <sys/types.h>
typedef const char *string;
#include "Xserver-dtrace.h"
#include "probes.h"
#endif
#define mskcnt ((MAXCLIENTS + 31) / 32)

View File

@ -314,8 +314,6 @@ doOpenFont(ClientPtr client, OFclosurePtr c)
if (err == Suspended) {
if (!ClientIsAsleep(client))
ClientSleep(client, (ClientSleepProcPtr) doOpenFont, c);
else
goto xinerama_sleep;
return TRUE;
}
break;
@ -363,7 +361,6 @@ doOpenFont(ClientPtr client, OFclosurePtr c)
c->fontid, FontToXError(err));
}
ClientWakeup(c->client);
xinerama_sleep:
for (i = 0; i < c->num_fpes; i++) {
FreeFPE(c->fpe_list[i]);
}
@ -596,8 +593,6 @@ doListFontsAndAliases(ClientPtr client, LFclosurePtr c)
if (!ClientIsAsleep(client))
ClientSleep(client,
(ClientSleepProcPtr) doListFontsAndAliases, c);
else
goto xinerama_sleep;
return TRUE;
}
@ -623,8 +618,6 @@ doListFontsAndAliases(ClientPtr client, LFclosurePtr c)
ClientSleep(client,
(ClientSleepProcPtr) doListFontsAndAliases,
c);
else
goto xinerama_sleep;
return TRUE;
}
if (err == Successful)
@ -642,8 +635,6 @@ doListFontsAndAliases(ClientPtr client, LFclosurePtr c)
ClientSleep(client,
(ClientSleepProcPtr) doListFontsAndAliases,
c);
else
goto xinerama_sleep;
return TRUE;
}
if (err == FontNameAlias) {
@ -788,7 +779,6 @@ doListFontsAndAliases(ClientPtr client, LFclosurePtr c)
bail:
ClientWakeup(client);
xinerama_sleep:
for (i = 0; i < c->num_fpes; i++)
FreeFPE(c->fpe_list[i]);
free(c->fpe_list);
@ -888,8 +878,6 @@ doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c)
if (!ClientIsAsleep(client))
ClientSleep(client,
(ClientSleepProcPtr) doListFontsWithInfo, c);
else
goto xinerama_sleep;
return TRUE;
}
if (err == Successful)
@ -905,8 +893,6 @@ doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c)
if (!ClientIsAsleep(client))
ClientSleep(client,
(ClientSleepProcPtr) doListFontsWithInfo, c);
else
goto xinerama_sleep;
return TRUE;
}
}
@ -1040,7 +1026,6 @@ doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c)
WriteSwappedDataToClient(client, length, &finalReply);
bail:
ClientWakeup(client);
xinerama_sleep:
for (i = 0; i < c->num_fpes; i++)
FreeFPE(c->fpe_list[i]);
free(c->reply);
@ -1297,8 +1282,6 @@ doPolyText(ClientPtr client, PTclosurePtr c)
client_state = START_SLEEP;
continue; /* on to steps 3 and 4 */
}
else
goto xinerama_sleep;
return TRUE;
}
else if (lgerr != Successful) {
@ -1352,7 +1335,6 @@ doPolyText(ClientPtr client, PTclosurePtr c)
}
if (ClientIsAsleep(client)) {
ClientWakeup(c->client);
xinerama_sleep:
ChangeGC(NullClient, c->pGC, clearGCmask, clearGC);
/* Unreference the font from the scratch GC */
@ -1477,8 +1459,6 @@ doImageText(ClientPtr client, ITclosurePtr c)
ClientSleep(client, (ClientSleepProcPtr) doImageText, c);
}
else
goto xinerama_sleep;
return TRUE;
}
else if (lgerr != Successful) {
@ -1501,7 +1481,6 @@ doImageText(ClientPtr client, ITclosurePtr c)
}
if (ClientIsAsleep(client)) {
ClientWakeup(c->client);
xinerama_sleep:
ChangeGC(NullClient, c->pGC, clearGCmask, clearGC);
/* Unreference the font from the scratch GC */

View File

@ -125,13 +125,7 @@ Equipment Corporation.
#include <X11/extensions/XKBproto.h>
#include "xkbsrv.h"
#include "xace.h"
#ifdef XSERVER_DTRACE
#include <sys/types.h>
typedef const char *string;
#include "Xserver-dtrace.h"
#endif
#include "probes.h"
#include <X11/extensions/XIproto.h>
#include <X11/extensions/XI2proto.h>
@ -1063,6 +1057,7 @@ MonthChangedOrBadTime(CARD32 *ms)
void
NoticeTime(const DeviceIntPtr dev, TimeStamp time)
{
currentTime = time;
lastDeviceEventTime[XIAllDevices].time = currentTime;
lastDeviceEventTime[dev->id].time = currentTime;

View File

@ -68,12 +68,7 @@
#include "exevents.h"
#include "extnsionst.h"
#include "listdev.h" /* for sizing up DeviceClassesChangedEvent */
#if XSERVER_DTRACE
#include <sys/types.h>
typedef const char *string;
#include <Xserver-dtrace.h>
#endif
#include "probes.h"
/* Number of motion history events to store. */
#define MOTION_HISTORY_SIZE 256

View File

@ -337,6 +337,7 @@ dix_main(int argc, char *argv[], char *envp[])
for (i = screenInfo.numGPUScreens - 1; i >= 0; i--) {
ScreenPtr pScreen = screenInfo.gpuscreens[i];
FreeScratchPixmapsForScreen(pScreen);
dixFreeScreenSpecificPrivates(pScreen);
(*pScreen->CloseScreen) (pScreen);
dixFreePrivates(pScreen->devPrivates, PRIVATE_SCREEN);
free(pScreen);

View File

@ -642,6 +642,15 @@ dixRegisterScreenSpecificPrivateKey(ScreenPtr pScreen, DevPrivateKey key,
void
dixFreeScreenSpecificPrivates(ScreenPtr pScreen)
{
DevPrivateType t;
for (t = PRIVATE_XSELINUX; t < PRIVATE_LAST; t++) {
DevPrivateKey key;
for (key = pScreen->screenSpecificPrivates[t].key; key; key = key->next) {
key->initialized = FALSE;
}
}
}
/* Initialize screen-specific privates in AddScreen */

View File

@ -6,20 +6,6 @@
#
# This is a security-sensitive file, please set permissions as appropriate.
#
R001 Adobe-DPS-Extension:Init
R002 Adobe-DPS-Extension:CreateContext
R003 Adobe-DPS-Extension:CreateSpace
R004 Adobe-DPS-Extension:GiveInput
R005 Adobe-DPS-Extension:GetStatus
R006 Adobe-DPS-Extension:DestroySpace
R007 Adobe-DPS-Extension:Reset
R008 Adobe-DPS-Extension:NotifyContext
R009 Adobe-DPS-Extension:CreateContextFromID
R010 Adobe-DPS-Extension:XIDFromContext
R011 Adobe-DPS-Extension:ContextFromXID
R012 Adobe-DPS-Extension:SetStatusMask
R013 Adobe-DPS-Extension:CreateSecureContext
R014 Adobe-DPS-Extension:NotifyWhenReady
R000 Apple-DRI:QueryVersion
R001 Apple-DRI:QueryDirectRenderingCapable
R002 Apple-DRI:CreateSurface
@ -65,22 +51,6 @@ R003 DAMAGE:Subtract
R004 DAMAGE:Add
V000 DAMAGE:Notify
E000 DAMAGE:BadDamage
R000 DEC-XTRAP:Reset
R001 DEC-XTRAP:GetAvailable
R002 DEC-XTRAP:Config
R003 DEC-XTRAP:StartTrap
R004 DEC-XTRAP:StopTrap
R005 DEC-XTRAP:GetCurrent
R006 DEC-XTRAP:GetStatistics
R007 DEC-XTRAP:SimulateXEvent
R008 DEC-XTRAP:GetVersion
R009 DEC-XTRAP:GetLastInpTime
V000 DEC-XTRAP:Event
E002 DEC-XTRAP:BadIO
E004 DEC-XTRAP:BadStatistics
E005 DEC-XTRAP:BadDevices
E007 DEC-XTRAP:BadScreen
E008 DEC-XTRAP:BadSwapReq
R000 DMX:DMXQueryVersion
R001 DMX:DMXGetScreenCount
R002 DMX:DMXGetScreenInfoDEPRECATED
@ -124,6 +94,19 @@ R004 DRI2:DestroyDrawable
R005 DRI2:GetBuffers
R006 DRI2:CopyRegion
R007 DRI2:GetBuffersWithFormat
R008 DRI2:SwapBuffers
R009 DRI2:GetMSC
R010 DRI2:WaitMSC
R011 DRI2:WaitSBC
R012 DRI2:SwapInterval
V000 DRI2:BufferSwapComplete
V001 DRI2:InvalidateBuffers
R000 DRI3:QueryVersion
R001 DRI3:Open
R002 DRI3:PixmapFromBuffer
R003 DRI3:BufferFromPixmap
R004 DRI3:FenceFromFD
R005 DRI3:FDFromFence
R000 Extended-Visual-Information:QueryVersion
R001 Extended-Visual-Information:GetVisualInfo
R000 FontCache:QueryVersion
@ -152,6 +135,20 @@ R017 GLX:VendorPrivateWithReply
R018 GLX:QueryExtensionsString
R019 GLX:QueryServerString
R020 GLX:ClientInfo
R021 GLX:GetFBConfigs
R022 GLX:CreatePixmap
R023 GLX:DestroyPixmap
R024 GLX:CreateNewContext
R025 GLX:QueryContext
R026 GLX:MakeContextCurrent
R027 GLX:CreatePbuffer
R028 GLX:DestroyPbuffer
R029 GLX:GetDrawableAttributes
R030 GLX:ChangeDrawableAttributes
R031 GLX:CreateWindow
R032 GLX:DeleteWindow
R033 GLX:SetClientInfoARB
R034 GLX:CreateContextAttribsARB
R101 GLX:NewList
R102 GLX:EndList
R103 GLX:DeleteLists
@ -194,6 +191,26 @@ R139 GLX:GetTexLevelParameteriv
R140 GLX:IsEnabled
R141 GLX:IsList
R142 GLX:Flush
R143 GLX:AreTexturesResident
R144 GLX:DeleteTextures
R145 GLX:GenTextures
R146 GLX:IsTexture
R147 GLX:GetColorTable
R148 GLX:GetColorTableParameterfv
R149 GLX:GetColorTableParameterfv
R150 GLX:GetConvolutionFilter
R151 GLX:GetConvolutionParameterfv
R152 GLX:GetConvolutionParameteriv
R153 GLX:GetSeparableFilter
R154 GLX:GetHistogram
R155 GLX:GetHistogramParameterfv
R156 GLX:GetHistogramParameteriv
R157 GLX:GetMinmax
R158 GLX:GetMinmaxParameterfv
R159 GLX:GetMinmaxParameteriv
R160 GLX:GetCompressedTexImage
V000 GLX:PbufferClobber
V001 GLX:BufferSwapComplete
E000 GLX:BadContext
E001 GLX:BadContextState
E002 GLX:BadDrawable
@ -203,51 +220,10 @@ E005 GLX:BadCurrentWindow
E006 GLX:BadRenderRequest
E007 GLX:BadLargeRequest
E008 GLX:UnsupportedPrivateRequest
R000 LBX:QueryVersion
R001 LBX:StartProxy
R002 LBX:StopProxy
R003 LBX:Switch
R004 LBX:NewClient
R005 LBX:CloseClient
R006 LBX:ModifySequence
R007 LBX:AllowMotion
R008 LBX:IncrementPixel
R009 LBX:Delta
R010 LBX:GetModifierMapping
R011 LBX:QueryTag
R012 LBX:InvalidateTag
R013 LBX:PolyPoint
R014 LBX:PolyLine
R015 LBX:PolySegment
R016 LBX:PolyRectangle
R017 LBX:PolyArc
R018 LBX:FillPoly
R019 LBX:PolyFillRectangle
R020 LBX:PolyFillArc
R021 LBX:GetKeyboardMapping
R022 LBX:QueryFont
R023 LBX:ChangeProperty
R024 LBX:GetProperty
R025 LBX:TagData
R026 LBX:CopyArea
R027 LBX:CopyPlane
R028 LBX:PolyText8
R029 LBX:PolyText16
R030 LBX:ImageText8
R031 LBX:ImageText16
R032 LBX:QueryExtension
R033 LBX:PutImage
R034 LBX:GetImage
R035 LBX:BeginLargeRequest
R036 LBX:LargeRequestData
R037 LBX:EndLargeRequest
R038 LBX:InternAtoms
R039 LBX:GetWinAttrAndGeom
R040 LBX:GrabCmap
R041 LBX:ReleaseCmap
R042 LBX:AllocColor
R043 LBX:Sync
E000 LBX:BadLbxClient
E009 GLX:BadFBConfig
E010 GLX:BadPbuffer
E011 GLX:BadCurrentDrawable
E012 GLX:BadWindow
R000 MIT-SCREEN-SAVER:QueryVersion
R001 MIT-SCREEN-SAVER:QueryInfo
R002 MIT-SCREEN-SAVER:SelectInput
@ -261,24 +237,17 @@ R002 MIT-SHM:Detach
R003 MIT-SHM:PutImage
R004 MIT-SHM:GetImage
R005 MIT-SHM:CreatePixmap
R006 MIT-SHM:AttachFd
R007 MIT-SHM:CreateSegment
V000 MIT-SHM:Completion
E000 MIT-SHM:BadShmSeg
R000 MIT-SUNDRY-NONSTANDARD:SetBugMode
R001 MIT-SUNDRY-NONSTANDARD:GetBugMode
R000 Multi-Buffering:GetBufferVersion
R001 Multi-Buffering:CreateImageBuffers
R002 Multi-Buffering:DestroyImageBuffers
R003 Multi-Buffering:DisplayImageBuffers
R004 Multi-Buffering:SetMBufferAttributes
R005 Multi-Buffering:GetMBufferAttributes
R006 Multi-Buffering:SetBufferAttributes
R007 Multi-Buffering:GetBufferAttributes
R008 Multi-Buffering:GetBufferInfo
R009 Multi-Buffering:CreateStereoWindow
R010 Multi-Buffering:ClearImageBufferArea
V000 Multi-Buffering:ClobberNotify
V001 Multi-Buffering:UpdateNotify
E000 Multi-Buffering:BadBuffer
R000 Present:QueryVersion
R001 Present:Pixmap
R002 Present:NotifyMSC
R003 Present:SelectInput
R004 Present:QueryCapabilities
R000 RANDR:QueryVersion
R001 RANDR:OldGetScreenInfo
R002 RANDR:SetScreenConfig
@ -628,125 +597,6 @@ E014 X11:BadIDChoice
E015 X11:BadName
E016 X11:BadLength
E017 X11:BadImplementation
R001 X3D-PEX:GetExtensionInfo
R002 X3D-PEX:GetEnumeratedTypeInfo
R003 X3D-PEX:GetImpDepConstants
R004 X3D-PEX:CreateLookupTable
R005 X3D-PEX:CopyLookupTable
R006 X3D-PEX:FreeLookupTable
R007 X3D-PEX:GetTableInfo
R008 X3D-PEX:GetPredefinedEntries
R009 X3D-PEX:GetDefinedIndices
R010 X3D-PEX:GetTableEntry
R011 X3D-PEX:GetTableEntries
R012 X3D-PEX:SetTableEntries
R013 X3D-PEX:DeleteTableEntries
R014 X3D-PEX:CreatePipelineContext
R015 X3D-PEX:CopyPipelineContext
R016 X3D-PEX:FreePipelineContext
R017 X3D-PEX:GetPipelineContext
R018 X3D-PEX:ChangePipelineContext
R019 X3D-PEX:CreateRenderer
R020 X3D-PEX:FreeRenderer
R021 X3D-PEX:ChangeRenderer
R022 X3D-PEX:GetRendererAttributes
R023 X3D-PEX:GetRendererDynamics
R024 X3D-PEX:BeginRendering
R025 X3D-PEX:EndRendering
R026 X3D-PEX:BeginStructure
R027 X3D-PEX:EndStructure
R028 X3D-PEX:OutputCommands
R029 X3D-PEX:Network
R030 X3D-PEX:CreateStructure
R031 X3D-PEX:CopyStructure
R032 X3D-PEX:DestroyStructures
R033 X3D-PEX:GetStructureInfo
R034 X3D-PEX:GetElementInfo
R035 X3D-PEX:GetStructuresInNetwork
R036 X3D-PEX:GetAncestors
R037 X3D-PEX:GetDescendants
R038 X3D-PEX:FetchElements
R039 X3D-PEX:SetEditingMode
R040 X3D-PEX:SetElementPointer
R041 X3D-PEX:SetElementPointerAtLabel
R042 X3D-PEX:ElementSearch
R043 X3D-PEX:StoreElements
R044 X3D-PEX:DeleteElements
R045 X3D-PEX:DeleteElementsToLabel
R046 X3D-PEX:DeleteBetweenLabels
R047 X3D-PEX:CopyElements
R048 X3D-PEX:ChangeStructureRefs
R049 X3D-PEX:CreateNameSet
R050 X3D-PEX:CopyNameSet
R051 X3D-PEX:FreeNameSet
R052 X3D-PEX:GetNameSet
R053 X3D-PEX:ChangeNameSet
R054 X3D-PEX:CreateSearchContext
R055 X3D-PEX:CopySearchContext
R056 X3D-PEX:FreeSearchContext
R057 X3D-PEX:GetSearchContext
R058 X3D-PEX:ChangeSearchContext
R059 X3D-PEX:SearchNetwork
R060 X3D-PEX:CreatePhigsWks
R061 X3D-PEX:FreePhigsWks
R062 X3D-PEX:GetWksInfo
R063 X3D-PEX:GetDynamics
R064 X3D-PEX:GetViewRep
R065 X3D-PEX:RedrawAllStructures
R066 X3D-PEX:UpdateWorkstation
R067 X3D-PEX:RedrawClipRegion
R068 X3D-PEX:ExecuteDeferredActions
R069 X3D-PEX:SetViewPriority
R070 X3D-PEX:SetDisplayUpdateMode
R071 X3D-PEX:MapDCtoWC
R072 X3D-PEX:MapWCtoDC
R073 X3D-PEX:SetViewRep
R074 X3D-PEX:SetWksWindow
R075 X3D-PEX:SetWksViewport
R076 X3D-PEX:SetHlhsrMode
R077 X3D-PEX:SetWksBufferMode
R078 X3D-PEX:PostStructure
R079 X3D-PEX:UnpostStructure
R080 X3D-PEX:UnpostAllStructures
R081 X3D-PEX:GetWksPostings
R082 X3D-PEX:GetPickDevice
R083 X3D-PEX:ChangePickDevice
R084 X3D-PEX:CreatePickMeasure
R085 X3D-PEX:FreePickMeasure
R086 X3D-PEX:GetPickMeasure
R087 X3D-PEX:UpdatePickMeasure
R088 X3D-PEX:OpenFont
R089 X3D-PEX:CloseFont
R090 X3D-PEX:QueryFont
R091 X3D-PEX:ListFonts
R092 X3D-PEX:ListFontsWithInfo
R093 X3D-PEX:QueryTextExtents
R094 X3D-PEX:MatchRenderingTargets
R095 X3D-PEX:Escape
R096 X3D-PEX:EscapeWithReply
R097 X3D-PEX:Elements
R098 X3D-PEX:AccumulateState
R099 X3D-PEX:BeginPickOne
R100 X3D-PEX:EndPickOne
R101 X3D-PEX:PickOne
R102 X3D-PEX:BeginPickAll
R103 X3D-PEX:EndPickAll
R104 X3D-PEX:PickAll
E000 X3D-PEX:ColorTypeError
E001 X3D-PEX:erStateError
E002 X3D-PEX:FloatingPointFormatError
E003 X3D-PEX:LabelError
E004 X3D-PEX:LookupTableError
E005 X3D-PEX:NameSetError
E006 X3D-PEX:PathError
E007 X3D-PEX:FontError
E008 X3D-PEX:PhigsWksError
E009 X3D-PEX:PickMeasureError
E010 X3D-PEX:PipelineContextError
E011 X3D-PEX:erError
E012 X3D-PEX:SearchContextError
E013 X3D-PEX:StructureError
E014 X3D-PEX:OutputCommandError
R000 XC-APPGROUP:QueryVersion
R001 XC-APPGROUP:Create
R002 XC-APPGROUP:Destroy
@ -890,39 +740,6 @@ E003 XFree86-VidModeExtension:ModeUnsuitable
E004 XFree86-VidModeExtension:ExtensionDisabled
E005 XFree86-VidModeExtension:ClientNotLocal
E006 XFree86-VidModeExtension:ZoomLocked
R001 XIE:QueryImageExtension
R002 XIE:QueryTechniques
R003 XIE:CreateColorList
R004 XIE:DestroyColorList
R005 XIE:PurgeColorList
R006 XIE:QueryColorList
R007 XIE:CreateLUT
R008 XIE:DestroyLUT
R009 XIE:CreatePhotomap
R010 XIE:DestroyPhotomap
R011 XIE:QueryPhotomap
R012 XIE:CreateROI
R013 XIE:DestroyROI
R014 XIE:CreatePhotospace
R015 XIE:DestroyPhotospace
R016 XIE:ExecuteImmediate
R017 XIE:CreatePhotoflo
R018 XIE:DestroyPhotoflo
R019 XIE:ExecutePhotoflo
R020 XIE:ModifyPhotoflo
R021 XIE:RedefinePhotoflo
R022 XIE:PutClientData
R023 XIE:GetClientData
R024 XIE:QueryPhotoflo
R025 XIE:Await
R026 XIE:Abort
E000 XIE:ColorListError
E001 XIE:LUTError
E002 XIE:PhotofloError
E003 XIE:PhotomapError
E004 XIE:PhotospaceError
E005 XIE:ROIError
E006 XIE:FloError
R000 XINERAMA:QueryVersion
R001 XINERAMA:GetState
R002 XINERAMA:GetScreenCount

View File

@ -144,10 +144,7 @@ Equipment Corporation.
#include "gcstruct.h"
#ifdef XSERVER_DTRACE
#include <sys/types.h>
typedef const char *string;
#include "Xserver-dtrace.h"
#include "probes.h"
#define TypeNameString(t) LookupResourceName(t)
#endif

View File

@ -636,7 +636,7 @@ exaTryDriverComposite(CARD8 op,
RegionRec region;
BoxPtr pbox;
int nbox;
int src_off_x, src_off_y, mask_off_x, mask_off_y, dst_off_x, dst_off_y;
int src_off_x, src_off_y, mask_off_x = 0, mask_off_y = 0, dst_off_x, dst_off_y;
PixmapPtr pSrcPix = NULL, pMaskPix = NULL, pDstPix;
ExaPixmapPrivPtr pSrcExaPix = NULL, pMaskExaPix = NULL, pDstExaPix;

View File

@ -472,13 +472,8 @@ typedef struct {
#define fbGetWindowPixmap(pWin) ((PixmapPtr)\
dixLookupPrivate(&((WindowPtr)(pWin))->devPrivates, fbGetWinPrivateKey(pWin)))
#ifdef ROOTLESS
#define __fbPixDrawableX(pPix) ((pPix)->drawable.x)
#define __fbPixDrawableY(pPix) ((pPix)->drawable.y)
#else
#define __fbPixDrawableX(pPix) 0
#define __fbPixDrawableY(pPix) 0
#endif
#ifdef COMPOSITE
#define __fbPixOffXWin(pPix) (__fbPixDrawableX(pPix) - (pPix)->screen_x)

View File

@ -345,6 +345,11 @@ static pixman_image_t *image_from_pict_internal(PicturePtr pict, Bool has_clip,
int *xoff, int *yoff,
Bool is_alpha_map);
static void image_destroy(pixman_image_t *image, void *data)
{
fbFinishAccess((DrawablePtr)data);
}
static void
set_image_properties(pixman_image_t * image, PicturePtr pict, Bool has_clip,
int *xoff, int *yoff, Bool is_alpha_map)
@ -429,6 +434,10 @@ set_image_properties(pixman_image_t * image, PicturePtr pict, Bool has_clip,
break;
}
if (pict->pDrawable)
pixman_image_set_destroy_function(image, &image_destroy,
pict->pDrawable);
pixman_image_set_filter(image, filter,
(pixman_fixed_t *) pict->filter_params,
pict->filter_nparams);
@ -481,8 +490,8 @@ image_from_pict(PicturePtr pict, Bool has_clip, int *xoff, int *yoff)
void
free_pixman_pict(PicturePtr pict, pixman_image_t * image)
{
if (image && pixman_image_unref(image) && pict->pDrawable)
fbFinishAccess(pict->pDrawable);
if (image)
pixman_image_unref(image);
}
Bool

View File

@ -207,7 +207,6 @@ glamor_create_pixmap(ScreenPtr screen, int w, int h, int depth,
if (fbo == NULL) {
fbDestroyPixmap(pixmap);
free(pixmap_priv);
return fbCreatePixmap(screen, w, h, depth, usage);
}
@ -305,6 +304,35 @@ glamor_create_screen_resources(ScreenPtr screen)
return ret;
}
static Bool
glamor_check_instruction_count(int gl_version)
{
GLint max_native_alu_instructions;
/* Avoid using glamor if the reported instructions limit is too low,
* as this would cause glamor to fallback on sw due to large shaders
* which ends up being unbearably slow.
*/
if (gl_version < 30) {
if (!epoxy_has_gl_extension("GL_ARB_fragment_program")) {
ErrorF("GL_ARB_fragment_program required\n");
return FALSE;
}
glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB,
GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB,
&max_native_alu_instructions);
if (max_native_alu_instructions < GLAMOR_MIN_ALU_INSTRUCTIONS) {
LogMessage(X_WARNING,
"glamor requires at least %d instructions (%d reported)\n",
GLAMOR_MIN_ALU_INSTRUCTIONS, max_native_alu_instructions);
return FALSE;
}
}
return TRUE;
}
/** Set up glamor for an already-configured GL context. */
Bool
glamor_init(ScreenPtr screen, unsigned int flags)
@ -350,6 +378,20 @@ glamor_init(ScreenPtr screen, unsigned int flags)
goto fail;
}
glamor_priv->saved_procs.close_screen = screen->CloseScreen;
screen->CloseScreen = glamor_close_screen;
/* If we are using egl screen, call egl screen init to
* register correct close screen function. */
if (flags & GLAMOR_USE_EGL_SCREEN) {
glamor_egl_screen_init(screen, &glamor_priv->ctx);
} else {
if (!glamor_glx_screen_init(&glamor_priv->ctx))
goto fail;
}
glamor_make_current(glamor_priv);
if (epoxy_is_desktop_gl())
glamor_priv->gl_flavor = GLAMOR_GL_DESKTOP;
else
@ -384,6 +426,9 @@ glamor_init(ScreenPtr screen, unsigned int flags)
ErrorF("Require OpenGL version 2.1 or later.\n");
goto fail;
}
if (!glamor_check_instruction_count(gl_version))
goto fail;
} else {
if (gl_version < 20) {
ErrorF("Require Open GLES2.0 or later.\n");
@ -411,6 +456,14 @@ glamor_init(ScreenPtr screen, unsigned int flags)
epoxy_has_gl_extension("GL_ARB_buffer_storage");
glamor_priv->has_nv_texture_barrier =
epoxy_has_gl_extension("GL_NV_texture_barrier");
glamor_priv->has_unpack_subimage =
glamor_priv->gl_flavor == GLAMOR_GL_DESKTOP ||
epoxy_gl_version() >= 30 ||
epoxy_has_gl_extension("GL_EXT_unpack_subimage");
glamor_priv->has_pack_subimage =
glamor_priv->gl_flavor == GLAMOR_GL_DESKTOP ||
epoxy_gl_version() >= 30 ||
epoxy_has_gl_extension("GL_NV_pack_subimage");
glGetIntegerv(GL_MAX_RENDERBUFFER_SIZE, &glamor_priv->max_fbo_size);
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &glamor_priv->max_fbo_size);
@ -423,18 +476,6 @@ glamor_init(ScreenPtr screen, unsigned int flags)
glamor_set_debug_level(&glamor_debug_level);
glamor_priv->saved_procs.close_screen = screen->CloseScreen;
screen->CloseScreen = glamor_close_screen;
/* If we are using egl screen, call egl screen init to
* register correct close screen function. */
if (flags & GLAMOR_USE_EGL_SCREEN) {
glamor_egl_screen_init(screen, &glamor_priv->ctx);
} else {
if (!glamor_glx_screen_init(&glamor_priv->ctx))
goto fail;
}
glamor_priv->saved_procs.create_screen_resources =
screen->CreateScreenResources;
screen->CreateScreenResources = glamor_create_screen_resources;

View File

@ -35,7 +35,7 @@
#include "glamor_priv.h"
const Bool
Bool
glamor_get_drawable_location(const DrawablePtr drawable)
{
PixmapPtr pixmap = glamor_get_drawable_pixmap(drawable);

View File

@ -597,6 +597,7 @@ glamor_egl_close_screen(ScreenPtr screen)
return screen->CloseScreen(screen);
}
#ifdef DRI3
static int
glamor_dri3_open_client(ClientPtr client,
ScreenPtr screen,
@ -653,12 +654,12 @@ static dri3_screen_info_rec glamor_dri3_info = {
.pixmap_from_fd = glamor_pixmap_from_fd,
.fd_from_pixmap = glamor_fd_from_pixmap,
};
#endif /* DRI3 */
void
glamor_egl_screen_init(ScreenPtr screen, struct glamor_context *glamor_ctx)
{
ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
glamor_screen_private *glamor_priv = glamor_get_screen_private(screen);
struct glamor_egl_screen_private *glamor_egl =
glamor_egl_get_screen_private(scrn);
@ -670,7 +671,9 @@ glamor_egl_screen_init(ScreenPtr screen, struct glamor_context *glamor_ctx)
glamor_ctx->make_current = glamor_egl_make_current;
#ifdef DRI3
if (glamor_egl->dri3_capable) {
glamor_screen_private *glamor_priv = glamor_get_screen_private(screen);
/* Tell the core that we have the interfaces for import/export
* of pixmaps.
*/
@ -693,6 +696,7 @@ glamor_egl_screen_init(ScreenPtr screen, struct glamor_context *glamor_ctx)
}
}
}
#endif
}
static void

View File

@ -348,7 +348,6 @@ _glamor_create_tex(glamor_screen_private *glamor_priv,
glamor_make_current(glamor_priv);
glGenTextures(1, &tex);
glBindTexture(GL_TEXTURE_2D, tex);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexImage2D(GL_TEXTURE_2D, 0, format, w, h, 0,

View File

@ -45,6 +45,7 @@ glamor_font_get(ScreenPtr screen, FontPtr font)
unsigned char c[2];
CharInfoPtr glyph;
unsigned long count;
char *bits;
if (glamor_priv->glsl_version < 130)
return NULL;
@ -62,8 +63,6 @@ glamor_font_get(ScreenPtr screen, FontPtr font)
if (glamor_font->realized)
return glamor_font;
glamor_font->realized = TRUE;
/* Figure out how many glyphs are in the font */
num_cols = font->info.lastCol - font->info.firstCol + 1;
num_rows = font->info.lastRow - font->info.firstRow + 1;
@ -81,6 +80,10 @@ glamor_font_get(ScreenPtr screen, FontPtr font)
overall_width = glyph_width_bytes * num_cols;
overall_height = glyph_height * num_rows;
bits = malloc(overall_width * overall_height);
if (!bits)
return NULL;
/* Check whether the font has a default character */
c[0] = font->info.lastRow + 1;
c[1] = font->info.lastCol + 1;
@ -97,16 +100,9 @@ glamor_font_get(ScreenPtr screen, FontPtr font)
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, glamor_font->texture_id);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
/* Allocate storage */
glTexImage2D(GL_TEXTURE_2D, 0, GL_R8UI, overall_width, overall_height,
0, GL_RED_INTEGER, GL_UNSIGNED_BYTE, NULL);
glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
/* Paint all of the glyphs */
for (row = 0; row < num_rows; row++) {
for (col = 0; col < num_cols; col++) {
@ -115,13 +111,29 @@ glamor_font_get(ScreenPtr screen, FontPtr font)
(*font->get_glyphs)(font, 1, c, TwoD16Bit, &count, &glyph);
if (count)
glTexSubImage2D(GL_TEXTURE_2D, 0, col * glyph_width_bytes, row * glyph_height,
GLYPHWIDTHBYTES(glyph), GLYPHHEIGHTPIXELS(glyph),
GL_RED_INTEGER, GL_UNSIGNED_BYTE, glyph->bits);
if (count) {
char *dst = bits + row * glyph_height * overall_width +
col * glyph_width_bytes;
char *src = glyph->bits;
unsigned y;
for (y = 0; y < GLYPHHEIGHTPIXELS(glyph); y++) {
memcpy(dst, src, GLYPHWIDTHBYTES(glyph));
dst += overall_width;
src += GLYPHWIDTHBYTESPADDED(glyph);
}
}
}
}
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
glTexImage2D(GL_TEXTURE_2D, 0, GL_R8UI, overall_width, overall_height,
0, GL_RED_INTEGER, GL_UNSIGNED_BYTE, bits);
free(bits);
glamor_font->realized = TRUE;
return glamor_font;
}

View File

@ -88,7 +88,7 @@ static void
glamor_put_image_bail(DrawablePtr drawable, GCPtr gc, int depth, int x, int y,
int w, int h, int leftPad, int format, char *bits)
{
if (glamor_prepare_access(drawable, GLAMOR_ACCESS_RW))
if (glamor_prepare_access_box(drawable, GLAMOR_ACCESS_RW, x, y, w, h))
fbPutImage(drawable, gc, depth, x, y, w, h, leftPad, format, bits);
glamor_finish_access(drawable);
}
@ -150,7 +150,7 @@ static void
glamor_get_image_bail(DrawablePtr drawable, int x, int y, int w, int h,
unsigned int format, unsigned long plane_mask, char *d)
{
if (glamor_prepare_access(drawable, GLAMOR_ACCESS_RO))
if (glamor_prepare_access_box(drawable, GLAMOR_ACCESS_RO, x, y, w, h))
fbGetImage(drawable, x, y, w, h, format, plane_mask, d);
glamor_finish_access(drawable);
}

View File

@ -1046,6 +1046,15 @@ glamor_composite_largepixmap_region(CARD8 op,
int source_repeat_type = 0, mask_repeat_type = 0;
int ok = TRUE;
if (source_pixmap_priv == dest_pixmap_priv) {
glamor_fallback("source and dest pixmaps are the same\n");
return FALSE;
}
if (mask_pixmap_priv == dest_pixmap_priv) {
glamor_fallback("mask and dest pixmaps are the same\n");
return FALSE;
}
if (source->repeat)
source_repeat_type = source->repeatType;
else

View File

@ -717,7 +717,6 @@ __glamor_upload_pixmap_to_texture(PixmapPtr pixmap, unsigned int *tex,
}
glBindTexture(GL_TEXTURE_2D, *tex);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glPixelStorei(GL_UNPACK_ALIGNMENT, 4);

View File

@ -45,6 +45,8 @@ glamor_prep_pixmap_box(PixmapPtr pixmap, glamor_access_t access, BoxPtr box)
if (!GLAMOR_PIXMAP_PRIV_HAS_FBO(priv))
return TRUE;
glamor_make_current(glamor_priv);
RegionInit(&region, box, 1);
/* See if it's already mapped */

View File

@ -236,6 +236,8 @@ typedef struct glamor_screen_private {
int has_buffer_storage;
int has_khr_debug;
int has_nv_texture_barrier;
int has_pack_subimage;
int has_unpack_subimage;
int max_fbo_size;
int has_rw_pbo;
@ -669,7 +671,7 @@ glamor_pixmap_fbo *glamor_create_fbo_array(glamor_screen_private *glamor_priv,
void glamor_init_finish_access_shaders(ScreenPtr screen);
void glamor_fini_finish_access_shaders(ScreenPtr screen);
const Bool glamor_get_drawable_location(const DrawablePtr drawable);
Bool glamor_get_drawable_location(const DrawablePtr drawable);
void glamor_get_drawable_deltas(DrawablePtr drawable, PixmapPtr pixmap,
int *x, int *y);
GLint glamor_compile_glsl_prog(GLenum type, const char *source);
@ -1095,4 +1097,6 @@ void glamor_xv_render(glamor_port_private *port_priv);
#include "glamor_font.h"
#define GLAMOR_MIN_ALU_INSTRUCTIONS 128 /* Minimum required number of native ALU instructions */
#endif /* GLAMOR_PRIV_H */

View File

@ -343,9 +343,6 @@ glamor_build_program(ScreenPtr screen,
prog->dash_uniform = glamor_get_uniform(prog, glamor_program_location_dash, "dash");
prog->dash_length_uniform = glamor_get_uniform(prog, glamor_program_location_dash, "dash_length");
if (glGetError() != GL_NO_ERROR)
goto fail;
free(version_string);
free(fs_vars);
free(vs_vars);

View File

@ -1400,6 +1400,7 @@ glamor_composite_clipped_region(CARD8 op,
{
ScreenPtr screen = dest->pDrawable->pScreen;
PixmapPtr source_pixmap = NULL, mask_pixmap = NULL;
PixmapPtr dest_pixmap = glamor_get_drawable_pixmap(dest->pDrawable);
PicturePtr temp_src = source, temp_mask = mask;
glamor_pixmap_private *temp_src_priv = source_pixmap_priv;
glamor_pixmap_private *temp_mask_priv = mask_pixmap_priv;
@ -1502,7 +1503,14 @@ glamor_composite_clipped_region(CARD8 op,
}
}
/*XXXXX, self copy? */
if (source_pixmap == dest_pixmap) {
glamor_fallback("source and dest pixmaps are the same\n");
goto out;
}
if (mask_pixmap == dest_pixmap) {
glamor_fallback("mask and dest pixmaps are the same\n");
goto out;
}
x_dest += dest->pDrawable->x;
y_dest += dest->pDrawable->y;

View File

@ -226,7 +226,7 @@ glamor_get_spans_gl(DrawablePtr drawable, int wmax,
BoxPtr box = glamor_pixmap_box_at(pixmap_priv, box_x, box_y);
glamor_pixmap_fbo *fbo = glamor_pixmap_fbo_at(pixmap_priv, box_x, box_y);
glBindFramebuffer(GL_READ_FRAMEBUFFER, fbo->fb);
glBindFramebuffer(GL_FRAMEBUFFER, fbo->fb);
glPixelStorei(GL_PACK_ALIGNMENT, 4);
d = dst;

View File

@ -94,8 +94,10 @@ glamor_sync_init(ScreenPtr screen)
return FALSE;
}
#ifdef HAVE_XSHMFENCE
if (!miSyncShmScreenInit(screen))
return FALSE;
#endif
screen_funcs = miSyncGetScreenFuncs(screen);
glamor->saved_procs.sync_screen_funcs.CreateFence = screen_funcs->CreateFence;

View File

@ -73,7 +73,9 @@ glamor_upload_boxes(PixmapPtr pixmap, BoxPtr in_boxes, int in_nbox,
glamor_make_current(glamor_priv);
glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
glPixelStorei(GL_UNPACK_ROW_LENGTH, byte_stride / bytes_per_pixel);
if (glamor_priv->has_unpack_subimage)
glPixelStorei(GL_UNPACK_ROW_LENGTH, byte_stride / bytes_per_pixel);
glamor_pixmap_loop(priv, box_x, box_y) {
BoxPtr box = glamor_pixmap_box_at(priv, box_x, box_y);
@ -92,25 +94,34 @@ glamor_upload_boxes(PixmapPtr pixmap, BoxPtr in_boxes, int in_nbox,
int y1 = MAX(boxes->y1 + dy_dst, box->y1);
int y2 = MIN(boxes->y2 + dy_dst, box->y2);
size_t ofs = (y1 - dy_dst + dy_src) * byte_stride;
ofs += (x1 - dx_dst + dx_src) * bytes_per_pixel;
boxes++;
if (x2 <= x1 || y2 <= y1)
continue;
glPixelStorei(GL_UNPACK_SKIP_ROWS, y1 - dy_dst + dy_src);
glPixelStorei(GL_UNPACK_SKIP_PIXELS, x1 - dx_dst + dx_src);
glTexSubImage2D(GL_TEXTURE_2D, 0,
x1 - box->x1, y1 - box->y1,
x2 - x1, y2 - y1,
format, type,
bits);
if (glamor_priv->has_unpack_subimage ||
x2 - x1 == byte_stride / bytes_per_pixel) {
glTexSubImage2D(GL_TEXTURE_2D, 0,
x1 - box->x1, y1 - box->y1,
x2 - x1, y2 - y1,
format, type,
bits + ofs);
} else {
for (; y1 < y2; y1++, ofs += byte_stride)
glTexSubImage2D(GL_TEXTURE_2D, 0,
x1 - box->x1, y1 - box->y1,
x2 - x1, 1,
format, type,
bits + ofs);
}
}
}
glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
glPixelStorei(GL_UNPACK_SKIP_ROWS, 0);
glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0);
if (glamor_priv->has_unpack_subimage)
glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
}
/*
@ -166,7 +177,8 @@ glamor_download_boxes(PixmapPtr pixmap, BoxPtr in_boxes, int in_nbox,
glamor_make_current(glamor_priv);
glPixelStorei(GL_PACK_ALIGNMENT, 4);
glPixelStorei(GL_PACK_ROW_LENGTH, byte_stride / bytes_per_pixel);
if (glamor_priv->has_pack_subimage)
glPixelStorei(GL_PACK_ROW_LENGTH, byte_stride / bytes_per_pixel);
glamor_pixmap_loop(priv, box_x, box_y) {
BoxPtr box = glamor_pixmap_box_at(priv, box_x, box_y);
@ -174,7 +186,7 @@ glamor_download_boxes(PixmapPtr pixmap, BoxPtr in_boxes, int in_nbox,
BoxPtr boxes = in_boxes;
int nbox = in_nbox;
glBindFramebuffer(GL_READ_FRAMEBUFFER, fbo->fb);
glBindFramebuffer(GL_FRAMEBUFFER, fbo->fb);
while (nbox--) {
@ -183,20 +195,25 @@ glamor_download_boxes(PixmapPtr pixmap, BoxPtr in_boxes, int in_nbox,
int x2 = MIN(boxes->x2 + dx_src, box->x2);
int y1 = MAX(boxes->y1 + dy_src, box->y1);
int y2 = MIN(boxes->y2 + dy_src, box->y2);
size_t ofs = (y1 - dy_src + dy_dst) * byte_stride;
ofs += (x1 - dx_src + dx_dst) * bytes_per_pixel;
boxes++;
if (x2 <= x1 || y2 <= y1)
continue;
glPixelStorei(GL_PACK_SKIP_PIXELS, x1 - dx_src + dx_dst);
glPixelStorei(GL_PACK_SKIP_ROWS, y1 - dy_src + dy_dst);
glReadPixels(x1 - box->x1, y1 - box->y1, x2 - x1, y2 - y1, format, type, bits);
if (glamor_priv->has_pack_subimage ||
x2 - x1 == byte_stride / bytes_per_pixel) {
glReadPixels(x1 - box->x1, y1 - box->y1, x2 - x1, y2 - y1, format, type, bits + ofs);
} else {
for (; y1 < y2; y1++, ofs += byte_stride)
glReadPixels(x1 - box->x1, y1 - box->y1, x2 - x1, 1, format, type, bits + ofs);
}
}
}
glPixelStorei(GL_PACK_ROW_LENGTH, 0);
glPixelStorei(GL_PACK_SKIP_ROWS, 0);
glPixelStorei(GL_PACK_SKIP_PIXELS, 0);
if (glamor_priv->has_pack_subimage)
glPixelStorei(GL_PACK_ROW_LENGTH, 0);
}
/*

View File

@ -87,6 +87,9 @@ __glXDisp_CreateContextAttribsARB(__GLXclientState * cl, GLbyte * pc)
int minor_version = 0;
uint32_t flags = 0;
uint32_t render_type = GLX_RGBA_TYPE;
#ifdef GLX_CONTEXT_RELEASE_BEHAVIOR_ARB
uint32_t flush = GLX_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB;
#endif
__GLXcontext *ctx = NULL;
__GLXcontext *shareCtx = NULL;
__GLXscreen *glxScreen;
@ -194,6 +197,15 @@ __glXDisp_CreateContextAttribsARB(__GLXclientState * cl, GLbyte * pc)
break;
#ifdef GLX_CONTEXT_RELEASE_BEHAVIOR_ARB
case GLX_CONTEXT_RELEASE_BEHAVIOR_ARB:
flush = attribs[2 * i + 1];
if (flush != GLX_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB
&& flush != GLX_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB)
return BadValue;
break;
#endif
default:
return BadValue;
}
@ -333,6 +345,9 @@ __glXDisp_CreateContextAttribsARB(__GLXclientState * cl, GLbyte * pc)
ctx->drawPriv = NULL;
ctx->readPriv = NULL;
ctx->resetNotificationStrategy = reset;
#ifdef GLX_CONTEXT_RELEASE_BEHAVIOR_ARB
ctx->releaseBehavior = flush;
#endif
/* Add the new context to the various global tables of GLX contexts.
*/

View File

@ -72,6 +72,7 @@ struct extension_info {
static const struct extension_info known_glx_extensions[] = {
/* GLX_ARB_get_proc_address is implemented on the client. */
/* *INDENT-OFF* */
{ GLX(ARB_context_flush_control), VER(0,0), N, },
{ GLX(ARB_create_context), VER(0,0), N, },
{ GLX(ARB_create_context_profile), VER(0,0), N, },
{ GLX(ARB_create_context_robustness), VER(0,0), N, },

View File

@ -36,7 +36,8 @@
enum {
/* GLX_ARB_get_proc_address is implemented on the client. */
ARB_create_context_bit = 0,
ARB_context_flush_control_bit = 0,
ARB_create_context_bit,
ARB_create_context_profile_bit,
ARB_create_context_robustness_bit,
ARB_fbconfig_float_bit,

View File

@ -334,6 +334,19 @@ DoCreateContext(__GLXclientState * cl, GLXContextID gcId,
*/
glxc->resetNotificationStrategy = GLX_NO_RESET_NOTIFICATION_ARB;
#ifdef GLX_CONTEXT_RELEASE_BEHAVIOR_ARB
/* The GLX_ARB_context_flush_control spec says:
*
* "The default value [for GLX_CONTEXT_RELEASE_BEHAVIOR] is
* CONTEXT_RELEASE_BEHAVIOR_FLUSH, and may in some cases be changed
* using platform-specific context creation extensions."
*
* Without using glXCreateContextAttribsARB, there is no way to specify a
* non-default release behavior.
*/
glxc->releaseBehavior = GLX_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB;
#endif
/* Add the new context to the various global tables of GLX contexts.
*/
if (!__glXAddContext(glxc)) {
@ -626,7 +639,12 @@ DoMakeCurrent(__GLXclientState * cl,
/*
** Flush the previous context if needed.
*/
if (prevglxc->hasUnflushedCommands) {
Bool need_flush = GL_TRUE;
#ifdef GLX_CONTEXT_RELEASE_BEHAVIOR_ARB
if (prevglxc->releaseBehavior == GLX_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB)
need_flush = GL_FALSE;
#endif
if (prevglxc->hasUnflushedCommands && need_flush) {
if (__glXForceCurrent(cl, tag, (int *) &error)) {
glFlush();
prevglxc->hasUnflushedCommands = GL_FALSE;
@ -2164,7 +2182,7 @@ __glXDisp_RenderLarge(__GLXclientState * cl, GLbyte * pc)
__GLXrenderSizeData entry;
int extra = 0;
int left = (req->length << 2) - sz_xGLXRenderLargeReq;
size_t cmdlen;
int cmdlen;
int err;
/*

View File

@ -108,6 +108,11 @@ struct __GLXcontext {
*/
GLenum resetNotificationStrategy;
/**
* Context release behavior
*/
GLenum releaseBehavior;
/*
** Buffers for feedback and selection.
*/

View File

@ -921,6 +921,13 @@ initializeExtensions(__GLXDRIscreen * screen)
"AIGLX: enabled GLX_ARB_create_context_robustness\n");
}
#ifdef __DRI2_FLUSH_CONTROL
if (strcmp(extensions[i]->name, __DRI2_FLUSH_CONTROL) == 0) {
__glXEnableExtension(screen->glx_enable_bits,
"GLX_ARB_context_flush_control\n");
}
#endif
/* Ignore unknown extensions */
}
}

View File

@ -71,6 +71,8 @@ struct __GLXDRIscreen {
const __DRIcopySubBufferExtension *copySubBuffer;
const __DRItexBufferExtension *texBuffer;
const __DRIconfig **driConfigs;
unsigned char glx_enable_bits[__GLX_EXT_BYTES];
};
struct __GLXDRIcontext {
@ -394,13 +396,29 @@ initializeExtensions(__GLXDRIscreen * screen)
const __DRIextension **extensions;
int i;
__glXEnableExtension(screen->glx_enable_bits, "GLX_MESA_copy_sub_buffer");
LogMessage(X_INFO, "AIGLX: enabled GLX_MESA_copy_sub_buffer\n");
if (screen->swrast->base.version >= 3) {
__glXEnableExtension(screen->glx_enable_bits,
"GLX_ARB_create_context");
__glXEnableExtension(screen->glx_enable_bits,
"GLX_ARB_create_context_profile");
__glXEnableExtension(screen->glx_enable_bits,
"GLX_EXT_create_context_es2_profile");
}
/* these are harmless to enable unconditionally */
__glXEnableExtension(screen->glx_enable_bits, "GLX_EXT_framebuffer_sRGB");
__glXEnableExtension(screen->glx_enable_bits, "GLX_ARB_fbconfig_float");
__glXEnableExtension(screen->glx_enable_bits, "GLX_SGI_make_current_read");
extensions = screen->core->getExtensions(screen->driScreen);
for (i = 0; extensions[i]; i++) {
if (strcmp(extensions[i]->name, __DRI_COPY_SUB_BUFFER) == 0) {
screen->copySubBuffer =
(const __DRIcopySubBufferExtension *) extensions[i];
/* GLX_MESA_copy_sub_buffer is always enabled. */
}
if (strcmp(extensions[i]->name, __DRI_TEX_BUFFER) == 0) {
@ -408,7 +426,13 @@ initializeExtensions(__GLXDRIscreen * screen)
/* GLX_EXT_texture_from_pixmap is always enabled. */
}
/* Ignore unknown extensions */
#ifdef __DRI2_FLUSH_CONTROL
if (strcmp(extensions[i]->name, __DRI2_FLUSH_CONTROL) == 0) {
__glXEnableExtension(screen->glx_enable_bits,
"GLX_ARB_context_flush_control\n");
}
#endif
}
}
@ -420,6 +444,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
{
const char *driverName = "swrast";
__GLXDRIscreen *screen;
size_t buffer_size;
screen = calloc(1, sizeof *screen);
if (screen == NULL)
@ -431,6 +456,8 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
screen->base.swapInterval = NULL;
screen->base.pScreen = pScreen;
__glXInitExtensionEnableBits(screen->glx_enable_bits);
screen->driver = glxProbeDriver(driverName,
(void **) &screen->core,
__DRI_CORE, 1,
@ -459,6 +486,19 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
__glXScreenInit(&screen->base, pScreen);
/* The first call simply determines the length of the extension string.
* This allows us to allocate some memory to hold the extension string,
* but it requires that we call __glXGetExtensionString a second time.
*/
buffer_size = __glXGetExtensionString(screen->glx_enable_bits, NULL);
if (buffer_size > 0) {
free(screen->base.GLXextensions);
screen->base.GLXextensions = xnfalloc(buffer_size);
(void) __glXGetExtensionString(screen->glx_enable_bits,
screen->base.GLXextensions);
}
screen->base.GLXmajor = 1;
screen->base.GLXminor = 4;

View File

@ -38,6 +38,7 @@
#define _DMXPARSE_H_
#include <stdio.h> /* For FILE */
#include <X11/Xfuncproto.h> /* For _X_ATTRIBUTE_PRINTF */
/** Stores tokens not stored in other structures (e.g., keywords and ;) */
typedef struct _DMXConfigToken {
@ -203,7 +204,7 @@ extern int yylex(void);
extern int yydebug;
extern void yyerror(const char *message);
extern void dmxConfigLog(const char *format, ...);
extern void dmxConfigLog(const char *format, ...) _X_ATTRIBUTE_PRINTF(1,0);
extern void *dmxConfigAlloc(unsigned long bytes);
extern void *dmxConfigRealloc(void *orig,
unsigned long orig_bytes, unsigned long bytes);

View File

@ -130,7 +130,7 @@ dmxConfigPopState(void)
dmxConfigNewline();
}
static void
static void _X_ATTRIBUTE_PRINTF(4, 5)
dmxConfigOutput(int addSpace, int doNewline, const char *comment,
const char *format, ...)
{
@ -261,32 +261,20 @@ dmxConfigPrintString(DMXConfigStringPtr p, int quote)
static int
dmxConfigPrintPair(DMXConfigPairPtr p, int addSpace)
{
const char *format = NULL;
if (!p)
return 0;
switch (p->token) {
case T_ORIGIN:
format = "@%dx%d";
break;
case T_DIMENSION:
format = "%dx%d";
break;
case T_OFFSET:
format = "%c%d%c%d";
break;
}
if (p->token == T_OFFSET) {
if (!p->comment && !p->x && !p->y && p->xsign >= 0 && p->ysign >= 0)
return 0;
dmxConfigOutput(addSpace, 0, p->comment, format,
dmxConfigOutput(addSpace, 0, p->comment, "%c%d%c%d",
p->xsign < 0 ? '-' : '+', p->x,
p->ysign < 0 ? '-' : '+', p->y);
}
else {
if (!p->comment && !p->x && !p->y)
return 0;
dmxConfigOutput(addSpace, 0, p->comment, format, p->x, p->y);
dmxConfigOutput(addSpace, 0, p->comment, "%s%dx%d",
(p->token == T_ORIGIN) ? "@" : "", p->x, p->y);
}
return 1;
}

View File

@ -55,6 +55,7 @@
#include "extinit.h"
#include "opaque.h"
#include "dmx.h"
#include "dmxextension.h"
#include <X11/extensions/dmxproto.h>
#include <X11/extensions/dmx.h>

View File

@ -47,9 +47,6 @@ extern int connBlockScreenStart;
#ifdef PANORAMIX
#include "panoramiXsrv.h"
extern int PanoramiXPixWidth;
extern int PanoramiXPixHeight;
extern int PanoramiXNumScreens;
#endif
int dmxGlobalWidth, dmxGlobalHeight;

View File

@ -54,6 +54,4 @@ extern Bool dmxUnrealizeFont(ScreenPtr pScreen, FontPtr pFont);
extern Bool dmxBELoadFont(ScreenPtr pScreen, FontPtr pFont);
extern Bool dmxBEFreeFont(ScreenPtr pScreen, FontPtr pFont);
extern int dmxFontPrivateIndex;
#endif /* DMXFONT_H */

View File

@ -49,7 +49,7 @@
#include "pixmapstr.h"
#include "migc.h"
static GCFuncs dmxGCFuncs = {
static const GCFuncs dmxGCFuncs = {
dmxValidateGC,
dmxChangeGC,
dmxCopyGC,
@ -59,7 +59,7 @@ static GCFuncs dmxGCFuncs = {
dmxCopyClip,
};
static GCOps dmxGCOps = {
static const GCOps dmxGCOps = {
dmxFillSpans,
dmxSetSpans,
dmxPutImage,

View File

@ -41,8 +41,8 @@
/** GC private area. */
typedef struct _dmxGCPriv {
GCOps *ops;
GCFuncs *funcs;
const GCOps *ops;
const GCFuncs *funcs;
XlibGC gc;
Bool msc;
} dmxGCPrivRec, *dmxGCPrivPtr;

View File

@ -164,23 +164,23 @@ dmxErrorHandler(Display * dpy, XErrorEvent * ev)
switch (ev->error_code) {
case BadValue:
dmxLog(dmxWarning, " Value: 0x%x\n",
ev->resourceid);
(unsigned int) ev->resourceid);
break;
case BadAtom:
dmxLog(dmxWarning, " AtomID: 0x%x\n",
ev->resourceid);
(unsigned int) ev->resourceid);
break;
default:
dmxLog(dmxWarning, " ResourceID: 0x%x\n",
ev->resourceid);
(unsigned int) ev->resourceid);
break;
}
/* Provide serial number information */
dmxLog(dmxWarning, " Failed serial number: %d\n",
ev->serial);
(unsigned int) ev->serial);
dmxLog(dmxWarning, " Current serial number: %d\n",
dpy->request);
(unsigned int) dpy->request);
return 0;
}
@ -634,7 +634,7 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char *argv[])
if (major > 0 && minor > 0)
year += 2000;
dmxLog(dmxInfo, "Generation: %d\n", dmxGeneration);
dmxLog(dmxInfo, "Generation: %lu\n", dmxGeneration);
dmxLog(dmxInfo, "DMX version: %d.%d.%02d%02d%02d (%s)\n",
major, minor, year, month, day, VENDOR_STRING);
@ -762,7 +762,6 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char *argv[])
dmxGlxVisualPrivate **configprivs = NULL;
int nconfigs = 0;
int (*oldErrorHandler) (Display *, XErrorEvent *);
int i;
/* Catch errors if when using an older GLX w/o FBconfigs */
oldErrorHandler = XSetErrorHandler(dmxNOPErrorHandler);
@ -797,28 +796,29 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char *argv[])
configprivs = malloc(nconfigs * sizeof(dmxGlxVisualPrivate *));
if (configs != NULL && configprivs != NULL) {
int j;
/* Initialize our private info for each visual
* (currently only x_visual_depth and x_visual_class)
*/
for (i = 0; i < nconfigs; i++) {
for (j = 0; j < nconfigs; j++) {
configprivs[i] = (dmxGlxVisualPrivate *)
configprivs[j] = (dmxGlxVisualPrivate *)
malloc(sizeof(dmxGlxVisualPrivate));
configprivs[i]->x_visual_depth = 0;
configprivs[i]->x_visual_class = 0;
configprivs[j]->x_visual_depth = 0;
configprivs[j]->x_visual_class = 0;
/* Find the visual depth */
if (configs[i].vid > 0) {
int j;
if (configs[j].vid > 0) {
int k;
for (j = 0; j < dmxScreen->beNumVisuals; j++) {
if (dmxScreen->beVisuals[j].visualid ==
configs[i].vid) {
configprivs[i]->x_visual_depth =
dmxScreen->beVisuals[j].depth;
configprivs[i]->x_visual_class =
dmxScreen->beVisuals[j].class;
for (k = 0; k < dmxScreen->beNumVisuals; k++) {
if (dmxScreen->beVisuals[k].visualid ==
configs[j].vid) {
configprivs[j]->x_visual_depth =
dmxScreen->beVisuals[k].depth;
configprivs[j]->x_visual_class =
dmxScreen->beVisuals[k].class;
break;
}
}

View File

@ -57,7 +57,6 @@
#include "mipict.h"
#include "fbpict.h"
extern int RenderErrBase;
extern int (*ProcRenderVector[RenderNumberRequests]) (ClientPtr);
static int (*dmxSaveRenderVector[RenderNumberRequests]) (ClientPtr);

View File

@ -220,7 +220,7 @@ dmxPropertyCheckOtherWindows(DMXScreenInfo * dmxScreen, Atom atom)
if (XGetTextProperty(dpy, win, &tp, atom) && tp.nitems) {
dmxLog(dmxDebug, "On %s/%lu: %s\n",
dmxScreen->name, win, tp.value);
dmxScreen->name, (unsigned long) win, tp.value);
if (!strncmp((char *) tp.value, (char *) id,
strlen((char *) id))) {
int idx;
@ -360,8 +360,8 @@ dmxPropertyWindow(DMXScreenInfo * dmxScreen)
dmxScreen->next = (other->next ? other->next : other);
other->next = (tmp ? tmp : dmxScreen);
dmxLog(dmxDebug, "%d/%s/%lu and %d/%s/%lu are on the same backend\n",
dmxScreen->index, dmxScreen->name, dmxScreen->scrnWin,
other->index, other->name, other->scrnWin);
dmxScreen->index, dmxScreen->name, (unsigned long) dmxScreen->scrnWin,
other->index, other->name, (unsigned long) other->scrnWin);
}
snprintf(buf, sizeof(buf), ".%d,%lu", dmxScreen->index,

View File

@ -80,7 +80,6 @@ dmxBEScreenInit(ScreenPtr pScreen)
{
DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
XSetWindowAttributes attribs;
XGCValues gcvals;
unsigned long mask;
int i, j;

View File

@ -857,13 +857,9 @@ dmxResizeWindow(WindowPtr pWindow, int x, int y,
ScreenPtr pScreen = pWindow->drawable.pScreen;
DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
dmxWinPrivPtr pWinPriv = DMX_GET_WINDOW_PRIV(pWindow);
dmxWinPrivPtr pSibPriv;
unsigned int m;
XWindowChanges c;
if (pSib)
pSibPriv = DMX_GET_WINDOW_PRIV(pSib);
DMX_UNWRAP(ResizeWindow, dmxScreen, pScreen);
#if 1
if (pScreen->ResizeWindow)

View File

@ -48,4 +48,11 @@ extern GLint __glTexGeniv_size(GLenum e);
extern GLint __glTexParameterfv_size(GLenum e);
extern GLint __glTexParameteriv_size(GLenum e);
extern GLint __glCallLists_size(GLsizei n, GLenum type);
extern GLint __glDrawPixels_size(GLenum format, GLenum type, GLsizei w, GLsizei h);
extern GLint __glBitmap_size(GLsizei w, GLsizei h);
extern GLint __glTexImage1D_size(GLenum format, GLenum type, GLsizei w);
extern GLint __glTexImage2D_size(GLenum format, GLenum type, GLsizei w, GLsizei h);
extern GLint __glTexImage3D_size(GLenum format, GLenum type, GLsizei w, GLsizei h, GLsizei d);
#endif /* !__compsize_h__ */

View File

@ -655,7 +655,6 @@ extern void __glXDispSwap_CopyConvolutionFilter2D(GLbyte *);
extern void __glXDispSwap_SeparableFilter2D(GLbyte *);
extern void __glXDispSwap_TexImage3D(GLbyte *);
extern void __glXDispSwap_TexSubImage3D(GLbyte *);
extern void __glXDispSwap_DrawArrays(GLbyte *);
extern void __glXDispSwap_PrioritizeTextures(GLbyte *);
extern void __glXDispSwap_CopyTexImage1D(GLbyte *);
extern void __glXDispSwap_CopyTexImage2D(GLbyte *);
@ -663,6 +662,26 @@ extern void __glXDispSwap_CopyTexSubImage1D(GLbyte *);
extern void __glXDispSwap_CopyTexSubImage2D(GLbyte *);
extern void __glXDispSwap_CopyTexSubImage3D(GLbyte *);
extern void __glXDispSwap_BindTexture(GLbyte *);
extern void __glXDispSwap_BlendColor(GLbyte *);
extern void __glXDispSwap_BlendEquation(GLbyte *);
extern void __glXDispSwap_ColorTable(GLbyte *);
extern void __glXDispSwap_ColorTableParameterfv(GLbyte *);
extern void __glXDispSwap_ColorTableParameteriv(GLbyte *);
extern void __glXDispSwap_CopyColorTable(GLbyte *);
extern void __glXDispSwap_ConvolutionParameterf(GLbyte *);
extern void __glXDispSwap_ConvolutionParameteri(GLbyte *);
extern void __glXDispSwap_Histogram(GLbyte *);
extern void __glXDispSwap_Minmax(GLbyte *);
extern void __glXDispSwap_ResetHistogram(GLbyte *);
extern void __glXDispSwap_ResetMinmax(GLbyte *);
extern int __glXSwapCreateContextWithConfigSGIX(__GLXclientState *, GLbyte *);
extern int __glXSwapBindSwapBarrierSGIX(__GLXclientState *, GLbyte *);
extern int __glXSwapJoinSwapGroupSGIX(__GLXclientState *, GLbyte *);
extern int __glXSwapQueryMaxSwapBarriersSGIX(__GLXclientState *, GLbyte *);
extern int __glXSwapMakeCurrentReadSGI(__GLXclientState *, GLbyte *);
#define __GLX_MIN_GLXCMD_OPCODE 1
#define __GLX_MAX_GLXCMD_OPCODE 20
#define __GLX_MIN_RENDER_OPCODE 1

View File

@ -61,7 +61,6 @@
extern __GLXFBConfig **__glXFBConfigs;
extern int __glXNumFBConfigs;
extern int glxIsExtensionSupported(char *ext);
extern int __glXGetFBConfigsSGIX(__GLXclientState * cl, GLbyte * pc);
#define BE_TO_CLIENT_ERROR(x) \
@ -3394,11 +3393,11 @@ __glXCreatePbuffer(__GLXclientState * cl, GLbyte * pc)
/* Send attributes */
if (attr != NULL) {
CARD32 *pc = (CARD32 *) (be_req + 1);
CARD32 *pca = (CARD32 *) (be_req + 1);
while (numAttribs-- > 0) {
*pc++ = *attr++; /* token */
*pc++ = *attr++; /* value */
*pca++ = *attr++; /* token */
*pca++ = *attr++; /* value */
}
}

View File

@ -33,5 +33,11 @@ extern int __glXCreateContextWithConfigSGIX(__GLXclientState * cl, GLbyte * pc);
extern int __glXJoinSwapGroupSGIX(__GLXclientState * cl, GLbyte * pc);
extern int __glXMakeCurrentReadSGI(__GLXclientState * cl, GLbyte * pc);
extern int __glXQueryMaxSwapBarriersSGIX(__GLXclientState * cl, GLbyte * pc);
extern int __glXDoSwapBuffers(__GLXclientState * cl, XID drawId,
GLXContextTag tag);
extern Display *GetBackEndDisplay(__GLXclientState * cl, int s);
extern int GetCurrentBackEndTag(__GLXclientState * cl, GLXContextTag tag,
int s);
#endif /* !__GLX_cmds_h__ */

View File

@ -39,8 +39,6 @@
#include "glxext.h"
#include "glxvendor.h"
extern int glxIsExtensionSupported(char *ext);
int __glXSwapGetFBConfigsSGIX(__GLXclientState * cl, GLbyte * pc);
/************************************************************************/
@ -440,7 +438,7 @@ __glXSwapUseXFont(__GLXclientState * cl, GLbyte * pc)
int
__glXSwapQueryExtensionsString(__GLXclientState * cl, GLbyte * pc)
{
xGLXQueryExtensionsStringReq *req = NULL;
xGLXQueryExtensionsStringReq *req = (xGLXQueryExtensionsStringReq *) pc;
__GLX_DECLARE_SWAP_VARIABLES;

View File

@ -53,6 +53,7 @@ extern void __glXFlushContextCache(void);
extern void __glXFreeGLXWindow(__glXWindow * pGlxWindow);
extern void __glXFreeGLXPixmap(__GLXpixmap * pGlxPixmap);
extern void __glXFreeGLXPbuffer(__glXPbuffer * pGlxPbuffer);
extern void __glXNoSuchRenderOpcode(GLbyte *);
extern int __glXNoSuchSingleOpcode(__GLXclientState *, GLbyte *);

View File

@ -65,8 +65,6 @@ static void
CalcServerVersionAndExtensions(void)
{
int s;
xGLXQueryVersionReq *req;
xGLXQueryVersionReply reply;
char **be_extensions;
char *ext;
char *denied_extensions;
@ -80,6 +78,8 @@ CalcServerVersionAndExtensions(void)
for (s = 0; s < __glXNumActiveScreens; s++) {
DMXScreenInfo *dmxScreen = &dmxScreens[s];
Display *dpy = dmxScreen->beDisplay;
xGLXQueryVersionReq *req;
xGLXQueryVersionReply reply;
/* Send the glXQueryVersion request */
LockDisplay(dpy);
@ -335,7 +335,7 @@ __glXGetServerString(unsigned int name)
}
int
glxIsExtensionSupported(char *ext)
glxIsExtensionSupported(const char *ext)
{
return (strstr(ExtensionsString, ext) != NULL);
}

View File

@ -50,4 +50,6 @@ extern void __glXScreenReset(void);
extern char *__glXGetServerString(unsigned int name);
extern int glxIsExtensionSupported(const char *ext);
#endif /* !__GLX_screens_h__ */

View File

@ -149,9 +149,7 @@ extern __GLXclientState *__glXClients[];
typedef void (*__GLXdispatchRenderProcPtr) (GLbyte *);
typedef int (*__GLXdispatchSingleProcPtr) (__GLXclientState *, GLbyte *);
typedef int (*__GLXdispatchVendorPrivProcPtr) (__GLXclientState *, GLbyte *);
extern __GLXdispatchSingleProcPtr __glXSingleTable[];
extern __GLXdispatchVendorPrivProcPtr __glXVendorPrivTable_EXT[];
extern __GLXdispatchSingleProcPtr __glXSwapSingleTable[];
extern __GLXdispatchVendorPrivProcPtr __glXSwapVendorPrivTable_EXT[];
extern __GLXdispatchRenderProcPtr __glXSwapRenderTable[];
@ -193,9 +191,6 @@ extern RESTYPE __glXPbufferRes;
extern char *__glXcombine_strings(const char *, const char *);
extern void __glXDisp_DrawArrays(GLbyte *);
extern void __glXDispSwap_DrawArrays(GLbyte *);
/*
** Routines for sending swapped replies.
*/
@ -287,9 +282,6 @@ extern int __glXConvolutionParameterfvSize(GLenum pname);
extern int __glXColorTableParameterfvSize(GLenum pname);
extern int __glXColorTableParameterivSize(GLenum pname);
extern void __glXFreeGLXWindow(__glXWindow * pGlxWindow);
extern void __glXFreeGLXPbuffer(__glXPbuffer * pGlxPbuffer);
extern int __glXVersionMajor;
extern int __glXVersionMinor;

View File

@ -45,6 +45,8 @@
/* #include "g_disptab_EXT.h" */
#include "unpack.h"
#include "glxutil.h"
#include "glxcmds.h"
#include "glxsingle.h"
#include "GL/glxproto.h"
@ -81,10 +83,6 @@
#define X_GLXSingle 0 /* needed by GetReqExtra */
extern Display *GetBackEndDisplay(__GLXclientState * cl, int s);
extern int GetCurrentBackEndTag(__GLXclientState * cl, GLXContextTag tag,
int s);
static int swap_vec_element_size = 0;
static void

View File

@ -47,8 +47,4 @@ extern int __glXForwardAllWithReplySwapsv(__GLXclientState * cl, GLbyte * pc);
extern int __glXForwardAllWithReplySwapiv(__GLXclientState * cl, GLbyte * pc);
extern int __glXForwardAllWithReplySwapdv(__GLXclientState * cl, GLbyte * pc);
extern int __glXDisp_ReadPixels(__GLXclientState * cl, GLbyte * pc);
extern int __glXDispSwap_GetTexImage(__GLXclientState * cl, GLbyte * pc);
extern int __glXDispSwap_GetColorTable(__GLXclientState * cl, GLbyte * pc);
#endif

View File

@ -39,9 +39,7 @@
#include "dmxwindow.h"
#include "glxserver.h"
#include "glxswap.h"
extern int __glXDoSwapBuffers(__GLXclientState * cl, XID drawId,
GLXContextTag tag);
#include "glxcmds.h"
typedef struct _SwapGroup *SwapGroupPtr;

View File

@ -44,6 +44,8 @@
/* #include "g_disptab_EXT.h" */
#include "unpack.h"
#include "glxutil.h"
#include "glxcmds.h"
#include "glxvendor.h"
#include "GL/glxproto.h"
@ -78,10 +80,6 @@
dpy->request++
#endif
extern Display *GetBackEndDisplay(__GLXclientState * cl, int s);
extern int GetCurrentBackEndTag(__GLXclientState * cl, GLXContextTag tag,
int s);
static int swap_vec_element_size = 0;
static void

View File

@ -874,17 +874,17 @@ dmxInputScanForExtensions(DMXInputInfo * dmxInput, int doXI)
{
XExtensionVersion *ext;
XDeviceInfo *devices;
Display *display;
Display *dsp;
int num;
int i, j;
XextErrorHandler handler;
if (!(display = XOpenDisplay(dmxInput->name)))
if (!(dsp = XOpenDisplay(dmxInput->name)))
return;
/* Print out information about the XInput Extension. */
handler = XSetExtensionErrorHandler(dmxInputExtensionErrorHandler);
ext = XGetExtensionVersion(display, INAME);
ext = XGetExtensionVersion(dsp, INAME);
XSetExtensionErrorHandler(handler);
if (!ext || ext == (XExtensionVersion *) NoSuchExtension) {
@ -894,7 +894,7 @@ dmxInputScanForExtensions(DMXInputInfo * dmxInput, int doXI)
dmxLogInput(dmxInput, "Locating devices on %s (%s version %d.%d)\n",
dmxInput->name, INAME,
ext->major_version, ext->minor_version);
devices = XListInputDevices(display, &num);
devices = XListInputDevices(dsp, &num);
XFree(ext);
ext = NULL;
@ -956,7 +956,7 @@ dmxInputScanForExtensions(DMXInputInfo * dmxInput, int doXI)
}
XFreeDeviceList(devices);
}
XCloseDisplay(display);
XCloseDisplay(dsp);
}
/** Re-initialize all the devices described in \a dmxInput. Called from

View File

@ -52,6 +52,13 @@ void processScreenOrOutputArg(const char *screen_size, const char *output, char
void processOutputArg(const char *output, char *parent_id);
void processScreenArg(const char *screen_size, char *parent_id);
int
main(int argc, char *argv[], char *envp[])
{
hostx_use_resname(basename(argv[0]), 0);
return dix_main(argc, argv, envp);
}
void
InitCard(char *name)
{
@ -209,10 +216,6 @@ ddxProcessArgument(int argc, char **argv, int i)
EPHYR_DBG("mark argv[%d]='%s'", i, argv[i]);
if (i == 1) {
hostx_use_resname(basename(argv[0]), 0);
}
if (!strcmp(argv[i], "-parent")) {
if (i + 1 < argc) {
int j;

View File

@ -177,7 +177,7 @@ hostx_set_win_title(KdScreenInfo *screen, const char *extra_text)
memset(buf, 0, BUF_LEN + 1);
snprintf(buf, BUF_LEN, "Xephyr on %s.%d %s",
HostX.server_dpy_name,
HostX.server_dpy_name ? HostX.server_dpy_name : ":0",
scrpriv->mynum, (extra_text != NULL) ? extra_text : "");
xcb_icccm_set_wm_name(HostX.conn,
@ -443,7 +443,7 @@ hostx_init(void)
else
#endif
HostX.conn = xcb_connect(NULL, &HostX.screen);
if (xcb_connection_has_error(HostX.conn)) {
if (!HostX.conn || xcb_connection_has_error(HostX.conn)) {
fprintf(stderr, "\nXephyr cannot open host display. Is DISPLAY set?\n");
exit(1);
}
@ -798,7 +798,7 @@ hostx_screen_init(KdScreenInfo *screen,
}
EPHYR_DBG("host_screen=%p x=%d, y=%d, wxh=%dx%d, buffer_height=%d",
host_screen, x, y, width, height, buffer_height);
screen, x, y, width, height, buffer_height);
if (scrpriv->ximg != NULL) {
/* Free up the image data if previously used
@ -866,6 +866,11 @@ hostx_screen_init(KdScreenInfo *screen,
~0,
NULL);
/* Match server byte order so that the image can be converted to
* the native byte order by xcb_image_put() before drawing */
if (host_depth_matches_server(scrpriv))
scrpriv->ximg->byte_order = IMAGE_BYTE_ORDER;
scrpriv->ximg->data =
malloc(scrpriv->ximg->stride * buffer_height);
}
@ -1034,8 +1039,13 @@ hostx_paint_rect(KdScreenInfo *screen,
sx, sy, dx, dy, width, height, FALSE);
}
else {
xcb_image_put(HostX.conn, scrpriv->win, HostX.gc, scrpriv->ximg,
dx, dy, 0);
xcb_image_t *subimg = xcb_image_subimage(scrpriv->ximg, sx, sy,
width, height, 0, 0, 0);
xcb_image_t *img = xcb_image_native(HostX.conn, subimg, 1);
xcb_image_put(HostX.conn, scrpriv->win, HostX.gc, img, dx, dy, 0);
if (subimg != img)
xcb_image_destroy(img);
xcb_image_destroy(subimg);
}
xcb_aux_sync(HostX.conn);
@ -1407,9 +1417,12 @@ ephyr_glamor_init(ScreenPtr screen)
ephyr_glamor_set_window_size(scrpriv->glamor,
scrpriv->win_width, scrpriv->win_height);
glamor_init(screen,
GLAMOR_USE_SCREEN |
GLAMOR_USE_PICTURE_SCREEN);
if (!glamor_init(screen,
GLAMOR_USE_SCREEN |
GLAMOR_USE_PICTURE_SCREEN)) {
FatalError("Failed to initialize glamor\n");
return FALSE;
}
return TRUE;
}

View File

@ -18,6 +18,7 @@ Xfake_SOURCES = \
Xfake_LDADD = \
libfake.la \
@KDRIVE_MAIN_LIB@ \
@KDRIVE_LIBS@
Xfake_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)

View File

@ -16,6 +16,7 @@ Xfbdev_SOURCES = \
Xfbdev_LDADD = \
libfbdev.la \
@KDRIVE_MAIN_LIB@ \
@KDRIVE_LIBS@
Xfbdev_DEPENDENCIES = \

View File

@ -583,10 +583,11 @@ xf86VTEnter(void)
/* Turn screen saver off when switching back */
dixSaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset);
/* If we use systemd-logind it will enable input devices for us */
if (!systemd_logind_controls_session())
for (pInfo = xf86InputDevs; pInfo; pInfo = pInfo->next)
for (pInfo = xf86InputDevs; pInfo; pInfo = pInfo->next) {
/* Devices with server managed fds get enabled on logind resume */
if (!(pInfo->flags & XI86_SERVER_FD))
xf86EnableInputDeviceForVTSwitch(pInfo);
}
for (ih = InputHandlers; ih; ih = ih->next) {
if (ih->is_input)

View File

@ -153,8 +153,10 @@ xf86_check_platform_slot(const struct xf86_platform_device *pd)
for (i = 0; i < xf86NumEntities; i++) {
const EntityPtr u = xf86Entities[i];
if (pd->pdev && u->bus.type == BUS_PCI)
return !MATCH_PCI_DEVICES(pd->pdev, u->bus.id.pci);
if (pd->pdev && u->bus.type == BUS_PCI &&
MATCH_PCI_DEVICES(pd->pdev, u->bus.id.pci)) {
return FALSE;
}
if ((u->bus.type == BUS_PLATFORM) && (pd == u->bus.id.plat)) {
return FALSE;
}
@ -426,6 +428,10 @@ xf86platformProbeDev(DriverPtr drvp)
/* find the main device or any device specificed in xorg.conf */
for (i = 0; i < numDevs; i++) {
/* skip inactive devices */
if (!devList[i]->active)
continue;
for (j = 0; j < xf86_num_platform_devices; j++) {
if (devList[i]->busID && *devList[i]->busID) {
if (xf86PlatformDeviceCheckBusID(&xf86_platform_devices[j], devList[i]->busID))
@ -449,10 +455,14 @@ xf86platformProbeDev(DriverPtr drvp)
continue;
}
/* if autoaddgpu devices is enabled then go find a few more and add them as GPU screens */
if (xf86Info.autoAddGPU && numDevs) {
/* if autoaddgpu devices is enabled then go find any unclaimed platform
* devices and add them as GPU screens */
if (xf86Info.autoAddGPU) {
for (j = 0; j < xf86_num_platform_devices; j++) {
probeSingleDevice(&xf86_platform_devices[j], drvp, devList[0], PLATFORM_PROBE_GPU_SCREEN);
if (probeSingleDevice(&xf86_platform_devices[j], drvp,
devList ? devList[0] : NULL,
PLATFORM_PROBE_GPU_SCREEN))
foundScreen = TRUE;
}
}

View File

@ -269,9 +269,11 @@ ProcDRI2GetBuffers(ClientPtr client)
int status, width, height, count;
unsigned int *attachments;
REQUEST_FIXED_SIZE(xDRI2GetBuffersReq, stuff->count * 4);
if (stuff->count > (INT_MAX / 4))
REQUEST_AT_LEAST_SIZE(xDRI2GetBuffersReq);
/* stuff->count is a count of CARD32 attachments that follows */
if (stuff->count > (INT_MAX / sizeof(CARD32)))
return BadLength;
REQUEST_FIXED_SIZE(xDRI2GetBuffersReq, stuff->count * sizeof(CARD32));
if (!validDrawable(client, stuff->drawable, DixReadAccess | DixWriteAccess,
&pDrawable, &status))
@ -297,7 +299,13 @@ ProcDRI2GetBuffersWithFormat(ClientPtr client)
int status, width, height, count;
unsigned int *attachments;
REQUEST_FIXED_SIZE(xDRI2GetBuffersReq, stuff->count * (2 * 4));
REQUEST_AT_LEAST_SIZE(xDRI2GetBuffersReq);
/* stuff->count is a count of pairs of CARD32s (attachments & formats)
that follows */
if (stuff->count > (INT_MAX / (2 * sizeof(CARD32))))
return BadLength;
REQUEST_FIXED_SIZE(xDRI2GetBuffersReq,
stuff->count * (2 * sizeof(CARD32)));
if (!validDrawable(client, stuff->drawable, DixReadAccess | DixWriteAccess,
&pDrawable, &status))
return status;

View File

@ -63,6 +63,7 @@ CHIPSET(0x6608, OLAND_6608, OLAND)
CHIPSET(0x6610, OLAND_6610, OLAND)
CHIPSET(0x6611, OLAND_6611, OLAND)
CHIPSET(0x6613, OLAND_6613, OLAND)
CHIPSET(0x6617, OLAND_6617, OLAND)
CHIPSET(0x6620, OLAND_6620, OLAND)
CHIPSET(0x6621, OLAND_6621, OLAND)
CHIPSET(0x6623, OLAND_6623, OLAND)
@ -85,6 +86,7 @@ CHIPSET(0x6651, BONAIRE_6651, BONAIRE)
CHIPSET(0x6658, BONAIRE_6658, BONAIRE)
CHIPSET(0x665C, BONAIRE_665C, BONAIRE)
CHIPSET(0x665D, BONAIRE_665D, BONAIRE)
CHIPSET(0x665F, BONAIRE_665F, BONAIRE)
CHIPSET(0x9830, KABINI_9830, KABINI)
CHIPSET(0x9831, KABINI_9831, KABINI)
@ -155,3 +157,29 @@ CHIPSET(0x67B8, HAWAII_67B8, HAWAII)
CHIPSET(0x67B9, HAWAII_67B9, HAWAII)
CHIPSET(0x67BA, HAWAII_67BA, HAWAII)
CHIPSET(0x67BE, HAWAII_67BE, HAWAII)
CHIPSET(0x6900, ICELAND_, ICELAND)
CHIPSET(0x6901, ICELAND_, ICELAND)
CHIPSET(0x6902, ICELAND_, ICELAND)
CHIPSET(0x6903, ICELAND_, ICELAND)
CHIPSET(0x6907, ICELAND_, ICELAND)
CHIPSET(0x6920, TONGA_, TONGA)
CHIPSET(0x6921, TONGA_, TONGA)
CHIPSET(0x6928, TONGA_, TONGA)
CHIPSET(0x6929, TONGA_, TONGA)
CHIPSET(0x692B, TONGA_, TONGA)
CHIPSET(0x692F, TONGA_, TONGA)
CHIPSET(0x6930, TONGA_, TONGA)
CHIPSET(0x6938, TONGA_, TONGA)
CHIPSET(0x6939, TONGA_, TONGA)
CHIPSET(0x9870, CARRIZO_, CARRIZO)
CHIPSET(0x9874, CARRIZO_, CARRIZO)
CHIPSET(0x9875, CARRIZO_, CARRIZO)
CHIPSET(0x9876, CARRIZO_, CARRIZO)
CHIPSET(0x9877, CARRIZO_, CARRIZO)
CHIPSET(0x7300, FIJI_, FIJI)
CHIPSET(0x98E4, STONEY_, STONEY)

View File

@ -427,10 +427,10 @@ drmmode_set_cursor(xf86CrtcPtr crtc)
drmModeSetCursor2(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id,
handle, ms->cursor_width, ms->cursor_height,
cursor->bits->xhot, cursor->bits->yhot);
if (!ret)
return;
if (ret == -EINVAL)
use_set_cursor2 = FALSE;
else
return;
}
ret = drmModeSetCursor(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id, handle,

View File

@ -25,6 +25,10 @@
*
*/
#ifdef HAVE_DIX_CONFIG_H
#include "dix-config.h"
#endif
#include "dumb_bo.h"
#include <errno.h>

View File

@ -104,7 +104,7 @@ readIntVec(struct pci_device *dev, unsigned char *buf, int len)
{
void *map;
if (!pci_device_map_legacy(dev, 0, len, 0, &map))
if (pci_device_map_legacy(dev, 0, len, 0, &map))
return FALSE;
memcpy(buf, map, len);

View File

@ -46,7 +46,7 @@ On most platforms, the "Local" connection type is a UNIX-domain socket.
On some System V platforms, the "local" connection types also include
STREAMS pipes, named pipes, and some other mechanisms.
.TP 4
.I TCP\/IP
.I TCP/IP
.B Xorg
listens on port
.RI 6000+ n ,

View File

@ -732,6 +732,8 @@ xf86CompatOutput(ScrnInfoPtr pScrn)
{
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
if (config->compat_output < 0)
return NULL;
return config->output[config->compat_output];
}

View File

@ -713,7 +713,7 @@ static const struct {
{1600, 1200, 75, 0},
{1600, 1200, 85, 0},
{1792, 1344, 60, 0},
{1792, 1344, 85, 0},
{1792, 1344, 75, 0},
{1856, 1392, 60, 0},
{1856, 1392, 75, 0},
{1920, 1200, 60, 1},

View File

@ -683,11 +683,9 @@ xf86RandR12ScreenSetSize(ScreenPtr pScreen,
Bool ret = FALSE;
int c;
if (xf86RandR12Key) {
if (randrp->virtualX == -1 || randrp->virtualY == -1) {
randrp->virtualX = pScrn->virtualX;
randrp->virtualY = pScrn->virtualY;
}
if (randrp->virtualX == -1 || randrp->virtualY == -1) {
randrp->virtualX = pScrn->virtualX;
randrp->virtualY = pScrn->virtualY;
}
if (pRoot && pScrn->vtSema)
(*pScrn->EnableDisableFBAccess) (pScrn, FALSE);
@ -730,7 +728,7 @@ xf86RandR12ScreenSetSize(ScreenPtr pScreen,
if (pRoot && pScrn->vtSema)
(*pScrn->EnableDisableFBAccess) (pScrn, TRUE);
#if RANDR_12_INTERFACE
if (xf86RandR12Key && pScreen->root && ret)
if (pScreen->root && ret)
RRScreenSizeNotify(pScreen);
#endif
return ret;
@ -826,9 +824,6 @@ xf86RandR12CreateScreenResources(ScreenPtr pScreen)
xf86RandR12ScreenSetSize(pScreen, width, height, mmWidth, mmHeight);
}
if (xf86RandR12Key == NULL)
return TRUE;
if (randrp->virtualX == -1 || randrp->virtualY == -1) {
randrp->virtualX = pScrn->virtualX;
randrp->virtualY = pScrn->virtualY;

View File

@ -75,7 +75,7 @@ readLegacy(struct pci_device *dev, unsigned char *buf, int base, int len)
{
void *map;
if (!pci_device_map_legacy(dev, base, len, 0, &map))
if (pci_device_map_legacy(dev, base, len, 0, &map))
return FALSE;
memcpy(buf, map, len);

View File

@ -62,18 +62,24 @@ drain_console(int fd, void *closure)
}
}
static void
static int
switch_to(int vt, const char *from)
{
int ret;
SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_ACTIVATE, vt));
if (ret < 0)
FatalError("%s: VT_ACTIVATE failed: %s\n", from, strerror(errno));
if (ret < 0) {
xf86Msg(X_WARNING, "%s: VT_ACTIVATE failed: %s\n", from, strerror(errno));
return 0;
}
SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_WAITACTIVE, vt));
if (ret < 0)
FatalError("%s: VT_WAITACTIVE failed: %s\n", from, strerror(errno));
if (ret < 0) {
xf86Msg(X_WARNING, "%s: VT_WAITACTIVE failed: %s\n", from, strerror(errno));
return 0;
}
return 1;
}
#pragma GCC diagnostic push
@ -208,7 +214,8 @@ xf86OpenConsole(void)
/*
* now get the VT. This _must_ succeed, or else fail completely.
*/
switch_to(xf86Info.vtno, "xf86OpenConsole");
if (!switch_to(xf86Info.vtno, "xf86OpenConsole"))
FatalError("xf86OpenConsole: Switching VT failed\n");
SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_GETMODE, &VT));
if (ret < 0)
@ -269,7 +276,8 @@ xf86OpenConsole(void)
else { /* serverGeneration != 1 */
if (!xf86Info.ShareVTs && xf86Info.autoVTSwitch) {
/* now get the VT */
switch_to(xf86Info.vtno, "xf86OpenConsole");
if (!switch_to(xf86Info.vtno, "xf86OpenConsole"))
FatalError("xf86OpenConsole: Switching VT failed\n");
}
}
}

View File

@ -40,8 +40,6 @@
#include "systemd-logind.h"
#define DBUS_TIMEOUT 500 /* Wait max 0.5 seconds */
struct systemd_logind_info {
DBusConnection *conn;
char *session;
@ -130,7 +128,7 @@ systemd_logind_take_fd(int _major, int _minor, const char *path,
}
reply = dbus_connection_send_with_reply_and_block(info->conn, msg,
DBUS_TIMEOUT, &error);
DBUS_TIMEOUT_USE_DEFAULT, &error);
if (!reply) {
LogMessage(X_ERROR, "systemd-logind: failed to take device %s: %s\n",
path, error.message);
@ -207,7 +205,7 @@ systemd_logind_release_fd(int _major, int _minor, int fd)
}
reply = dbus_connection_send_with_reply_and_block(info->conn, msg,
DBUS_TIMEOUT, &error);
DBUS_TIMEOUT_USE_DEFAULT, &error);
if (!reply)
LogMessage(X_ERROR, "systemd-logind: failed to release device: %s\n",
error.message);
@ -289,7 +287,7 @@ systemd_logind_ack_pause(struct systemd_logind_info *info,
}
reply = dbus_connection_send_with_reply_and_block(info->conn, msg,
DBUS_TIMEOUT, &error);
DBUS_TIMEOUT_USE_DEFAULT, &error);
if (!reply)
LogMessage(X_ERROR, "systemd-logind: failed to ack pause: %s\n",
error.message);
@ -313,6 +311,9 @@ message_filter(DBusConnection * connection, DBusMessage * message, void *data)
dbus_int32_t major, minor;
char *pause_str;
if (dbus_message_get_type (message) != DBUS_MESSAGE_TYPE_SIGNAL)
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
dbus_error_init(&error);
if (dbus_message_is_signal(message,
@ -454,7 +455,7 @@ connect_hook(DBusConnection *connection, void *data)
}
reply = dbus_connection_send_with_reply_and_block(connection, msg,
DBUS_TIMEOUT, &error);
DBUS_TIMEOUT_USE_DEFAULT, &error);
if (!reply) {
LogMessage(X_ERROR, "systemd-logind: failed to get session: %s\n",
error.message);
@ -489,7 +490,7 @@ connect_hook(DBusConnection *connection, void *data)
}
reply = dbus_connection_send_with_reply_and_block(connection, msg,
DBUS_TIMEOUT, &error);
DBUS_TIMEOUT_USE_DEFAULT, &error);
if (!reply) {
LogMessage(X_ERROR, "systemd-logind: TakeControl failed: %s\n",
error.message);
@ -561,7 +562,7 @@ systemd_logind_release_control(struct systemd_logind_info *info)
}
reply = dbus_connection_send_with_reply_and_block(info->conn, msg,
DBUS_TIMEOUT, &error);
DBUS_TIMEOUT_USE_DEFAULT, &error);
if (!reply) {
LogMessage(X_ERROR, "systemd-logind: ReleaseControl failed: %s\n",
error.message);

View File

@ -178,7 +178,7 @@ xf86InstallSIGIOHandler(int fd, void (*f) (int, void *), void *closure)
}
sigemptyset(&sa.sa_mask);
sigaddset(&sa.sa_mask, SIGIO);
sa.sa_flags = 0;
sa.sa_flags = SA_RESTART;
sa.sa_handler = xf86SIGIO;
sigaction(SIGIO, &sa, &osa);
xf86SigIOFuncs[i].fd = fd;

View File

@ -183,11 +183,7 @@ extern _X_HIDDEN char xf86SolarisFbDev[PATH_MAX];
#include <sys/types.h>
#include <assert.h>
#ifdef __linux__
#include <termio.h>
#else /* __GLIBC__ */
#include <termios.h>
#endif
#ifdef __sparc__
#include <sys/param.h>
#endif

View File

@ -350,13 +350,25 @@ BEGIN {
if (sdk) {
n = 3;
# skip line numbers GCC 5 adds before __attribute__
while ($n == "" || $0 ~ /^# [0-9]+ "/) {
getline;
n = 1;
}
# skip attribute, if any
while ($n ~ /^(__attribute__|__global)/ ||
# skip modifiers, if any
$n ~ /^\*?(unsigned|const|volatile|struct|_X_EXPORT)$/ ||
# skip pointer
$n ~ /^[a-zA-Z0-9_]*\*$/)
$n ~ /^[a-zA-Z0-9_]*\*$/) {
n++;
# skip line numbers GCC 5 adds after __attribute__
while ($n == "" || $0 ~ /^# [0-9]+ "/) {
getline;
n = 1;
}
}
# type specifier may not be set, as in
# extern _X_EXPORT unsigned name(...)

View File

@ -233,9 +233,7 @@ X86EMU_dump_memory(u16 seg, u16 off, u32 amt)
u32 start = off & 0xfffffff0;
u32 end = (off + 16) & 0xfffffff0;
u32 i;
u32 current;
current = start;
while (end <= off + amt) {
printk("%04x:%04x ", seg, start);
for (i = start; i < off; i++)
@ -261,8 +259,6 @@ x86emu_single_step(void)
static int breakpoint;
static int noDecode = 1;
char *p;
if (DEBUG_BREAK()) {
if (M.x86.saved_ip != breakpoint) {
return;
@ -279,7 +275,7 @@ x86emu_single_step(void)
offset = M.x86.saved_ip;
while (!done) {
printk("-");
p = fgets(s, 1023, stdin);
(void)fgets(s, 1023, stdin);
cmd = parse_line(s, ps, &ntok);
switch (cmd) {
case 'u':

View File

@ -16,6 +16,10 @@ is" without express or implied warranty.
#include <xnest-config.h>
#endif
#ifdef WIN32
#include <X11/Xwindows.h>
#endif
#include <X11/X.h>
#include <X11/Xproto.h>
#include <xcb/xcb_keysyms.h>

View File

@ -52,6 +52,7 @@
#include "visualConfigs.h"
#include "dri.h"
#include "extension_string.h"
#include "darwin.h"
#define GLAQUA_DEBUG_MSG(msg, args ...) ASL_LOG(ASL_LEVEL_DEBUG, "GLXAqua", \
@ -111,6 +112,10 @@ typedef struct __GLXAquaDrawable __GLXAquaDrawable;
*/
struct __GLXAquaScreen {
__GLXscreen base;
/* Supported GLX extensions */
unsigned char glx_enable_bits[__GLX_EXT_BYTES];
int index;
int num_vis;
};
@ -541,13 +546,33 @@ __glXAquaScreenProbe(ScreenPtr pScreen)
screen->base.GLXmajor = 1;
screen->base.GLXminor = 4;
screen->base.GLXextensions = strdup("GLX_SGIX_fbconfig "
"GLX_SGIS_multisample "
"GLX_ARB_multisample "
"GLX_EXT_visual_info "
"GLX_EXT_import_context ");
/*We may be able to add more GLXextensions at a later time. */
memset(screen->glx_enable_bits, 0, __GLX_EXT_BYTES);
__glXEnableExtension(screen->glx_enable_bits, "GLX_EXT_visual_info");
__glXEnableExtension(screen->glx_enable_bits, "GLX_EXT_visual_rating");
__glXEnableExtension(screen->glx_enable_bits, "GLX_EXT_import_context");
__glXEnableExtension(screen->glx_enable_bits, "GLX_OML_swap_method");
__glXEnableExtension(screen->glx_enable_bits, "GLX_SGIX_fbconfig");
__glXEnableExtension(screen->glx_enable_bits, "GLX_SGIS_multisample");
__glXEnableExtension(screen->glx_enable_bits, "GLX_ARB_multisample");
//__glXEnableExtension(screen->glx_enable_bits, "GLX_ARB_create_context");
//__glXEnableExtension(screen->glx_enable_bits, "GLX_ARB_create_context_profile");
// Generate the GLX extensions string (overrides that set by __glXScreenInit())
{
unsigned int buffer_size =
__glXGetExtensionString(screen->glx_enable_bits, NULL);
if (buffer_size > 0) {
free(screen->base.GLXextensions);
screen->base.GLXextensions = xnfalloc(buffer_size);
__glXGetExtensionString(screen->glx_enable_bits,
screen->base.GLXextensions);
}
}
return &screen->base;
}

View File

@ -1069,12 +1069,12 @@ X11ApplicationCanEnterRandR(void)
if (!XQuartzIsRootless)
QuartzShowFullscreen(FALSE);
switch (NSRunAlertPanel(title, msg,
switch (NSRunAlertPanel(title, @"%@",
NSLocalizedString(@"Allow",
@""),
NSLocalizedString(@"Cancel",
@""),
NSLocalizedString(@"Always Allow", @""))) {
NSLocalizedString(@"Always Allow", @""), msg)) {
case NSAlertOtherReturn:
[X11App prefs_set_boolean:@PREFS_NO_RANDR_ALERT value:YES];
[X11App prefs_synchronize];
@ -1122,10 +1122,10 @@ X11ApplicationFatalError(const char *f, va_list args)
*/
dispatch_sync(dispatch_get_main_queue(), ^{
if (NSAlertDefaultReturn ==
NSRunAlertPanel (title, msg,
NSRunAlertPanel (title, @"%@",
NSLocalizedString (@"Quit", @""),
NSLocalizedString (
@"Report...", @""), nil)) {
NSLocalizedString (@"Report...", @""),
nil, msg)) {
exit (EXIT_FAILURE);
}
});
@ -1160,9 +1160,8 @@ check_xinitrc(void)
@"Startup xinitrc dialog");
if (NSAlertDefaultReturn ==
NSRunAlertPanel(nil, msg, NSLocalizedString(@"Yes", @""),
NSLocalizedString(@"No",
@""), nil)) {
NSRunAlertPanel(nil, @"%@", NSLocalizedString(@"Yes", @""),
NSLocalizedString(@"No", @""), nil, msg)) {
char buf2[1024];
int i = -1;
@ -1239,8 +1238,16 @@ X11ApplicationMain(int argc, char **argv, char **envp)
QuartzModeBundleInit();
/* Calculate the height of the menubar so we can avoid it. */
aquaMenuBarHeight = NSHeight([[NSScreen mainScreen] frame]) -
NSMaxY([[NSScreen mainScreen] visibleFrame]);
aquaMenuBarHeight = [[NSApp mainMenu] menuBarHeight];
#if ! __LP64__
if (!aquaMenuBarHeight) {
aquaMenuBarHeight = [NSMenuView menuBarHeight];
}
#endif
if (!aquaMenuBarHeight) {
NSScreen* primaryScreen = [[NSScreen screens] objectAtIndex:0];
aquaMenuBarHeight = NSHeight([primaryScreen frame]) - NSMaxY([primaryScreen visibleFrame]);
}
#ifdef HAVE_LIBDISPATCH
eventTranslationQueue = dispatch_queue_create(

View File

@ -364,7 +364,7 @@ extern char *bundle_id_prefix;
}
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1080
if (asl_log_descriptor) {
if (&asl_log_descriptor) {
char *asl_sender;
aslmsg amsg = asl_new(ASL_TYPE_MSG);
assert(amsg);
@ -414,7 +414,7 @@ extern char *bundle_id_prefix;
case 0: /* child2 */
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1080
if (asl_log_descriptor) {
if (&asl_log_descriptor) {
/* Replace our stdout/stderr */
dup2(stdout_pipe[1], STDOUT_FILENO);
dup2(stderr_pipe[1], STDERR_FILENO);
@ -443,7 +443,7 @@ extern char *bundle_id_prefix;
}
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1080
if (asl_log_descriptor) {
if (&asl_log_descriptor) {
/* Close the write ends of the pipe */
close(stdout_pipe[1]);
close(stderr_pipe[1]);
@ -929,14 +929,13 @@ extern char *bundle_id_prefix;
* and then run the alert on a timer? It seems to work here, so..
*/
return (NSRunAlertPanel(title, msg, NSLocalizedString(@"Quit", @""),
NSLocalizedString(@"Cancel", @""), nil)
== NSAlertDefaultReturn) ? NSTerminateNow : NSTerminateCancel;
NSInteger result = NSRunAlertPanel(title, @"%@", NSLocalizedString(@"Quit", @""),
NSLocalizedString(@"Cancel", @""), nil, msg);
return (result == NSAlertDefaultReturn) ? NSTerminateNow : NSTerminateCancel;
}
- (void) applicationWillTerminate:(NSNotification *)aNotification _X_NORETURN
{
int remain;
[X11App prefs_synchronize];
/* shutdown the X server, it will exit () for us. */

View File

@ -35,6 +35,19 @@
<string>sparkle.pem</string>
<key>SUFeedURL</key>
<string>http://xquartz.macosforge.org/downloads/sparkle/release.xml</string>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>macosforge.org</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
</dict>
</dict>
#endif
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>

View File

@ -30,153 +30,123 @@ EXTRA_DIST = \
Info.plist.cpp \
PkgInfo \
$(resource_DATA) \
Resources/ar.lproj/InfoPlist.strings \
Resources/ar.lproj/Localizable.strings \
Resources/ar.lproj/locversion.plist \
Resources/ar.lproj/main.nib/designable.nib \
Resources/ar.lproj/main.nib/keyedobjects.nib \
Resources/ca.lproj/InfoPlist.strings \
Resources/ca.lproj/Localizable.strings \
Resources/ca.lproj/locversion.plist \
Resources/ca.lproj/main.nib/designable.nib \
Resources/ca.lproj/main.nib/keyedobjects.nib \
Resources/cs.lproj/InfoPlist.strings \
Resources/cs.lproj/Localizable.strings \
Resources/cs.lproj/locversion.plist \
Resources/cs.lproj/main.nib/designable.nib \
Resources/cs.lproj/main.nib/keyedobjects.nib \
Resources/da.lproj/InfoPlist.strings \
Resources/da.lproj/Localizable.strings \
Resources/da.lproj/locversion.plist \
Resources/da.lproj/main.nib/designable.nib \
Resources/da.lproj/main.nib/keyedobjects.nib \
Resources/Dutch.lproj/InfoPlist.strings \
Resources/Dutch.lproj/Localizable.strings \
Resources/Dutch.lproj/locversion.plist \
Resources/Dutch.lproj/main.nib/designable.nib \
Resources/Dutch.lproj/main.nib/keyedobjects.nib \
Resources/el.lproj/InfoPlist.strings \
Resources/el.lproj/Localizable.strings \
Resources/el.lproj/locversion.plist \
Resources/el.lproj/main.nib/designable.nib \
Resources/el.lproj/main.nib/keyedobjects.nib \
Resources/English.lproj/InfoPlist.strings \
Resources/English.lproj/Localizable.strings \
Resources/English.lproj/locversion.plist \
Resources/English.lproj/main.nib/designable.nib \
Resources/English.lproj/main.nib/keyedobjects.nib \
Resources/fi.lproj/InfoPlist.strings \
Resources/fi.lproj/Localizable.strings \
Resources/fi.lproj/locversion.plist \
Resources/fi.lproj/main.nib/designable.nib \
Resources/fi.lproj/main.nib/keyedobjects.nib \
Resources/French.lproj/InfoPlist.strings \
Resources/French.lproj/Localizable.strings \
Resources/French.lproj/locversion.plist \
Resources/French.lproj/main.nib/designable.nib \
Resources/French.lproj/main.nib/keyedobjects.nib \
Resources/German.lproj/InfoPlist.strings \
Resources/German.lproj/Localizable.strings \
Resources/German.lproj/locversion.plist \
Resources/German.lproj/main.nib/designable.nib \
Resources/German.lproj/main.nib/keyedobjects.nib \
Resources/he.lproj/InfoPlist.strings \
Resources/he.lproj/Localizable.strings \
Resources/he.lproj/locversion.plist \
Resources/he.lproj/main.nib/designable.nib \
Resources/he.lproj/main.nib/keyedobjects.nib \
Resources/hr.lproj/InfoPlist.strings \
Resources/hr.lproj/Localizable.strings \
Resources/hr.lproj/locversion.plist \
Resources/hr.lproj/main.nib/designable.nib \
Resources/hr.lproj/main.nib/keyedobjects.nib \
Resources/hu.lproj/InfoPlist.strings \
Resources/hu.lproj/Localizable.strings \
Resources/hu.lproj/locversion.plist \
Resources/hu.lproj/main.nib/designable.nib \
Resources/hu.lproj/main.nib/keyedobjects.nib \
Resources/Italian.lproj/InfoPlist.strings \
Resources/Italian.lproj/Localizable.strings \
Resources/Italian.lproj/locversion.plist \
Resources/Italian.lproj/main.nib/designable.nib \
Resources/Italian.lproj/main.nib/keyedobjects.nib \
Resources/Japanese.lproj/InfoPlist.strings \
Resources/Japanese.lproj/Localizable.strings \
Resources/Japanese.lproj/locversion.plist \
Resources/Japanese.lproj/main.nib/designable.nib \
Resources/Japanese.lproj/main.nib/keyedobjects.nib \
Resources/ko.lproj/InfoPlist.strings \
Resources/ko.lproj/Localizable.strings \
Resources/ko.lproj/locversion.plist \
Resources/ko.lproj/main.nib/designable.nib \
Resources/ko.lproj/main.nib/keyedobjects.nib \
Resources/no.lproj/InfoPlist.strings \
Resources/no.lproj/Localizable.strings \
Resources/no.lproj/locversion.plist \
Resources/no.lproj/main.nib/designable.nib \
Resources/no.lproj/main.nib/keyedobjects.nib \
Resources/pl.lproj/InfoPlist.strings \
Resources/pl.lproj/Localizable.strings \
Resources/pl.lproj/locversion.plist \
Resources/pl.lproj/main.nib/designable.nib \
Resources/pl.lproj/main.nib/keyedobjects.nib \
Resources/pt.lproj/InfoPlist.strings \
Resources/pt.lproj/Localizable.strings \
Resources/pt.lproj/locversion.plist \
Resources/pt.lproj/main.nib/designable.nib \
Resources/pt.lproj/main.nib/keyedobjects.nib \
Resources/pt_PT.lproj/InfoPlist.strings \
Resources/pt_PT.lproj/Localizable.strings \
Resources/pt_PT.lproj/locversion.plist \
Resources/pt_PT.lproj/main.nib/designable.nib \
Resources/pt_PT.lproj/main.nib/keyedobjects.nib \
Resources/ro.lproj/InfoPlist.strings \
Resources/ro.lproj/Localizable.strings \
Resources/ro.lproj/locversion.plist \
Resources/ro.lproj/main.nib/designable.nib \
Resources/ro.lproj/main.nib/keyedobjects.nib \
Resources/ru.lproj/InfoPlist.strings \
Resources/ru.lproj/Localizable.strings \
Resources/ru.lproj/locversion.plist \
Resources/ru.lproj/main.nib/designable.nib \
Resources/ru.lproj/main.nib/keyedobjects.nib \
Resources/sk.lproj/InfoPlist.strings \
Resources/sk.lproj/Localizable.strings \
Resources/sk.lproj/locversion.plist \
Resources/sk.lproj/main.nib/designable.nib \
Resources/sk.lproj/main.nib/keyedobjects.nib \
Resources/Spanish.lproj/InfoPlist.strings \
Resources/Spanish.lproj/Localizable.strings \
Resources/Spanish.lproj/locversion.plist \
Resources/Spanish.lproj/main.nib/designable.nib \
Resources/Spanish.lproj/main.nib/keyedobjects.nib \
Resources/sv.lproj/InfoPlist.strings \
Resources/sv.lproj/Localizable.strings \
Resources/sv.lproj/locversion.plist \
Resources/sv.lproj/main.nib/designable.nib \
Resources/sv.lproj/main.nib/keyedobjects.nib \
Resources/th.lproj/InfoPlist.strings \
Resources/th.lproj/Localizable.strings \
Resources/th.lproj/locversion.plist \
Resources/th.lproj/main.nib/designable.nib \
Resources/th.lproj/main.nib/keyedobjects.nib \
Resources/tr.lproj/InfoPlist.strings \
Resources/tr.lproj/Localizable.strings \
Resources/tr.lproj/locversion.plist \
Resources/tr.lproj/main.nib/designable.nib \
Resources/tr.lproj/main.nib/keyedobjects.nib \
Resources/uk.lproj/InfoPlist.strings \
Resources/uk.lproj/Localizable.strings \
Resources/uk.lproj/locversion.plist \
Resources/uk.lproj/main.nib/designable.nib \
Resources/uk.lproj/main.nib/keyedobjects.nib \
Resources/X11.icns \
Resources/zh_CN.lproj/InfoPlist.strings \
Resources/zh_CN.lproj/Localizable.strings \
Resources/zh_CN.lproj/locversion.plist \
Resources/zh_CN.lproj/main.nib/designable.nib \
Resources/zh_CN.lproj/main.nib/keyedobjects.nib \
Resources/zh_TW.lproj/InfoPlist.strings \
Resources/zh_TW.lproj/Localizable.strings \
Resources/zh_TW.lproj/locversion.plist \
Resources/zh_TW.lproj/main.nib/designable.nib \

Some files were not shown because too many files have changed in this diff Show More