Merge remote-tracking branch 'jeremyhu/master'
This commit is contained in:
commit
20b4d90f32
|
@ -135,12 +135,20 @@ struct __GLXAquaDrawable {
|
||||||
static __GLXcontext *
|
static __GLXcontext *
|
||||||
__glXAquaScreenCreateContext(__GLXscreen *screen,
|
__glXAquaScreenCreateContext(__GLXscreen *screen,
|
||||||
__GLXconfig *conf,
|
__GLXconfig *conf,
|
||||||
__GLXcontext *baseShareContext)
|
__GLXcontext *baseShareContext,
|
||||||
|
unsigned num_attribs,
|
||||||
|
const uint32_t *attribs,
|
||||||
|
int *error)
|
||||||
{
|
{
|
||||||
__GLXAquaContext *context;
|
__GLXAquaContext *context;
|
||||||
__GLXAquaContext *shareContext = (__GLXAquaContext *)baseShareContext;
|
__GLXAquaContext *shareContext = (__GLXAquaContext *)baseShareContext;
|
||||||
CGLError gl_err;
|
CGLError gl_err;
|
||||||
|
|
||||||
|
/* Unused (for now?) */
|
||||||
|
(void)num_attribs;
|
||||||
|
(void)attribs;
|
||||||
|
(void)error;
|
||||||
|
|
||||||
GLAQUA_DEBUG_MSG("glXAquaScreenCreateContext\n");
|
GLAQUA_DEBUG_MSG("glXAquaScreenCreateContext\n");
|
||||||
|
|
||||||
context = calloc(1, sizeof(__GLXAquaContext));
|
context = calloc(1, sizeof(__GLXAquaContext));
|
||||||
|
|
|
@ -144,15 +144,21 @@ QuartzSetupScreen(int index,
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const ExtensionModule quartzExtensions[] = {
|
static ExtensionModule quartzExtensions[] = {
|
||||||
{ PseudoramiXExtensionInit, "PseudoramiX", &noPseudoramiXExtension, NULL },
|
/* PseudoramiX needs to be done before RandR, so
|
||||||
|
* it is in miinitext.c until it can be reordered.
|
||||||
|
* { PseudoramiXExtensionInit, "PseudoramiX", &noPseudoramiXExtension },
|
||||||
|
*/
|
||||||
|
#ifdef GLXEXT
|
||||||
|
{GlxExtensionInit, "GLX", &noGlxExtension},
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* QuartzExtensionInit
|
* QuartzExtensionInit
|
||||||
* Initialises XQuartz-specific extensions.
|
* Initialises XQuartz-specific extensions.
|
||||||
*/
|
*/
|
||||||
void QuartzExtensionInit(void)
|
static void QuartzExtensionInit(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
|
|
@ -52,9 +52,20 @@
|
||||||
#include <sys/uio.h>
|
#include <sys/uio.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_LIBDISPATCH
|
||||||
|
#include <dispatch/dispatch.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "rootlessWindow.h"
|
#include "rootlessWindow.h"
|
||||||
#include "xprEvent.h"
|
#include "xprEvent.h"
|
||||||
|
|
||||||
|
/* This is important enough to declare here if building against an old
|
||||||
|
* libXplugin, so we pick it up whenever libXplugin starts to support it.
|
||||||
|
*/
|
||||||
|
#if !defined(XPLUGIN_VERSION) || XPLUGIN_VERSION < 6
|
||||||
|
extern xp_error xp_window_bring_all_to_front(void) __attribute__((weak_import));
|
||||||
|
#endif
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
QuartzModeEventHandler(int screenNum, XQuartzEvent *e, DeviceIntPtr dev)
|
QuartzModeEventHandler(int screenNum, XQuartzEvent *e, DeviceIntPtr dev)
|
||||||
{
|
{
|
||||||
|
@ -72,7 +83,28 @@ QuartzModeEventHandler(int screenNum, XQuartzEvent *e, DeviceIntPtr dev)
|
||||||
|
|
||||||
case kXquartzBringAllToFront:
|
case kXquartzBringAllToFront:
|
||||||
DEBUG_LOG("kXquartzBringAllToFront\n");
|
DEBUG_LOG("kXquartzBringAllToFront\n");
|
||||||
|
/* There's no need to do xp_window_bring_all_to_front on Leopard,
|
||||||
|
* and we don't care about the result, so just do it async.
|
||||||
|
*/
|
||||||
|
#if defined(HAVE_LIBDISPATCH)
|
||||||
|
#if (defined(XPLUGIN_VERSION_MIN_REQUIRED) && XPLUGIN_VERSION_MIN_REQUIRED >= 6) || \
|
||||||
|
(!defined(XPLUGIN_VERSION_MIN_REQUIRED) && defined(XPLUGIN_VERSION) && XPLUGIN_VERSION >= 6)
|
||||||
|
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
||||||
|
xp_window_bring_all_to_front();
|
||||||
|
});
|
||||||
|
#else
|
||||||
|
if (&xp_window_bring_all_to_front) {
|
||||||
|
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
||||||
|
xp_window_bring_all_to_front();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
RootlessOrderAllWindows(e->data[0]);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
RootlessOrderAllWindows(e->data[0]);
|
RootlessOrderAllWindows(e->data[0]);
|
||||||
|
#endif
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -254,6 +254,12 @@ static ExtensionModule staticExtensions[] = {
|
||||||
#ifdef PANORAMIX
|
#ifdef PANORAMIX
|
||||||
{PanoramiXExtensionInit, PANORAMIX_PROTOCOL_NAME, &noPanoramiXExtension},
|
{PanoramiXExtensionInit, PANORAMIX_PROTOCOL_NAME, &noPanoramiXExtension},
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef INXQUARTZ
|
||||||
|
/* PseudoramiXExtensionInit must be done before RRExtensionInit, or
|
||||||
|
* XQuartz will render windows offscreen.
|
||||||
|
*/
|
||||||
|
{PseudoramiXExtensionInit, "PseudoramiX", &noPseudoramiXExtension},
|
||||||
|
#endif
|
||||||
#ifdef XFIXES
|
#ifdef XFIXES
|
||||||
/* must be before Render to layer DisplayCursor correctly */
|
/* must be before Render to layer DisplayCursor correctly */
|
||||||
{XFixesExtensionInit, "XFIXES", &noXFixesExtension},
|
{XFixesExtensionInit, "XFIXES", &noXFixesExtension},
|
||||||
|
|
Loading…
Reference in New Issue