diff options
author | marha <marha@users.sourceforge.net> | 2010-04-02 12:30:48 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2010-04-02 12:30:48 +0000 |
commit | 1d59691fe77c20ecb010ea8589a940c4ea6ac356 (patch) | |
tree | d1ee8df3981303c35e46905c9df26203bb232973 /xorg-server/hw/xquartz | |
parent | 0be07f8b067afad77df8cac086b43f6d213fbe20 (diff) | |
download | vcxsrv-1d59691fe77c20ecb010ea8589a940c4ea6ac356.tar.gz vcxsrv-1d59691fe77c20ecb010ea8589a940c4ea6ac356.tar.bz2 vcxsrv-1d59691fe77c20ecb010ea8589a940c4ea6ac356.zip |
Updated to following packages:
pixman-0.18.0
xorg-server-1.8.0
Diffstat (limited to 'xorg-server/hw/xquartz')
21 files changed, 142 insertions, 140 deletions
diff --git a/xorg-server/hw/xquartz/GL/Makefile.in b/xorg-server/hw/xquartz/GL/Makefile.in index df3c91eae..3e5ae6843 100644 --- a/xorg-server/hw/xquartz/GL/Makefile.in +++ b/xorg-server/hw/xquartz/GL/Makefile.in @@ -101,6 +101,7 @@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ +ARM_BACKTRACE_CFLAGS = @ARM_BACKTRACE_CFLAGS@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -288,6 +289,7 @@ XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ +XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ diff --git a/xorg-server/hw/xquartz/GL/capabilities.c b/xorg-server/hw/xquartz/GL/capabilities.c index 2c5ec658c..fc7dd57dd 100644 --- a/xorg-server/hw/xquartz/GL/capabilities.c +++ b/xorg-server/hw/xquartz/GL/capabilities.c @@ -525,8 +525,7 @@ bool getGlCapabilities(struct glCapabilities *cap) { conf = malloc(sizeof(*conf)); if(NULL == conf) { - perror("malloc"); - OsAbort(); + FatalError("Unable to allocate memory for OpenGL capabilities\n"); } /* Copy the struct. */ diff --git a/xorg-server/hw/xquartz/GL/indirect.c b/xorg-server/hw/xquartz/GL/indirect.c index c092c1d17..f2af3ffb6 100644 --- a/xorg-server/hw/xquartz/GL/indirect.c +++ b/xorg-server/hw/xquartz/GL/indirect.c @@ -120,7 +120,7 @@ /* Tiger PPC doesn't have the associated symbols, but glext.h says it does. Liars! * http://trac.macports.org/ticket/20638 */ -#if defined(__ppc__) && MAC_OS_X_VERSION_MIN_REQUIRED == 1040 +#if defined(__ppc__) && MAC_OS_X_VERSION_MIN_REQUIRED < 1050 #undef GL_EXT_gpu_program_parameters #define GL_EXT_gpu_program_parameters 0 #endif diff --git a/xorg-server/hw/xquartz/Makefile.in b/xorg-server/hw/xquartz/Makefile.in index f0de38d58..2856a4153 100644 --- a/xorg-server/hw/xquartz/Makefile.in +++ b/xorg-server/hw/xquartz/Makefile.in @@ -154,6 +154,7 @@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ +ARM_BACKTRACE_CFLAGS = @ARM_BACKTRACE_CFLAGS@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -341,6 +342,7 @@ XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ +XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ diff --git a/xorg-server/hw/xquartz/X11Application.m b/xorg-server/hw/xquartz/X11Application.m index 3faa1cb84..54066404e 100644 --- a/xorg-server/hw/xquartz/X11Application.m +++ b/xorg-server/hw/xquartz/X11Application.m @@ -52,7 +52,7 @@ #include <Xplugin.h> // pbproxy/pbproxy.h -extern BOOL xpbproxy_init (void); +extern int xpbproxy_run (void); #define DEFAULTS_FILE X11LIBDIR"/X11/xserver/Xquartz.plist" @@ -908,6 +908,26 @@ environment the next time you start X11?", @"Startup xinitrc dialog"); [X11App prefs_synchronize]; } +static inline pthread_t create_thread(void *func, void *arg) { + pthread_attr_t attr; + pthread_t tid; + + pthread_attr_init(&attr); + pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM); + pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); + pthread_create(&tid, &attr, func, arg); + pthread_attr_destroy(&attr); + + return tid; +} + +static void *xpbproxy_x_thread(void *args) { + xpbproxy_run(); + + fprintf(stderr, "xpbproxy thread is terminating unexpectedly.\n"); + return NULL; +} + void X11ApplicationMain (int argc, char **argv, char **envp) { NSAutoreleasePool *pool; @@ -962,8 +982,7 @@ void X11ApplicationMain (int argc, char **argv, char **envp) { */ check_xinitrc(); - if(!xpbproxy_init()) - fprintf(stderr, "Error initializing xpbproxy\n"); + create_thread(xpbproxy_x_thread, NULL); #if XQUARTZ_SPARKLE [[X11App controller] setup_sparkle]; diff --git a/xorg-server/hw/xquartz/bundle/Info.plist.cpp b/xorg-server/hw/xquartz/bundle/Info.plist.cpp index e89d985f4..91c8c0393 100644 --- a/xorg-server/hw/xquartz/bundle/Info.plist.cpp +++ b/xorg-server/hw/xquartz/bundle/Info.plist.cpp @@ -19,9 +19,9 @@ <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleShortVersionString</key> - <string>2.5.0</string> + <string>2.5.1</string> <key>CFBundleVersion</key> - <string>2.5.0</string> + <string>2.5.1</string> <key>CFBundleSignature</key> <string>x11a</string> <key>CSResourcesFileMapped</key> diff --git a/xorg-server/hw/xquartz/bundle/Makefile.in b/xorg-server/hw/xquartz/bundle/Makefile.in index b093e7242..bb4390e2c 100644 --- a/xorg-server/hw/xquartz/bundle/Makefile.in +++ b/xorg-server/hw/xquartz/bundle/Makefile.in @@ -107,6 +107,7 @@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ +ARM_BACKTRACE_CFLAGS = @ARM_BACKTRACE_CFLAGS@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -294,6 +295,7 @@ XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ +XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ diff --git a/xorg-server/hw/xquartz/darwin.c b/xorg-server/hw/xquartz/darwin.c index 066f5a596..d3f448820 100644 --- a/xorg-server/hw/xquartz/darwin.c +++ b/xorg-server/hw/xquartz/darwin.c @@ -602,7 +602,7 @@ void InitOutput( ScreenInfo *pScreenInfo, int argc, char **argv ) /* - * OsVendorFataError + * OsVendorFatalError */ void OsVendorFatalError( void ) { @@ -760,7 +760,7 @@ void ddxUseMsg( void ) */ void ddxGiveUp( void ) { - ErrorF( "Quitting Xquartz...\n" ); + ErrorF( "Quitting Xquartz\n" ); } @@ -773,11 +773,7 @@ void ddxGiveUp( void ) void AbortDDX( void ) { ErrorF( " AbortDDX\n" ); - /* - * This is needed for a abnormal server exit, since the normal exit stuff - * MUST also be performed (i.e. the vt must be left in a defined state) - */ - ddxGiveUp(); + OsAbort(); } #include "mivalidate.h" // for union _Validate used by windowstr.h diff --git a/xorg-server/hw/xquartz/doc/Makefile.am b/xorg-server/hw/xquartz/doc/Makefile.am index b812af1cb..7310de353 100644 --- a/xorg-server/hw/xquartz/doc/Makefile.am +++ b/xorg-server/hw/xquartz/doc/Makefile.am @@ -8,7 +8,7 @@ CLEANFILES = $(appman_PROCESSED) $(appman_DATA) include $(top_srcdir)/cpprules.in .man.$(APP_MAN_SUFFIX): - cp $< $@ + $(AM_V_at)cp $< $@ EXTRA_DIST = \ Xquartz.man.pre diff --git a/xorg-server/hw/xquartz/doc/Makefile.in b/xorg-server/hw/xquartz/doc/Makefile.in index 1ffce504c..8e426ec70 100644 --- a/xorg-server/hw/xquartz/doc/Makefile.in +++ b/xorg-server/hw/xquartz/doc/Makefile.in @@ -103,6 +103,7 @@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ +ARM_BACKTRACE_CFLAGS = @ARM_BACKTRACE_CFLAGS@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -258,7 +259,7 @@ PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ -SED = sed +SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ @@ -290,6 +291,7 @@ XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ +XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ @@ -661,7 +663,7 @@ uninstall-am: uninstall-appmanDATA $(AM_V_GEN)$(RAWCPP) $(RAWCPPFLAGS) $(MANDEFS) $(EXTRAMANDEFS) < $< | $(CPP_SED_MAGIC) > $@ .man.$(APP_MAN_SUFFIX): - cp $< $@ + $(AM_V_at)cp $< $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/xorg-server/hw/xquartz/mach-startup/Makefile.in b/xorg-server/hw/xquartz/mach-startup/Makefile.in index d0d468cbb..e3be35b58 100644 --- a/xorg-server/hw/xquartz/mach-startup/Makefile.in +++ b/xorg-server/hw/xquartz/mach-startup/Makefile.in @@ -138,6 +138,7 @@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ +ARM_BACKTRACE_CFLAGS = @ARM_BACKTRACE_CFLAGS@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -325,6 +326,7 @@ XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ +XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ diff --git a/xorg-server/hw/xquartz/mach-startup/bundle-main.c b/xorg-server/hw/xquartz/mach-startup/bundle-main.c index 4872ff59b..42aa757ea 100644 --- a/xorg-server/hw/xquartz/mach-startup/bundle-main.c +++ b/xorg-server/hw/xquartz/mach-startup/bundle-main.c @@ -73,10 +73,11 @@ extern int noPanoramiXExtension; #define XSERVER_VERSION "?" #endif -const int __crashreporter_info__len = 4096; -const char *__crashreporter_info__base = "X.Org X Server " XSERVER_VERSION " Build Date: " BUILD_DATE; -char __crashreporter_info__buf[4096]; -char *__crashreporter_info__ = __crashreporter_info__buf; +static char __crashreporter_info_buff__[4096] = {0}; +static const char *__crashreporter_info__ = &__crashreporter_info_buff__[0]; +asm (".desc ___crashreporter_info__, 0x10"); + +static const char *__crashreporter_info__base = "X.Org X Server " XSERVER_VERSION " Build Date: " BUILD_DATE; static char *launchd_id_prefix = NULL; static char *server_bootstrap_name = NULL; @@ -548,7 +549,7 @@ int main(int argc, char **argv, char **envp) { noPanoramiXExtension = TRUE; /* Setup the initial crasherporter info */ - strlcpy(__crashreporter_info__, __crashreporter_info__base, __crashreporter_info__len); + strlcpy(__crashreporter_info_buff__, __crashreporter_info__base, sizeof(__crashreporter_info_buff__)); fprintf(stderr, "X11.app: main(): argc=%d\n", argc); for(i=0; i < argc; i++) { diff --git a/xorg-server/hw/xquartz/pbproxy/Makefile.am b/xorg-server/hw/xquartz/pbproxy/Makefile.am index 02da6b265..188664259 100644 --- a/xorg-server/hw/xquartz/pbproxy/Makefile.am +++ b/xorg-server/hw/xquartz/pbproxy/Makefile.am @@ -1,5 +1,7 @@ -AM_CPPFLAGS=-F/System/Library/Frameworks/ApplicationServices.framework/Frameworks -AM_CFLAGS=$(XPBPROXY_CFLAGS) +AM_CPPFLAGS=-F/System/Library/Frameworks/ApplicationServices.framework/Frameworks \ + -DLAUNCHD_ID_PREFIX=\"$(LAUNCHD_ID_PREFIX)\" + +AM_CFLAGS=$(XPBPROXY_CFLAGS) noinst_LTLIBRARIES = libxpbproxy.la libxpbproxy_la_SOURCES = \ diff --git a/xorg-server/hw/xquartz/pbproxy/Makefile.in b/xorg-server/hw/xquartz/pbproxy/Makefile.in index 485dccc46..da8fc6f8f 100644 --- a/xorg-server/hw/xquartz/pbproxy/Makefile.in +++ b/xorg-server/hw/xquartz/pbproxy/Makefile.in @@ -129,6 +129,7 @@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ +ARM_BACKTRACE_CFLAGS = @ARM_BACKTRACE_CFLAGS@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -316,6 +317,7 @@ XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ +XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ @@ -424,8 +426,8 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -F/System/Library/Frameworks/ApplicationServices.framework/Frameworks \ - $(am__append_1) -AM_CFLAGS = $(XPBPROXY_CFLAGS) + -DLAUNCHD_ID_PREFIX=\"$(LAUNCHD_ID_PREFIX)\" $(am__append_1) +AM_CFLAGS = $(XPBPROXY_CFLAGS) noinst_LTLIBRARIES = libxpbproxy.la libxpbproxy_la_SOURCES = \ trick_autotools.c \ diff --git a/xorg-server/hw/xquartz/pbproxy/app-main.m b/xorg-server/hw/xquartz/pbproxy/app-main.m index f3f683af3..b00e90a6d 100644 --- a/xorg-server/hw/xquartz/pbproxy/app-main.m +++ b/xorg-server/hw/xquartz/pbproxy/app-main.m @@ -34,7 +34,7 @@ #include <unistd.h> /*for getpid*/ #include <Cocoa/Cocoa.h> -static const char *app_prefs_domain = "org.x.X11"; +static const char *app_prefs_domain = LAUNCHD_ID_PREFIX".xpbproxy"; CFStringRef app_prefs_domain_cfstr; /* Stubs */ @@ -73,7 +73,7 @@ int main (int argc, const char *argv[]) { printf("usage: xpbproxy OPTIONS\n" "Pasteboard proxying for X11.\n\n" "--prefs-domain <domain> Change the domain used for reading preferences\n" - " (default: org.x.X11)\n"); + " (default: %s)\n", app_prefs_domain); return 0; } else { fprintf(stderr, "usage: xpbproxy OPTIONS...\n" @@ -84,16 +84,10 @@ int main (int argc, const char *argv[]) { app_prefs_domain_cfstr = CFStringCreateWithCString(NULL, app_prefs_domain, kCFStringEncodingUTF8); - if(!xpbproxy_init()) - return EXIT_FAILURE; - signal (SIGINT, signal_handler); signal (SIGTERM, signal_handler); signal (SIGHUP, signal_handler); signal (SIGPIPE, SIG_IGN); - [NSApplication sharedApplication]; - [NSApp run]; - - return EXIT_SUCCESS; + return xpbproxy_run(); } diff --git a/xorg-server/hw/xquartz/pbproxy/main.m b/xorg-server/hw/xquartz/pbproxy/main.m index d26b1b127..560cf0182 100644 --- a/xorg-server/hw/xquartz/pbproxy/main.m +++ b/xorg-server/hw/xquartz/pbproxy/main.m @@ -82,25 +82,12 @@ static int x_error_handler (Display *dpy, XErrorEvent *errevent) { return 0; } -static inline pthread_t create_thread(void *func, void *arg) { - pthread_attr_t attr; - pthread_t tid; - - pthread_attr_init(&attr); - pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM); - pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); - pthread_create(&tid, &attr, func, arg); - pthread_attr_destroy(&attr); - - return tid; -} - -static void *xpbproxy_x_thread(void *args) { +int xpbproxy_run (void) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; size_t i; - + wait_for_server_init(); - + for(i=0, xpbproxy_dpy=NULL; !xpbproxy_dpy && i<5; i++) { xpbproxy_dpy = XOpenDisplay(NULL); @@ -108,7 +95,7 @@ static void *xpbproxy_x_thread(void *args) { char _display[32]; snprintf(_display, sizeof(_display), ":%s", display); setenv("DISPLAY", _display, TRUE); - + xpbproxy_dpy=XOpenDisplay(_display); } if(!xpbproxy_dpy) @@ -118,7 +105,7 @@ static void *xpbproxy_x_thread(void *args) { if (xpbproxy_dpy == NULL) { fprintf (stderr, "xpbproxy: can't open default display\n"); [pool release]; - return NULL; + return EXIT_FAILURE; } XSetIOErrorHandler (x_io_error_handler); @@ -128,11 +115,11 @@ static void *xpbproxy_x_thread(void *args) { &xpbproxy_apple_wm_error_base)) { fprintf (stderr, "xpbproxy: can't open AppleWM server extension\n"); [pool release]; - return NULL; + return EXIT_FAILURE; } - + xpbproxy_have_xfixes = XFixesQueryExtension(xpbproxy_dpy, &xpbproxy_xfixes_event_base, &xpbproxy_xfixes_error_base); - + XAppleWMSelectInput (xpbproxy_dpy, AppleWMActivationNotifyMask | AppleWMPasteboardNotifyMask); @@ -140,18 +127,14 @@ static void *xpbproxy_x_thread(void *args) { if(!xpbproxy_input_register()) { [pool release]; - return NULL; + return EXIT_FAILURE; } - + [pool release]; - - xpbproxy_input_loop(); - return NULL; -} + + CFRunLoopRun(); -BOOL xpbproxy_init (void) { - create_thread(xpbproxy_x_thread, NULL); - return TRUE; + return EXIT_SUCCESS; } id xpbproxy_selection_object (void) { diff --git a/xorg-server/hw/xquartz/pbproxy/pbproxy.h b/xorg-server/hw/xquartz/pbproxy/pbproxy.h index a6798efea..013f981d4 100644 --- a/xorg-server/hw/xquartz/pbproxy/pbproxy.h +++ b/xorg-server/hw/xquartz/pbproxy/pbproxy.h @@ -67,7 +67,7 @@ extern void xpbproxy_set_is_active (BOOL state); extern BOOL xpbproxy_get_is_active (void); extern id xpbproxy_selection_object (void); extern Time xpbproxy_current_timestamp (void); -extern BOOL xpbproxy_init (void); +extern int xpbproxy_run (void); extern Display *xpbproxy_dpy; extern int xpbproxy_apple_wm_event_base, xpbproxy_apple_wm_error_base; @@ -76,7 +76,6 @@ extern BOOL xpbproxy_have_xfixes; /* from x-input.m */ extern BOOL xpbproxy_input_register (void); -extern void xpbproxy_input_loop(); #ifdef DEBUG /* BEWARE: this can cause a string memory leak, according to the leaks program. */ diff --git a/xorg-server/hw/xquartz/pbproxy/x-input.m b/xorg-server/hw/xquartz/pbproxy/x-input.m index 6ba30c610..405ba3c73 100644 --- a/xorg-server/hw/xquartz/pbproxy/x-input.m +++ b/xorg-server/hw/xquartz/pbproxy/x-input.m @@ -39,17 +39,12 @@ #include <unistd.h> -#include <pthread.h> - static CFRunLoopSourceRef xpbproxy_dpy_source; #ifdef STANDALONE_XPBPROXY BOOL xpbproxy_prefs_reload = NO; #endif -static pthread_mutex_t xpbproxy_dpy_rdy_lock = PTHREAD_MUTEX_INITIALIZER; -static pthread_cond_t xpbproxy_dpy_rdy_cond = PTHREAD_COND_INITIALIZER; - /* Timestamp when the X server last told us it's active */ static Time last_activation_time; @@ -88,58 +83,51 @@ static void x_event_apple_wm_notify(XAppleWMNotifyEvent *e) { } } -void xpbproxy_input_loop() { - pthread_mutex_lock(&xpbproxy_dpy_rdy_lock); - while(true) { - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; +static void xpbproxy_process_xevents(void) { + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + + if(pool == nil) { + fprintf(stderr, "unable to allocate/init auto release pool!\n"); + return; + } + + while (XPending(xpbproxy_dpy) != 0) { + XEvent e; - if(pool == nil) { - fprintf(stderr, "unable to allocate/init auto release pool!\n"); - break; - } + XNextEvent (xpbproxy_dpy, &e); - while (XPending(xpbproxy_dpy) != 0) { - XEvent e; - - pthread_mutex_unlock(&xpbproxy_dpy_rdy_lock); - XNextEvent (xpbproxy_dpy, &e); - - switch (e.type) { - case SelectionClear: - if([xpbproxy_selection_object() is_active]) - [xpbproxy_selection_object () clear_event:&e.xselectionclear]; - break; - - case SelectionRequest: - [xpbproxy_selection_object () request_event:&e.xselectionrequest]; - break; - - case SelectionNotify: - [xpbproxy_selection_object () notify_event:&e.xselection]; - break; - - case PropertyNotify: - [xpbproxy_selection_object () property_event:&e.xproperty]; - break; - - default: - if(e.type >= xpbproxy_apple_wm_event_base && - e.type < xpbproxy_apple_wm_event_base + AppleWMNumberEvents) { - x_event_apple_wm_notify((XAppleWMNotifyEvent *) &e); - } else if(e.type == xpbproxy_xfixes_event_base + XFixesSelectionNotify) { - [xpbproxy_selection_object() xfixes_selection_notify:(XFixesSelectionNotifyEvent *)&e]; - } - break; - } - - XFlush(xpbproxy_dpy); - pthread_mutex_lock(&xpbproxy_dpy_rdy_lock); + switch (e.type) { + case SelectionClear: + if([xpbproxy_selection_object() is_active]) + [xpbproxy_selection_object () clear_event:&e.xselectionclear]; + break; + + case SelectionRequest: + [xpbproxy_selection_object () request_event:&e.xselectionrequest]; + break; + + case SelectionNotify: + [xpbproxy_selection_object () notify_event:&e.xselection]; + break; + + case PropertyNotify: + [xpbproxy_selection_object () property_event:&e.xproperty]; + break; + + default: + if(e.type >= xpbproxy_apple_wm_event_base && + e.type < xpbproxy_apple_wm_event_base + AppleWMNumberEvents) { + x_event_apple_wm_notify((XAppleWMNotifyEvent *) &e); + } else if(e.type == xpbproxy_xfixes_event_base + XFixesSelectionNotify) { + [xpbproxy_selection_object() xfixes_selection_notify:(XFixesSelectionNotifyEvent *)&e]; + } + break; } - [pool release]; - - pthread_cond_wait(&xpbproxy_dpy_rdy_cond, &xpbproxy_dpy_rdy_lock); + XFlush(xpbproxy_dpy); } + + [pool release]; } static BOOL add_input_socket (int sock, CFOptionFlags callback_types, @@ -161,7 +149,7 @@ static BOOL add_input_socket (int sock, CFOptionFlags callback_types, if (*cf_source == NULL) return FALSE; - CFRunLoopAddSource (CFRunLoopGetMain (), + CFRunLoopAddSource (CFRunLoopGetCurrent (), *cf_source, kCFRunLoopDefaultMode); return TRUE; } @@ -175,10 +163,8 @@ static void x_input_callback (CFSocketRef sock, CFSocketCallBackType type, xpbproxy_prefs_reload = NO; } #endif - - pthread_mutex_lock(&xpbproxy_dpy_rdy_lock); - pthread_cond_broadcast(&xpbproxy_dpy_rdy_cond); - pthread_mutex_unlock(&xpbproxy_dpy_rdy_lock); + + xpbproxy_process_xevents(); } BOOL xpbproxy_input_register(void) { diff --git a/xorg-server/hw/xquartz/quartz.c b/xorg-server/hw/xquartz/quartz.c index c4142a801..a611854e7 100644 --- a/xorg-server/hw/xquartz/quartz.c +++ b/xorg-server/hw/xquartz/quartz.c @@ -166,6 +166,11 @@ void QuartzInitOutput( FatalError("Could not register block and wakeup handlers."); } +#if defined(RANDR) && !defined(FAKE_RANDR) + if(!QuartzRandRInit(pScreen)) + FatalError("Failed to init RandR extension.\n"); +#endif + // Do display mode specific initialization quartzProcs->DisplayInit(); } @@ -236,6 +241,7 @@ void QuartzUpdateScreens(void) { WindowPtr pRoot; int x, y, width, height, sx, sy; xEvent e; + BoxRec bounds; if (noPseudoramiXExtension || screenInfo.numScreens != 1) { @@ -259,14 +265,12 @@ void QuartzUpdateScreens(void) { pScreen->width = width; pScreen->height = height; -#ifndef FAKE_RANDR - if(!QuartzRandRInit(pScreen)) - FatalError("Failed to init RandR extension.\n"); -#endif - DarwinAdjustScreenOrigins(&screenInfo); quartzProcs->UpdateScreen(pScreen); + /* DarwinAdjustScreenOrigins or UpdateScreen may change dixScreenOrigins, + * so use it rather than x/y + */ sx = dixScreenOrigins[pScreen->myNum].x + darwinMainScreenX; sy = dixScreenOrigins[pScreen->myNum].y + darwinMainScreenY; @@ -277,8 +281,16 @@ void QuartzUpdateScreens(void) { //pScreen->PaintWindowBackground (pRoot, &pRoot->borderClip, PW_BACKGROUND); miPaintWindow(pRoot, &pRoot->borderClip, PW_BACKGROUND); -// TODO: This is a noop in 1.6 and nuked in master... we may need to do something else now to handle it -// DefineInitialRootWindow(pRoot); + /* <rdar://problem/7770779> pointer events are clipped to old display region after display reconfiguration + * http://xquartz.macosforge.org/trac/ticket/346 + */ + bounds.x1 = 0; + bounds.x2 = width; + bounds.y1 = 0; + bounds.y2 = height; + pScreen->ConstrainCursor(inputInfo.pointer, pScreen, &bounds); + inputInfo.pointer->spriteInfo->sprite->physLimits = bounds; + inputInfo.pointer->spriteInfo->sprite->hotLimits = bounds; DEBUG_LOG("Root Window: %dx%d @ (%d, %d) darwinMainScreen (%d, %d) xy (%d, %d) dixScreenOrigins (%d, %d)\n", width, height, x - sx, y - sy, darwinMainScreenX, darwinMainScreenY, x, y, dixScreenOrigins[pScreen->myNum].x, dixScreenOrigins[pScreen->myNum].y); diff --git a/xorg-server/hw/xquartz/quartzKeyboard.c b/xorg-server/hw/xquartz/quartzKeyboard.c index 7e36a9aa3..a4a0b08bd 100644 --- a/xorg-server/hw/xquartz/quartzKeyboard.c +++ b/xorg-server/hw/xquartz/quartzKeyboard.c @@ -184,12 +184,6 @@ static void DarwinChangeKeyboardControl(DeviceIntPtr device, KeybdCtrl *ctrl) { // keyclick, bell volume / pitch, autorepead, LED's } -static void DarwinKeyboardBell(int volume, DeviceIntPtr pDev, pointer arg, int something) { - KeybdCtrl *ctrl = arg; - - DDXRingBell(volume, ctrl->bell_pitch, ctrl->bell_duration); -} - //----------------------------------------------------------------------------- // Utility functions to help parse Darwin keymap //----------------------------------------------------------------------------- @@ -301,7 +295,7 @@ void DarwinKeyboardInit(DeviceIntPtr pDev) { // for a kIOHIDParamConnectType connection. assert(darwinParamConnect = NXOpenEventStatus()); - InitKeyboardDeviceStruct(pDev, NULL, DarwinKeyboardBell, DarwinChangeKeyboardControl); + InitKeyboardDeviceStruct(pDev, NULL, NULL, DarwinChangeKeyboardControl); DarwinKeyboardReloadHandler(); @@ -741,7 +735,10 @@ Bool QuartzReadSystemKeymap(darwinKeyboardInfo *info) { if (err != noErr) continue; } - if (len > 0 && s[0] != 0x0010) { + /* Not sure why 0x0010 is there. + * 0x0000 - <rdar://problem/7793566> 'Unicode Hex Input' ... + */ + if (len > 0 && s[0] != 0x0010 && s[0] != 0x0000) { k[j] = ucs2keysym (s[0]); if (dead_key_state != 0) k[j] = make_dead_key (k[j]); } diff --git a/xorg-server/hw/xquartz/xpr/Makefile.in b/xorg-server/hw/xquartz/xpr/Makefile.in index 2bcbf2bdf..5b20993bb 100644 --- a/xorg-server/hw/xquartz/xpr/Makefile.in +++ b/xorg-server/hw/xquartz/xpr/Makefile.in @@ -102,6 +102,7 @@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ +ARM_BACKTRACE_CFLAGS = @ARM_BACKTRACE_CFLAGS@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -289,6 +290,7 @@ XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ +XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ |