Commit Graph

884 Commits

Author SHA1 Message Date
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
Keith Packard
4dd5989d15 Merge remote-tracking branch 'ajax/server-1.14-abi-churn' 2012-09-24 11:43:01 -07:00
Keith Packard
7722bcbab2 Merge remote-tracking branch 'jeremyhu/master' 2012-09-23 16:04:13 -07:00
Daniel Martin
76d8739b1f dix: Remove #includes of mibstore.h
Remove more backing store leftovers.

Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-09-23 10:31:27 -07:00
Jeremy Huddleston Sequoia
f54987de97 XQuartz: Add some verbose logging to debug xp_lock_window being unbalanced
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2012-09-22 14:09:58 -07:00
Jeremy Huddleston Sequoia
25d26875bc XQuartz: Avoid a possible deadlock with DRI on OS X 10.7.5 and OS X 10.8.2
<rdar://problem/12338921>
http://bugs.winehq.org/show_bug.cgi?id=31751

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2012-09-22 14:09:58 -07:00
Adam Jackson
ff8e3ad807 dix: Pull client-is-local flag up to the ClientRec
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2012-09-20 14:36:39 -04:00
Jeremy Huddleston Sequoia
486038fe16 XQuartz: Bump Info.plist version to 2.7.4
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2012-08-27 22:35:51 -07:00
Jeremy Huddleston Sequoia
ac616d8ed5 XQuartz: Use asl_log_descriptor for children as well
This change is #if'd out due to a bug in asl_log_descriptor, but
it is left here as reference to be enabled in the future.

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2012-08-16 19:44:00 -07:00
Jeremy Huddleston Sequoia
ad123071e5 XQuartz: Use asl_log_descriptor on Mountain Lion
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2012-08-16 19:44:00 -07:00
Jeremy Huddleston Sequoia
7c3d2e4828 XQuartz: console_redirect: Properly zero-out the tail of the array on realloc()
We forgot to multiply by sizeof(), so it wasn't fully zeroed out.

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2012-08-16 19:44:00 -07:00
Jeremy Huddleston Sequoia
a32e01802f XQuartz: console_redirect: Set the correct location for reading into the buffer
Prior to this change, it was possible that a large message would have some
of its data prepended to subsequent messages due to our not incorrectly
setting the location to write into the buffer.

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2012-08-16 18:32:50 -07:00
Jeremy Huddleston
99b94af1ff XQuartz: Fix build regression for GlxExtensionInit
quartz.c:153:6: error: use of undeclared identifier 'GlxExtensionInit'; did you mean 'GEExtensionInit'? [Semantic Issue]
    {GlxExtensionInit, "GLX", &noGlxExtension},

Regression-from: aad428b8e2
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-08-15 10:28:16 -07:00
Jeremy Huddleston Sequoia
884f51e977 XQuartz: Fix xp_window_bring_all_to_front linking on OS versions with older libXplugin
Found-by: Tinderbox
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2012-08-03 10:02:57 -07:00
Jeremy Huddleston Sequoia
b4c2358e0a pbproxy: Fix a warning about a bad method prototype
x-selection.m:1502:1: warning: method has no return type specified; defaults to 'id'
      [-Wmissing-method-return-type,Semantic Issue]
- init
^
  (id)
1 warning generated.

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2012-08-01 18:45:43 -07:00
Jon TURNEY
f193907f1b Fix pseudoramiX.c compilation without darwin.h
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2012-08-01 18:29:55 -07:00
Jon TURNEY
067931ccce hw/xquartz: Various fixes for pseudoramiX.c
Various fixes, applied to panoramiX.c in commit 2b266eda, also need applying to pseudoramiX.c:
 Fix panoramiX request and reply swapping
 Set window and screen values in panoramix replies
 Prevent buffer overrun in ProcPanoramiXGetScreenSize

These fixes seem to be necessary in order to compile pseudoramiX.c with gcc

pseudoramiX.c: In function 'ProcPseudoramiXGetState':
pseudoramiX.c:221:56: error: call to 'wrong_size' declared with attribute error: wrong sized variable passed to swap
pseudoramiX.c: In function 'ProcPseudoramiXGetScreenCount':
pseudoramiX.c:250:62: error: call to 'wrong_size' declared with attribute error: wrong sized variable passed to swap
pseudoramiX.c: In function 'ProcPseudoramiXGetScreenSize':
pseudoramiX.c:283:56: error: call to 'wrong_size' declared with attribute error: wrong sized variable passed to swap
pseudoramiX.c:284:57: error: call to 'wrong_size' declared with attribute error: wrong sized variable passed to swap

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2012-08-01 18:29:38 -07:00
Jeremy Huddleston
fd228d3184 XQuartz: Call xp_window_bring_all_to_front if available in libXplugin
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-07-25 12:19:01 -07:00
Jeremy Huddleston
3b7f313b3d XQuartz: Fix runtime regressions introduced by extension loading changes
* GLX is now loaded
 * PseudoramiX loading is back in miinitext.  It needs to be loaded
   before RandR.

Regression-from: 27a624bee6
Regression-from: 5f5bbbe543

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-07-24 00:32:30 -07:00