Commit Graph

1002 Commits

Author SHA1 Message Date
Jon Turney e5f4c7c80b xquartz: Fix a typo in man page substitution
The typo fixed in d69460159 was still present for this setting when
added in ac439842.

meson warns that there is no substitution with this name.
2019-05-02 15:42:58 +00:00
Jon Turney b4ed20c4f1 Promote file containing date & time build was configured to top-level
Promote the generated file containing the date & time build was
configured to top-level.

Rename it from xf86Build.h to buildDateTIme.h.

Use it as well in XQuartz, stringize BUILD_DATE when needed.
2019-05-02 15:42:58 +00:00
Jon Turney f013979507 xquartz: Add stub ddxInputThread()
Omitted from 4ad21c32
2019-04-28 22:38:51 +00:00
Michel Dänzer f9bbc9d5ea glx,xquartz: Fix make distcheck
Guard BUILT_SOURCES and CLEANFILES by XWIN_GLX_WINDOWS/XQUARTZ.
2019-02-22 10:21:27 +01:00
Alan Coopersmith 700505144f Remove obsolete B16 & B32 tags in struct definitions
They were defined as empty macros on all platforms except for the
long unsupported Cray systems which needed to use bitfields to define
types smaller than 64-bits.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-11-10 15:00:31 -08:00
Adam Jackson 03b2125005 dix: Remove LegalModifier()
This hasn't done anything besides return TRUE in a long long time.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-09-28 16:25:17 -04:00
Adam Jackson a23eba2a91 dix: Merge AbortDDX into ddxGiveUp
These are so close to identical that most DDXes implement one in terms
of the other. All the relevant cases can be distinguished by the error
code, so merge the functions together to make things simpler.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-09-28 16:25:12 -04:00
Adam Jackson d78ac2f159 mi: Factor out miSaveScreen
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-09-28 16:25:01 -04:00
Eric Anholt 9869512cbf meson: Add HAVE_LIBDISPATCH define to xquartz build.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-08-09 13:28:19 -04:00
Adam Jackson 2e497bf887 man: s/__/@/g
A cosmetic change for automake (though we have to replicate some of
xorg-macros.m4 in manpages.am now), but meson's configure_file() wants
@-delimited strings.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2018-03-27 10:13:17 -04:00
Adam Jackson 059879b3ed xquartz: Fix linking with glxvnd
Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-02-26 14:13:40 -05:00
Adam Jackson 67c303fff3 miinitext: Load GLX on the mi path
Add a stub for Xnest so it continues to link, but otherwise we support
GLX on every server so there's no need to make every DDX add it.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-02-14 17:04:48 -05:00
Adam Jackson d8ec33fe05 glx: Use vnd layer for dispatch (v4)
The big change here is MakeCurrent and context tag tracking. We now
delegate context tags entirely to the vnd layer, and simply store a
pointer to the context state as the tag data. If a context is deleted
while it's current, we allocate a fake ID for the context and move the
context state there, so the tag data still points to a real context. As
a result we can stop trying so hard to detach the client from contexts
at disconnect time and just let resource destruction handle it.

Since vnd handles all the MakeCurrent protocol now, our request handlers
for it can just be return BadImplementation. We also remove a bunch of
LEGAL_NEW_RESOURCE, because now by the time we're called vnd has already
allocated its tracking resource on that XID.

v2: Update to match v2 of the vnd import, and remove more redundant work
like request length checks.

v3: Add/remove the XID map from the vendor private thunk, not the
backend. (Kyle Brenneman)

v4: Fix deletion of ghost contexts (Kyle Brenneman)

Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-02-14 17:04:44 -05:00
Adam Jackson 5d667df6ea glx: Fix glXQueryContext for GLX_FBCONFIG_ID and GLX_RENDER_TYPE (v2)
Just never filled in, oops. Seems to have gone unnoticed because
normally glXQueryContext simply returns the values filled in by the
client library when the context was created. The only path by which you
normally get to a GLXQueryContext request is glXImportContext, and then
only if the context is already indirect.

However, that's a statement about Mesa's libGL (and anything else that
inherited that bit of the SGI SI more or less intact). Nothing prevents
a mischeivous client from issuing that request of a direct context, and
if they did we'd be in trouble because we never bothered to preserve the
associated fbconfig in the context state, so we'd crash looking up
GLX_VISUAL_ID_EXT. So let's fix that too.

v2: Fixed missing preservation of the config in DRI2 (Eric Anholt)

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2017-12-01 16:13:18 -05:00
Adam Jackson dbda03d5d1 glx: Drop references to <GL/internal/glcore.h>
This header is a truly ancient remnant of the SGI SI code, which used
the same struct for visual/fbconfig state on both sides of the wire.
We're not using this struct ourselves so let's stop depending on the
header.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-11-14 16:18:47 -05:00
Daniel Martin d5379b350f Use ARRAY_SIZE all over the tree
Roundhouse kick replacing the various (sizeof(foo)/sizeof(foo[0])) with
the ARRAY_SIZE macro from dix.h when possible. A semantic patch for
coccinelle has been used first. Additionally, a few macros have been
inlined as they had only one or two users.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2017-10-30 13:45:20 -04:00
Jeremy Huddleston Sequoia dd0b721c97 XQuartz: Hack around an issue that can occur on macOS due to background apps incorrectly stealing focus
Works around <rdar://problem/7150340>.

Tested-by: Martin Otte <martinjotte@gmail.com>
Tested-by: Tom Lane <tgl@sss.pgh.pa.us>
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2017-07-20 01:17:40 -07:00
Eric Anholt 1549e30372 Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far.  The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet.  The unit tests are also not done.

The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools.  meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.

v2: Fix indentation nits, move version declaration to project(), use
    existing meson_options for version-config.h's vendor name/web.

Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-26 15:25:27 -07:00
Michel Dänzer 27a6b9f7c8 os: Handle SIGABRT
Without this, assertion failures can make life hard for users and those
trying to help them.

v2:
* Change commit log wording slightly to "can make life hard", since
  apparently e.g. logind can alleviate that somewhat.
* Set default handler for SIGABRT in
  hw/xfree86/common/xf86Init.c:InstallSignalHandlers() and
  hw/xquartz/quartz.c:QuartzInitOutput() (Eric Anholt)

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
2017-04-26 16:07:19 -04:00
Peter Hutterer d13cb97442 ddx: add new call to purge input devices that weren't added
Special case for the systemd-logind case in xfree86: when we're vt-switched
away and a device is plugged in, we get a paused fd from logind. Since we
can't probe the device or do anything with it, we store that device in the
xfree86 and handle it later when we vt-switch back. The device is not added to
inputInfo.devices until that time.

When the device is removed while still vt-switched away, the the config system
never notifies the DDX. It only runs through inputInfo.devices and our device
was never added to that.

When a device is plugged in, removed, and plugged in again while vt-switched
away, we have two entries in the xfree86-specific list that refer to the same
device node, both pending for addition later. On VT switch back, the first one
(the already removed one) will be added successfully, the second one (the
still plugged-in one) fails. Since the fd is correct, the device works until
it is removed again. The removed devices' config_info (i.e. the syspath)
doesn't match the actual device we addded tough (the input number increases
with each plug), it doesn't get removed, the fd remains open and we lose track
of the fd count. Plugging the device in again leads to a dead device.

Fix this by adding a call to notify the DDX to purge any remainders of devices
with the given config_info, that's the only identifiable bit we have at this
point.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-10-26 15:35:07 +10:00
Jeremy Huddleston Sequoia f72ff1f7ac XQuartz: Silence an expected TSan warning
This code is safe.  If the data race fails, the result is that we take the
lock and recheck.

==================
WARNING: ThreadSanitizer: data race (pid=31401)
  Read of size 1 at 0x00010f5d2500 by thread T11:
    #0 wait_for_mieq_init darwinEvents.c:102 (X11.bin+0x00010003155a)
    #1 -[X11Application(Private) sendX11NSEvent:] X11Application.m:1330 (X11.bin+0x00010001d652)
    #2 __28-[X11Application sendEvent:]_block_invoke X11Application.m:476 (X11.bin+0x00010001887f)
    #3 __tsan::invoke_and_release_block(void*) <null>:144 (libclang_rt.tsan_osx_dynamic.dylib+0x00000005d97b)
    #4 _dispatch_client_callout <null>:33 (libdispatch.dylib+0x0000000020ef)

  Previous write of size 1 at 0x00010f5d2500 by thread T8:
    [failed to restore the stack]

  Location is global 'mieqInitialized' at 0x00010f5d2500 (X11.bin+0x000100599500)

  Thread T11 (tid=4367138, running) created by thread T-1
    [failed to restore the stack]

  Thread T8 (tid=4367130, running) created by main thread at:
    #0 pthread_create <null>:144 (libclang_rt.tsan_osx_dynamic.dylib+0x000000024490)
    #1 create_thread quartzStartup.c:78 (X11.bin+0x000100039d2d)
    #2 QuartzInitServer quartzStartup.c:95 (X11.bin+0x000100039b96)
    #3 X11ApplicationMain X11Application.m:1238 (X11.bin+0x00010001cd54)
    #4 X11ControllerMain X11Controller.m:984 (X11.bin+0x00010002a5b2)
    #5 server_main quartzStartup.c:136 (X11.bin+0x000100039fbb)
    #6 do_start_x11_server bundle-main.c:436 (X11.bin+0x000100002e25)
    #7 _Xstart_x11_server mach_startupServer.c:189 (X11.bin+0x000100004e09)
    #8 mach_startup_server mach_startupServer.c:399 (X11.bin+0x0001000056a4)
    #9 mach_msg_server mach_msg.c:563 (libsystem_kernel.dylib+0x000000012186)
    #10 start <null>:29 (libdyld.dylib+0x000000005254)

SUMMARY: ThreadSanitizer: data race darwinEvents.c:102 in wait_for_mieq_init
==================

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2016-09-22 14:55:03 -07:00
Jeremy Huddleston Sequoia 7d6ebf3f4e XQuartz: Adopt input_lock() and input_unlock()
This allows us to remove darwinEvents_lock() and darwinEvents_unlock()
and remove the serverRunning hack from dix

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2016-09-22 14:55:02 -07:00
Jeremy Huddleston Sequoia 8bc4727f47 XQuartz: pbproxy shouldn't need to wait for server initialization.
Just block on the socket like every other client does.

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2016-09-22 14:55:02 -07:00
Jeremy Huddleston Sequoia 81493d3098 XQuartz: Remove X11ApplicationFatalError
AppKit handles crashes on app launch with their own dialog now, so we shouldn't need to do this ourselves.

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2016-09-22 14:55:02 -07:00
Jeremy Huddleston Sequoia 9153ec8464 XQuartz: Don't respond to SIGALRM on the AppKit thread
==================
WARNING: ThreadSanitizer: data race (pid=69627)
  Write of size 8 at 0x00010dae73f8 by main thread (mutexes: write M262):
    #0 SmartScheduleTimer utils.c:1245 (X11.bin+0x0001004b21f9)
    #1 __tsan::CallUserSignalHandler(__tsan::ThreadState*, bool, bool, bool, int, my_siginfo_t*, void*) <null>:144 (libclang_rt.tsan_osx_dynamic.dylib+0x0000000279f6)
    #2 __CFRunLoopRun <null>:77 (CoreFoundation+0x000000087e17)
    #3 X11ControllerMain X11Controller.m:984 (X11.bin+0x00010002a062)
    #4 server_main quartzStartup.c:127 (X11.bin+0x000100039b6b)
    #5 do_start_x11_server bundle-main.c:436 (X11.bin+0x0001000022c5)
    #6 _Xstart_x11_server mach_startupServer.c:189 (X11.bin+0x0001000042a9)
    #7 mach_startup_server mach_startupServer.c:399 (X11.bin+0x000100004b44)
    #8 mach_msg_server mach_msg.c:563 (libsystem_kernel.dylib+0x000000012186)
    #9 start <null>:29 (libdyld.dylib+0x000000005254)

  Previous read of size 8 at 0x00010dae73f8 by thread T7:
    [failed to restore the stack]

  Location is global 'SmartScheduleTime' at 0x00010dae73f8 (X11.bin+0x0001005b03f8)

  Mutex M262 (0x7d300000bd10) created at:
    #0 pthread_mutex_init <null>:144 (libclang_rt.tsan_osx_dynamic.dylib+0x0000000253c3)
    #1 __CFRunLoopCreate <null>:77 (CoreFoundation+0x000000054e63)
    #2 X11ControllerMain X11Controller.m:984 (X11.bin+0x00010002a062)
    #3 server_main quartzStartup.c:127 (X11.bin+0x000100039b6b)
    #4 do_start_x11_server bundle-main.c:436 (X11.bin+0x0001000022c5)
    #5 _Xstart_x11_server mach_startupServer.c:189 (X11.bin+0x0001000042a9)
    #6 mach_startup_server mach_startupServer.c:399 (X11.bin+0x000100004b44)
    #7 mach_msg_server mach_msg.c:563 (libsystem_kernel.dylib+0x000000012186)
    #8 start <null>:29 (libdyld.dylib+0x000000005254)

  Thread T7 (tid=4051693, running) created by main thread at:
    #0 pthread_create <null>:144 (libclang_rt.tsan_osx_dynamic.dylib+0x000000024490)
    #1 create_thread quartzStartup.c:78 (X11.bin+0x0001000398dd)
    #2 QuartzInitServer quartzStartup.c:95 (X11.bin+0x000100039813)
    #3 X11ApplicationMain X11Application.m:1286 (X11.bin+0x00010001c804)
    #4 X11ControllerMain X11Controller.m:984 (X11.bin+0x00010002a062)
    #5 server_main quartzStartup.c:127 (X11.bin+0x000100039b6b)
    #6 do_start_x11_server bundle-main.c:436 (X11.bin+0x0001000022c5)
    #7 _Xstart_x11_server mach_startupServer.c:189 (X11.bin+0x0001000042a9)
    #8 mach_startup_server mach_startupServer.c:399 (X11.bin+0x000100004b44)
    #9 mach_msg_server mach_msg.c:563 (libsystem_kernel.dylib+0x000000012186)
    #10 start <null>:29 (libdyld.dylib+0x000000005254)

SUMMARY: ThreadSanitizer: data race utils.c:1245 in SmartScheduleTimer
==================
==================
WARNING: ThreadSanitizer: signal handler spoils errno (pid=69627)
    #0 SmartScheduleTimer utils.c:1244 (X11.bin+0x0001004b21a0)
    #1 __CFRunLoopRun <null>:77 (CoreFoundation+0x000000087e17)
    #2 X11ControllerMain X11Controller.m:984 (X11.bin+0x00010002a062)
    #3 server_main quartzStartup.c:127 (X11.bin+0x000100039b6b)
    #4 do_start_x11_server bundle-main.c:436 (X11.bin+0x0001000022c5)
    #5 _Xstart_x11_server mach_startupServer.c:189 (X11.bin+0x0001000042a9)
    #6 mach_startup_server mach_startupServer.c:399 (X11.bin+0x000100004b44)
    #7 mach_msg_server mach_msg.c:563 (libsystem_kernel.dylib+0x000000012186)
    #8 start <null>:29 (libdyld.dylib+0x000000005254)

SUMMARY: ThreadSanitizer: signal handler spoils errno utils.c:1244 in SmartScheduleTimer
==================

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2016-09-22 14:55:01 -07:00
Jeremy Huddleston Sequoia 7def2fea30 Xquartz: Update for removal of AddEnabledDevice and RemoveEnabledDevice
Regressed-in: be5a513fee
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2016-09-13 10:00:51 -07:00
Jeremy Huddleston Sequoia 4f4ecd0f41 XQuartz: Cleanup CPPFLAGS that are no longer necessary on darwin
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2016-09-13 10:00:51 -07:00
Jeremy Huddleston Sequoia 33d595255d XQuartz: Fix the issue where the h key could be come "stuck" after hiding XQuartz with cmd-h
The issue was that we set a flag to ignore the k key's up event when sent
the cmd-h down event, but because the cmd-h keycode hides XQuartz, we
became !_x_active by the time the event is delivered which caused us to
go down a differnet codepath rather than getting a chance to ignore it.
We then incorrectly ignored the next h up key.

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

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2016-09-13 10:00:51 -07:00
Adam Jackson 392da389d7 glx: Fix computation of GLX_X_RENDERABLE fbconfig attribute
>From the GLX spec:

    "GLX_X_RENDERABLE is a boolean indicating whether X can be used to
    render into a drawable created with the GLXFBConfig. This attribute
    is True if the GLXFBConfig supports GLX windows and/or pixmaps."

Every backend was setting this to true unconditionally, and then the
core ignored that value and sent true unconditionally on its own. This
is broken for ARB_fbconfig_float and EXT_fbconfig_packed_float, which
only apply to pbuffers, which are not renderable from non-GLX APIs.

Instead compute GLX_X_RENDERABLE from the supported drawable types. The
dri backends were getting _that_ wrong too, so fix that as well.

This is not a functional change, as there are no mesa drivers that claim
to support __DRI_ATTRIB_{UNSIGNED_,}FLOAT_BIT yet.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2016-09-06 10:29:14 -04:00
Keith Packard fb0802113b Remove readmask from screen block/wakeup handler
With no users of the interface needing the readmask anymore, we can
remove it from the argument passed to these functions.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2016-07-18 15:27:51 -04:00
Jeremy Huddleston Sequoia 059d5ef304 XQuartz: Update copyright years
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2016-05-04 00:08:34 -07:00
Jeremy Huddleston Sequoia d6ba4f2c52 XQuartz: Add --with-bundle-version and --with-bundle-version-string configure options
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2016-05-04 00:08:34 -07:00
Jeremy Huddleston Sequoia c1614928c1 XQuartz: Add --with-sparkle-feed-url configure option
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2016-05-03 23:29:48 -07:00
Jeremy Huddleston Sequoia 299b01eabf XQuartz: Update release feed URL to use new https URL
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2016-05-03 23:29:48 -07:00
Adam Jackson 2e8781ead3 glx: Compute the GLX extension string from __glXScreenInit
Now that the enable bits are in the screen base class we can compute
this in one place, rather than making every backend do it.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2016-03-30 11:13:57 -04:00
Adam Jackson e21de4bf3c glx: Move glx_enable_bits up to the GLX screen base class
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2016-03-30 11:13:57 -04:00
Adam Jackson 23cce73221 xquartz/glx: Remove unused fields from the glx screen subclass
dmt:~/git/xserver% git grep -E '\<(index|num_vis)\>' hw/xquartz/GL
hw/xquartz/GL/indirect.c:    int index;
hw/xquartz/GL/indirect.c:    int num_vis;

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2016-03-30 11:13:57 -04:00
Adam Jackson 36bcbf76dc glx: Enable GLX 1.4 unconditionally
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2016-03-30 11:13:57 -04:00
Adam Jackson 77bdaa1313 glx: Use __glXInitExtensionEnableBits in all backends (v2)
On xquartz this enables SGI_make_current_read, which is a mostly
harmless lie as CGL doesn't implement it, as well as SGIX_pbuffer, which
is fine because no pbuffer-enabled configs are created.

On xwin this enables SGIX_pbuffer and ARB_multisample in all cases.
Again this is harmless if the backend doesn't support the features,
since no fbconfigs will be created to expose them.

It also adds SGIX_visual_select_group to both xquartz and xwin.
Amusingly, both were filling in the appropriate field in the fbconfig
already.

v2: Warn about missing WGL extensions (Emil)

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2016-03-30 11:13:57 -04:00
Adam Jackson b2ef7df476 xquartz/glx: Error out for MakeContextCurrent(draw != read)
CGL doesn't have a way to express this directly, unlike EGL WGL and GLX.
It might be implementable, but it's never actually worked, and it's a
fairly niche feature so we're better off throwing an error if someone
attempts it.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2016-03-30 10:47:56 -04:00
Adam Jackson 3a21da59e5 glx: Remove default server glx extension string
This existed only to be strdup'd and then immediately freed.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2016-03-30 09:37:41 -04:00
Daniel Stone e957a2e5dd dix: Add hybrid full-size/empty-clip mode to SetRootClip
216bdbc735 removed the SetRootClip call in the XWayland output-hotplug
handler when running rootless (e.g. as a part of Weston/Mutter), since
the root window has no storage, so generating exposures will result in
writes to invalid memory.

Unfortunately, preventing the segfault also breaks sprite confinement.
SetRootClip updates winSize and borderSize for the root window, which
when combined with RRScreenSizeChanged calling ScreenRestructured,
generates a new sprite-confinment area to update it to the whole screen.

Removing this call results in the window geometry being reported
correctly, but winSize/borderSize never changing from their values at
startup, i.e. out of sync with the root window geometry / screen
information in the connection info / XRandR.

This patch introduces a hybrid mode, where we update winSize and
borderSize for the root window, enabling sprite confinement to work
correctly, but keep the clip emptied so exposures are never generated.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Tested-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2016-02-22 13:26:31 -05:00
Jeremy Huddleston Sequoia 27ad21254f XQuartz: Cleanup formatting of DarwinEQInit that was butchered by automation a few years ago
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2015-10-19 09:06:22 -07:00
Jeremy Huddleston Sequoia 3db7e332d3 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>
2015-10-19 09:05:54 -07:00
Ken Thomases 4513f924a7 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>
2015-10-13 14:19:05 -07:00
Jeremy Huddleston Sequoia 6e6827aac3 XQuartz: Remove InfoPlist.strings
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2015-10-13 14:19:05 -07:00
Jeremy Huddleston Sequoia df80e2649a XQuartz: Relax App Transport Security for communicating with the update server
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2015-10-12 02:06:41 -07:00
Adam Jackson cbd3cfbad3 dix: Restore PaintWindow screen hook
Removes the last cpp conditional on ROOTLESS from dix code.

Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2015-07-08 16:41:28 -04:00
Keith Packard 8a8d51358c Merge remote-tracking branch 'airlied/for-keithp' 2015-06-29 21:04:53 -07:00
Dave Airlie 8218dadd30 cursor: drop ARGB_CURSOR
I doubt anyone builds with this turned off or has done for a long
time.

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

Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-06-30 12:17:51 +10:00
Jeremy Huddleston Sequoia 9003a3e5c5 XQuartz: Silence -Wformat-security for NSRunAlertPanel
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2015-06-09 23:42:03 -07:00
Jeremy Huddleston Sequoia 3a6fa11575 XQuartz: Silence -Wunused-function
quartzKeyboard.c:741:1: warning: unused function 'macroman2ucs' [-Wunused-function,Unused Entity Issue]
macroman2ucs(unsigned char c)
^
1 warning generated.

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

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

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2015-06-09 23:42:02 -07:00
Jeremy Huddleston Sequoia 7761106639 XQuartz: GLX: Use __glXEnableExtension to build extensions list
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2015-06-09 23:05:22 -07:00
Jon Turney d3b9c47c84 Fix XQuartz build
Fix XQuartz build since commit e036cbfc "Make PseudoramiXExtensionInit()
prototype more generally available"

Add #include "nonsdk_extinit.h" to xprScreen.c

Add #include "nonsdk_extinit.h" to miinitext.c under INXQUARTZ to provide
declarations used under INXQUARTZ

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Tested-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2015-03-31 09:02:28 -07:00
Jon TURNEY e036cbfccb Make PseudoramiXExtensionInit() prototype more generally available
Make PseudoramiXExtensionInit() prototype available to hw/xwin

Rather than avoiding a reference to it being pulled in to Xorg by sdksyms by
hiding this prototype behind the INXQUARTZ define, which is only defined when
building Xquartz, introduce nonsdk_extinit.h and move it there.

(The only remaining use of INXQUARTZ is in mi/miiniext.c, in order
to do PseudoramiXExtensionInit() at the point apparently needed by Xquartz)

Also remove duplicate declaration of noPseudoramiXExtension from pseudoramiX.h

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2015-03-16 16:56:17 +00:00
Peter Hutterer f485a1af64 Drop valuator mask argument from GetKeyboardEvents
Nothing was using it and if anyone had they would've gotten a warning and
noticed that it doesn't actually work. Drop this, it has been unused for years.

Input ABI 22

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2015-03-13 12:31:21 +10:00
Peter Hutterer 732fd7e571 Drop trailing whitespaces
sed -i "s/[ ]\+$//g" **/*.(c|h)

happy reviewing...
git diff -w is an empty diff.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-11-12 10:25:00 +10:00
Adam Jackson 7e8ac6dcd2 xquartz: Remove useless DRIWindowExposures
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-10-08 16:01:35 +02:00
Jeremy Huddleston Sequoia ab32ee3589 XQuartz: Better support turning off "Displays have separate Spaces" on OS X Mavericks
http://xquartz.macosforge.org/trac/ticket/1876

Follow-up to: 1c10b37380

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2014-08-11 13:18:51 -07:00
Adam Jackson 5486c834fa xquartz: Remove unused DRI{,Post}ValidateTree
Cargo-culted from DRI1, not actually used for anything.

Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-07-29 09:58:30 -04:00
Jeremy Huddleston Sequoia 1c10b37380 XQuartz: Update logic to account for title bar on every display in Mavericks
<rdar://problem/14205847>
http://xquartz.macosforge.org/trac/ticket/832

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2014-05-31 17:48:29 -07:00
Jeremy Huddleston Sequoia ad0ff649c6 XQuartz: Dead code removal (ENABLE_DEBUG_LOG)
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2014-05-31 17:48:19 -07:00
Jeremy Huddleston Sequoia e281288d5a XQuartz: Bump to 2.7.7
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2014-05-31 17:47:40 -07:00
Jeremy Huddleston Sequoia ec6007e6f7 XQuartz: Ensure we wait for the server thread to terminate
AKA: XQuartz 2.7.5 doesn't delete its /tmp/.X$d-lock

http://xquartz.macosforge.org/trac/ticket/823

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2014-04-06 05:32:03 -07:00
Jon TURNEY 432fc37e2c Build fbcmap_mi.c once, rather than once for each DDX
Build fbcmap_mi.c once, rather than once for each DDX, and make it part of libfb
or libwfb convenience library.

Since 84e8de1271 we don't have fbcmap.c

This is a sort of revert of 17d85387d1

v2: Remove libkdrivestubs.la from configure.ac

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
2014-03-27 14:34:06 +00:00
Emil Velikov e46820fb89 miinitext: introduce LoadExtensionList() to replace over LoadExtension()
Looping around LoadExtension() meant that ExtensionModuleList was reallocated
on every extension. Using LoadExtensionList() we pass an array thus the
function can do the reallocation in one go, and then loop and setup the
ExtensionModuleList.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Keith Packard <keithp@keithp.com>

v2: Update ephyr [Keith Packard]
v3: Eliminate const warnings in LoadExtensionList [Keith Packard]

Signed-off-by: Keith Packard <keithp@keithp.com>
2014-03-25 16:00:17 -07:00
Jeremy Huddleston Sequoia f34dc7fa96 XQuartz: pointer -> void *
Fix build regression from 60014a4a98

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2014-02-14 00:33:38 -08:00
Jeremy Huddleston Sequoia 77df653ae3 XQuartz: Avoid passing uninitialized pointers to X11ApplicationSetWindowMenu in AppleWMSetWindowMenu
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2014-01-12 23:12:49 -08:00
Jeremy Huddleston Sequoia 3bc608a361 XQuartz: Check for allocated memory before using it in AppleWMSetWindowMenu
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2014-01-12 23:12:48 -08:00
Jeremy Huddleston Sequoia 64327226dd XQuartz: Silence a clang static analysis warning about a memory leak
It seems the alanyzer can't comprehend dixSetPrivate().

quartz.c:119:12: warning: Potential leak of memory pointed to by 'displayInfo'
    return quartzProcs->AddScreen(index, pScreen);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2014-01-12 23:12:48 -08:00
Jeremy Huddleston Sequoia b2f6b3497c XQuartz: Silence a clang static analysis warning about a possible memory leak on exit
stub.c:356:9: warning: Potential leak of memory pointed to by 'newargv'
        asl_log(aslc, NULL, ASL_LEVEL_ERR,
        ^~~~~~~
stub.c:356:9: warning: Potential leak of memory pointed to by 'newenvp'
        asl_log(aslc, NULL, ASL_LEVEL_ERR,
        ^~~~~~~
2 warnings generated.

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2014-01-12 23:12:48 -08:00
Jeremy Huddleston Sequoia a03f096a85 XQuartz: Validate length in appledri before swapping
Avoids potential memory corruption from bad requests

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2014-01-12 23:12:48 -08:00
Jeremy Huddleston Sequoia b3572c0d1a XQuartz: Validate screen in AppleDRIQueryDirectRenderingCapable requests
Return an error to the caller rather than crashing the server on
invalid screens.

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2014-01-12 23:12:48 -08:00
Jeremy Huddleston Sequoia 959e8f23af XQuartz: Simplify hook_run to quiet static analyzer
x-hook.c:96:9: warning: Called function pointer is an uninitalized pointer value
        (*fun[i])(arg, data[i]);
        ^~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2014-01-12 23:12:48 -08:00
Jeremy Huddleston Sequoia f79af19417 XQuartz: Mark applicationWillTerminate: noreturn
X11Controller.m:938:1: warning: method 'applicationWillTerminate:' could be declared with attribute 'noreturn'
      [-Wmissing-noreturn,Semantic Issue]
{
^

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2014-01-12 23:12:48 -08:00
Jeremy Huddleston Sequoia ea80279e29 XQuartz: Fix get_proc_address signature
indirect.c:675:28: warning: incompatible pointer types passing 'glx_gpa_proc (*)(const char *)' to parameter of type
      'glx_gpa_proc' (aka 'glx_func_ptr (*)(const char *)') [-Wincompatible-pointer-types,Semantic Issue]
    __glXsetGetProcAddress(&get_proc_address);
                           ^~~~~~~~~~~~~~~~~
../../../glx/glxserver.h:122:42: note: passing argument to parameter 'get_proc_address' here [Semantic Issue]
void __glXsetGetProcAddress(glx_gpa_proc get_proc_address);
                                         ^

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2014-01-12 23:12:48 -08:00
Jeremy Huddleston Sequoia 2e3ebec952 XQuartz: Fix darwinfb.h header guard
./darwinfb.h:28:9: warning: '_DARWIN_FB_H' is used as a header guard here, followed by #define of a different macro
      [-Wheader-guard,Lexical or Preprocessor Issue]
        ^~~~~~~~~~~~
./darwinfb.h:29:9: note: '_DARWIN_DB_H' is defined here; did you mean '_DARWIN_FB_H'? [Lexical or Preprocessor Issue]
        ^~~~~~~~~~~~
        _DARWIN_FB_H

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2014-01-12 23:12:48 -08:00
Jeremy Huddleston Sequoia 9da6c0918f XQuartz: Silence some static analyzer warnings by annotating referencing counts
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2014-01-12 23:12:47 -08:00
Keith Packard 60014a4a98 Replace 'pointer' type with 'void *'
This lets us stop using the 'pointer' typedef in Xdefs.h as 'pointer'
is used throughout the X server for other things, and having duplicate
names generates compiler warnings.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-01-12 10:24:11 -08:00
Jeremy Huddleston Sequoia d7c9235ee2 XQuartz: Use asl_log_descriptor to log stdout/stderr of child processes
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2013-12-12 01:30:04 -08:00
Adam Jackson e61e19959d xquartz/glx: Convert to non-glapi dispatch
CGL doesn't have anything like glXGetProcAddress, and the old code just
called down to dlsym in any case.  It's a little mind-warping since
dlopening a framework actually loads multiple dylibs, but that's just
how OSX rolls.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2013-12-10 08:04:30 -08:00
Jeremy Huddleston Sequoia f70a8bf371 XQuartz: Don't sleep forever on exit if usleep() returns an error
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2013-11-10 11:40:27 -08:00
Jeremy Huddleston Sequoia ebcc1c214c XQuartz: Update Info.plist copyright years
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2013-11-10 11:26:49 -08:00
Jeremy Huddleston Sequoia bb745f2b45 XQuartz: Bump bundle version to 2.7.6
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2013-10-31 08:50:57 -07:00
Jeremy Huddleston Sequoia 8aae28e3cb XQuartz: Dont't set screen on __GLXConfig
Fixes regression introduced by c3c976f54c

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2013-10-06 09:20:45 -07:00
Keith Packard 5d2ec6933f Merge remote-tracking branch 'ajax/xserver-next' 2013-10-04 13:50:04 -07:00
Jeremy Huddleston Sequoia 8010d3a48b XQuartz: pbproxy: Fix build with -DDEBUG
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2013-09-16 07:06:57 -07:00
Jeremy Huddleston Sequoia 39c548da0c XQuartz: Fix build with moved pseudoramiX
Regression from: e716baedc4

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2013-09-16 07:06:48 -07:00
Adam Jackson 1d1484e9bd glx: Remove pixmapMode from __GLXconfig
This has never been filled in with anything meaningful afaict, and you
can't get to it from the client in any event.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-09-11 14:37:32 -04:00
Adam Jackson 4dca026880 mipointer: Remove EnqueueEvent from miPointerScreenFuncRec
No DDX overrode this, and we never actually called through that slot
anyway.

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-09-10 13:28:23 -04:00
Adam Jackson ad076dc6e8 mipointer: Flatten calls to mieqSwitchScreen
No DDX was overriding this.

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-09-10 13:28:23 -04:00
Jon TURNEY e716baedc4 Move pseudoramiX code where it can be shared between Xwin and Xquartz
Move pseudoramiX code to a separate top-level directory.  Link Xwin and Xquartz
with libPseudoramiX

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

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

v2: fix distcheck

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Marc Haesen <marha@users.sourceforge.net>
2013-08-30 12:52:30 +01:00
Tomasz Lis cf89aa5374 Full support of sRGB capable fbconfigs.
Changes to correctly initialize the sRGB capability attribute and
transfer it between XServer and the client. Modifications include
extension string, transferring visual config attribs and fbconfig
attribs. Also, attribute is initialized in the modules which do not
really use it (xquartz and xwin).
This version advertises both ARB and EXT strings, and initializes
the capability to default value of FALSE. It has corrected required
GLX version and does not influence swrast. The sRGB capable attribute
is attached only to those configs which do have this capability.
Both ARB and EXT versions share the same GLX extension enabling bit.

Signed-off-by: Tomasz Lis <tomasz.lis@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-03-18 10:02:00 -07:00
Jeremy Huddleston Sequoia 67eaf4b46f XQuartz: Ensure <dix-config.h> is included in capabilities.c
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-02-14 09:20:46 -08:00
Jeremy Huddleston Sequoia ba4bb3bc1b XQuartz: Don't add the 15bit visual any more
Mountain Lion only supports 32bit backing stores, so don't use 15bit visuals until libXplugin adapts

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2012-12-18 01:37:27 -08:00
Jeremy Huddleston Sequoia c298f9c42e XQuartz: Revert some unfortunate auto-indenting mishaps with our super-nested for-loops
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2012-12-18 01:30:34 -08:00
Daniel Stone 3556d43010 Constify extensions in LoadExtension users
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-11-21 11:13:55 +11:00
Jeremy Huddleston Sequoia 14c9e245ba XQuartz: Opt-in to NSSupportsAutomaticGraphicsSwitching
http://xquartz.macosforge.org/trac/ticket/668

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2012-11-17 11:52:10 -05:00