xserver: Branch 'xorg-server-1.5-apple' - 8 commits
Jeremy Huddleston
jeremyhu at kemper.freedesktop.org
Tue Nov 25 00:53:58 PST 2008
hw/xquartz/X11Application.h | 2
hw/xquartz/X11Application.m | 17 ++--
hw/xquartz/mach-startup/bundle-main.c | 19 +++-
hw/xquartz/mach-startup/stub.c | 6 +
hw/xquartz/pbproxy/app-main.m | 26 ++++++
hw/xquartz/pbproxy/main.m | 25 ++++-
hw/xquartz/pbproxy/x-selection.m | 7 -
hw/xquartz/quartz.h | 8 -
hw/xquartz/quartzKeyboard.c | 144 +---------------------------------
hw/xquartz/xpr/xprScreen.c | 4
10 files changed, 89 insertions(+), 169 deletions(-)
New commits:
commit f5150a6ac498cf2da1b7ee681a64a80edb201530
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date: Tue Nov 25 00:51:01 2008 -0800
XQuartz: Add fallback for xpbproxy's display for Tiger or no-launchd-Leopard
(cherry picked from commit 7a8c6665949d7804a97ef2539a74ec4aa682e1cc)
diff --git a/hw/xquartz/pbproxy/app-main.m b/hw/xquartz/pbproxy/app-main.m
index e4a4652..cb0fa57 100644
--- a/hw/xquartz/pbproxy/app-main.m
+++ b/hw/xquartz/pbproxy/app-main.m
@@ -37,6 +37,8 @@
static const char *app_prefs_domain = "org.x.X11";
CFStringRef app_prefs_domain_cfstr;
+char *display = NULL;
+
static void signal_handler (int sig) {
switch(sig) {
case SIGHUP:
diff --git a/hw/xquartz/pbproxy/main.m b/hw/xquartz/pbproxy/main.m
index efa42e3..17720ab 100644
--- a/hw/xquartz/pbproxy/main.m
+++ b/hw/xquartz/pbproxy/main.m
@@ -31,6 +31,7 @@
#import "x-selection.h"
#include <pthread.h>
+#include <unistd.h>
#include <X11/extensions/applewm.h>
Display *xpbproxy_dpy;
@@ -38,6 +39,8 @@ int xpbproxy_apple_wm_event_base, xpbproxy_apple_wm_error_base;
int xpbproxy_xfixes_event_base, xpbproxy_xfixes_error_base;
BOOL xpbproxy_have_xfixes;
+extern char *display;
+
#ifdef STANDALONE_XPBPROXY
BOOL xpbproxy_is_standalone = NO;
#endif
@@ -67,10 +70,24 @@ static int x_error_handler (Display *dpy, XErrorEvent *errevent) {
BOOL xpbproxy_init (void) {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-
- xpbproxy_dpy = XOpenDisplay (NULL);
+ size_t i;
+
+ for(i=0, xpbproxy_dpy=NULL; !xpbproxy_dpy && i<5; i++) {
+ xpbproxy_dpy = XOpenDisplay(NULL);
+
+ if(!xpbproxy_dpy && display) {
+ char *_display = alloca(sizeof(char) * (strlen(display) + 2));
+ strcpy(_display+1, display);
+ *_display=':';
+
+ xpbproxy_dpy=XOpenDisplay(_display);
+ }
+ if(!xpbproxy_dpy)
+ sleep(1);
+ }
+
if (xpbproxy_dpy == NULL) {
- fprintf (stderr, "can't open default display\n");
+ fprintf (stderr, "xpbproxy: can't open default display\n");
[pool release];
return FALSE;
}
@@ -80,7 +97,7 @@ BOOL xpbproxy_init (void) {
if (!XAppleWMQueryExtension (xpbproxy_dpy, &xpbproxy_apple_wm_event_base,
&xpbproxy_apple_wm_error_base)) {
- fprintf (stderr, "can't open AppleWM server extension\n");
+ fprintf (stderr, "xpbproxy: can't open AppleWM server extension\n");
[pool release];
return FALSE;
}
commit 8a53f33f1152a876d7ee40f491b22c0a50502141
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date: Tue Nov 25 00:39:52 2008 -0800
XQuartz: Use the environment to pass the bundle's prefs domain on to xinit/quartz-wm for Tiger or no-launchd-LEOPARD
(cherry picked from commit fbf4b0d33fa5dc618c3191a4e823232dfa33cd95)
diff --git a/hw/xquartz/mach-startup/bundle-main.c b/hw/xquartz/mach-startup/bundle-main.c
index 058fe78..fa19eab 100644
--- a/hw/xquartz/mach-startup/bundle-main.c
+++ b/hw/xquartz/mach-startup/bundle-main.c
@@ -426,6 +426,17 @@ int main(int argc, char **argv, char **envp) {
/* Setup the initial crasherporter info */
strlcpy(__crashreporter_info__, __crashreporter_info__base, __crashreporter_info__len);
+ /* Pass on our prefs domain to startx and its inheritors (mainly for quartz-wm) */
+ CFBundleRef bundle = CFBundleGetMainBundle();
+ if(bundle) {
+ CFStringRef pd = CFBundleGetIdentifier(bundle);
+ if(pd) {
+ const char *pds = CFStringGetCStringPtr(pd, 0);
+ if(pds)
+ setenv("X11_PREFS_DOMAIN", pds, 1);
+ }
+ }
+
fprintf(stderr, "X11.app: main(): argc=%d\n", argc);
for(i=0; i < argc; i++) {
fprintf(stderr, "\targv[%u] = %s\n", (unsigned)i, argv[i]);
commit f2a80c34d3a4c861734bdbdcbcd841309a583ee5
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date: Tue Nov 25 00:20:57 2008 -0800
XQuartz: Dead code removal
(cherry picked from commit eeb323612e0adbea37befed31bbaa1d295728385)
diff --git a/hw/xquartz/mach-startup/bundle-main.c b/hw/xquartz/mach-startup/bundle-main.c
index d9c895e..058fe78 100644
--- a/hw/xquartz/mach-startup/bundle-main.c
+++ b/hw/xquartz/mach-startup/bundle-main.c
@@ -75,9 +75,6 @@ char *__crashreporter_info__ = __crashreporter_info__buf;
#define DEBUG 1
-static int execute(const char *command);
-static char *command_from_prefs(const char *key, const char *default_value);
-
/* This is in quartzStartup.c */
int server_main(int argc, char **argv, char **envp);
commit a315d74d3d129040b5242a05d39b9802ae36b535
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date: Tue Nov 25 00:15:53 2008 -0800
XQuartz: Don't hardcode values of org.x.X11 for the preferences domain
(cherry picked from commit 3a500d9247cf34686ec17b4a88c34d51ecd38ecd)
diff --git a/hw/xquartz/X11Application.h b/hw/xquartz/X11Application.h
index 91debd6..1cfbe08 100644
--- a/hw/xquartz/X11Application.h
+++ b/hw/xquartz/X11Application.h
@@ -75,8 +75,6 @@ void X11ApplicationMain(int argc, char **argv, char **envp);
extern int X11EnableKeyEquivalents;
extern int quartzHasRoot, quartzEnableRootless, quartzFullscreenMenu;
-#define APP_PREFS "org.x.X11"
-
#define PREFS_APPSMENU "apps_menu"
#define PREFS_FAKEBUTTONS "enable_fake_buttons"
#define PREFS_SYSBEEP "enable_system_beep"
diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m
index 26cd8e2..9f5d3b6 100644
--- a/hw/xquartz/X11Application.m
+++ b/hw/xquartz/X11Application.m
@@ -76,6 +76,8 @@ extern int darwinFakeButtons;
X11Application *X11App;
+CFStringRef app_prefs_domain_cfstr = NULL;
+
#define ALL_KEY_MASKS (NSShiftKeyMask | NSControlKeyMask | NSAlternateKeyMask | NSCommandKeyMask)
@interface X11Application (Private)
@@ -466,7 +468,7 @@ static NSMutableArray * cfarray_to_nsarray (CFArrayRef in) {
- (CFPropertyListRef) prefs_get:(NSString *)key {
CFPropertyListRef value;
- value = CFPreferencesCopyAppValue ((CFStringRef) key, CFSTR (APP_PREFS));
+ value = CFPreferencesCopyAppValue ((CFStringRef) key, app_prefs_domain_cfstr);
if (value == NULL) {
static CFDictionaryRef defaults;
@@ -618,7 +620,7 @@ static NSMutableArray * cfarray_to_nsarray (CFArrayRef in) {
x = CFNumberCreate (NULL, kCFNumberIntType, &value);
- CFPreferencesSetValue ((CFStringRef) key, (CFTypeRef) x, CFSTR (APP_PREFS),
+ CFPreferencesSetValue ((CFStringRef) key, (CFTypeRef) x, app_prefs_domain_cfstr,
kCFPreferencesCurrentUser, kCFPreferencesAnyHost);
CFRelease (x);
@@ -629,7 +631,7 @@ static NSMutableArray * cfarray_to_nsarray (CFArrayRef in) {
x = CFNumberCreate (NULL, kCFNumberFloatType, &value);
- CFPreferencesSetValue ((CFStringRef) key, (CFTypeRef) x, CFSTR (APP_PREFS),
+ CFPreferencesSetValue ((CFStringRef) key, (CFTypeRef) x, app_prefs_domain_cfstr,
kCFPreferencesCurrentUser, kCFPreferencesAnyHost);
CFRelease (x);
@@ -638,7 +640,7 @@ static NSMutableArray * cfarray_to_nsarray (CFArrayRef in) {
- (void) prefs_set_boolean:(NSString *)key value:(int)value {
CFPreferencesSetValue ((CFStringRef) key,
(CFTypeRef) (value ? kCFBooleanTrue
- : kCFBooleanFalse), CFSTR (APP_PREFS),
+ : kCFBooleanFalse), app_prefs_domain_cfstr,
kCFPreferencesCurrentUser, kCFPreferencesAnyHost);
}
@@ -649,14 +651,14 @@ static NSMutableArray * cfarray_to_nsarray (CFArrayRef in) {
cfarray = nsarray_to_cfarray (value);
CFPreferencesSetValue ((CFStringRef) key,
(CFTypeRef) cfarray,
- CFSTR (APP_PREFS),
+ app_prefs_domain_cfstr,
kCFPreferencesCurrentUser, kCFPreferencesAnyHost);
CFRelease (cfarray);
}
- (void) prefs_set_string:(NSString *)key value:(NSString *)value {
CFPreferencesSetValue ((CFStringRef) key, (CFTypeRef) value,
- CFSTR (APP_PREFS), kCFPreferencesCurrentUser,
+ app_prefs_domain_cfstr, kCFPreferencesCurrentUser,
kCFPreferencesAnyHost);
}
@@ -857,6 +859,9 @@ void X11ApplicationMain (int argc, char **argv, char **envp) {
pool = [[NSAutoreleasePool alloc] init];
X11App = (X11Application *) [X11Application sharedApplication];
init_ports ();
+
+ app_prefs_domain_cfstr = (CFStringRef)[[NSBundle mainBundle] bundleIdentifier];
+
[NSApp read_defaults];
[NSBundle loadNibNamed:@"main" owner:NSApp];
[[NSNotificationCenter defaultCenter] addObserver:NSApp
diff --git a/hw/xquartz/pbproxy/app-main.m b/hw/xquartz/pbproxy/app-main.m
index b5748da..e4a4652 100644
--- a/hw/xquartz/pbproxy/app-main.m
+++ b/hw/xquartz/pbproxy/app-main.m
@@ -34,6 +34,9 @@
#include <unistd.h> /*for getpid*/
#include <Cocoa/Cocoa.h>
+static const char *app_prefs_domain = "org.x.X11";
+CFStringRef app_prefs_domain_cfstr;
+
static void signal_handler (int sig) {
switch(sig) {
case SIGHUP:
@@ -50,6 +53,27 @@ int main (int argc, const char *argv[]) {
#endif
xpbproxy_is_standalone = YES;
+
+ if((s = getenv("X11_PREFS_DOMAIN")))
+ app_prefs_domain = s;
+
+ for (i = 1; i < argc; i++) {
+ if(strcmp (argv[i], "--prefs-domain") == 0 && i+1 < argc) {
+ app_prefs_domain = argv[++i];
+ } else if (strcmp (argv[i], "--help") == 0) {
+ 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");
+ return 0;
+ } else {
+ fprintf(stderr, "usage: xpbproxy OPTIONS...\n"
+ "Try 'xpbproxy --help' for more information.\n");
+ return 1;
+ }
+ }
+
+ app_prefs_domain_cfstr = CFStringCreateWithCString(NULL, app_prefs_domain, kCFStringEncodingUTF8);
if(!xpbproxy_init())
return EXIT_FAILURE;
diff --git a/hw/xquartz/pbproxy/x-selection.m b/hw/xquartz/pbproxy/x-selection.m
index 9604995..cd540be 100644
--- a/hw/xquartz/pbproxy/x-selection.m
+++ b/hw/xquartz/pbproxy/x-selection.m
@@ -97,12 +97,13 @@ dump_prefs (FILE *fp) {
}
#endif
-#define APP_PREFS "org.x.X11"
+extern CFStringRef app_prefs_domain_cfstr;
+
static BOOL
prefs_get_bool (CFStringRef key, BOOL defaultValue) {
Boolean value, ok;
- value = CFPreferencesGetAppBooleanValue (key, CFSTR (APP_PREFS), &ok);
+ value = CFPreferencesGetAppBooleanValue (key, app_prefs_domain_cfstr, &ok);
return ok ? (BOOL) value : defaultValue;
}
@@ -1425,7 +1426,7 @@ get_property(Window win, Atom property, struct propdata *pdata, Bool delete, Ato
* It's uncertain how we could handle the synchronization failing, so cast to void.
* The prefs_get_bool should fall back to defaults if the org.x.X11 plist doesn't exist or is invalid.
*/
- (void)CFPreferencesAppSynchronize(CFSTR(APP_PREFS));
+ (void)CFPreferencesAppSynchronize(app_prefs_domain_cfstr);
#ifdef STANDALONE_XPBPROXY
if(xpbproxy_is_standalone)
pbproxy_prefs.active = YES;
commit 525a45d747958e193f01cbba1065cbe64b9ed2f7
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date: Mon Nov 24 23:33:54 2008 -0800
XQuartz: More dead code removal
(cherry picked from commit dcb0f6a2e62823a671051874d14a33ce59505892)
diff --git a/hw/xquartz/quartzKeyboard.c b/hw/xquartz/quartzKeyboard.c
index d88df84..e192dff 100644
--- a/hw/xquartz/quartzKeyboard.c
+++ b/hw/xquartz/quartzKeyboard.c
@@ -77,143 +77,6 @@ enum {
#define UKEYSYM(u) ((u) | 0x01000000)
-#define AltMask Mod1Mask
-#define MetaMask Mod2Mask
-#define FunctionMask Mod3Mask
-
-#define UK(a) NoSymbol // unknown symbol
-
-static KeySym const next_to_x[256] = {
- NoSymbol, NoSymbol, NoSymbol, XK_KP_Enter,
- NoSymbol, NoSymbol, NoSymbol, NoSymbol,
- XK_BackSpace, XK_Tab, XK_Linefeed, NoSymbol,
- NoSymbol, XK_Return, NoSymbol, NoSymbol,
- NoSymbol, NoSymbol, NoSymbol, NoSymbol,
- NoSymbol, NoSymbol, NoSymbol, NoSymbol,
- NoSymbol, NoSymbol, NoSymbol, XK_Escape,
- NoSymbol, NoSymbol, NoSymbol, NoSymbol,
- XK_space, XK_exclam, XK_quotedbl, XK_numbersign,
- XK_dollar, XK_percent, XK_ampersand, XK_apostrophe,
- XK_parenleft, XK_parenright, XK_asterisk, XK_plus,
- XK_comma, XK_minus, XK_period, XK_slash,
- XK_0, XK_1, XK_2, XK_3,
- XK_4, XK_5, XK_6, XK_7,
- XK_8, XK_9, XK_colon, XK_semicolon,
- XK_less, XK_equal, XK_greater, XK_question,
- XK_at, XK_A, XK_B, XK_C,
- XK_D, XK_E, XK_F, XK_G,
- XK_H, XK_I, XK_J, XK_K,
- XK_L, XK_M, XK_N, XK_O,
- XK_P, XK_Q, XK_R, XK_S,
- XK_T, XK_U, XK_V, XK_W,
- XK_X, XK_Y, XK_Z, XK_bracketleft,
- XK_backslash, XK_bracketright,XK_asciicircum, XK_underscore,
- XK_grave, XK_a, XK_b, XK_c,
- XK_d, XK_e, XK_f, XK_g,
- XK_h, XK_i, XK_j, XK_k,
- XK_l, XK_m, XK_n, XK_o,
- XK_p, XK_q, XK_r, XK_s,
- XK_t, XK_u, XK_v, XK_w,
- XK_x, XK_y, XK_z, XK_braceleft,
- XK_bar, XK_braceright, XK_asciitilde, XK_BackSpace,
-// 128
- NoSymbol, XK_Agrave, XK_Aacute, XK_Acircumflex,
- XK_Atilde, XK_Adiaeresis, XK_Aring, XK_Ccedilla,
- XK_Egrave, XK_Eacute, XK_Ecircumflex, XK_Ediaeresis,
- XK_Igrave, XK_Iacute, XK_Icircumflex, XK_Idiaeresis,
-// 144
- XK_ETH, XK_Ntilde, XK_Ograve, XK_Oacute,
- XK_Ocircumflex, XK_Otilde, XK_Odiaeresis, XK_Ugrave,
- XK_Uacute, XK_Ucircumflex, XK_Udiaeresis, XK_Yacute,
- XK_THORN, XK_mu, XK_multiply, XK_division,
-// 160
- XK_copyright, XK_exclamdown, XK_cent, XK_sterling,
- UK(fraction), XK_yen, UK(fhook), XK_section,
- XK_currency, XK_rightsinglequotemark,
- XK_leftdoublequotemark,
- XK_guillemotleft,
- XK_leftanglebracket,
- XK_rightanglebracket,
- UK(filigature), UK(flligature),
-// 176
- XK_registered, XK_endash, XK_dagger, XK_doubledagger,
- XK_periodcentered,XK_brokenbar, XK_paragraph, UK(bullet),
- XK_singlelowquotemark,
- XK_doublelowquotemark,
- XK_rightdoublequotemark,
- XK_guillemotright,
- XK_ellipsis, UK(permille), XK_notsign, XK_questiondown,
-// 192
- XK_onesuperior, XK_dead_grave, XK_dead_acute, XK_dead_circumflex,
- XK_dead_tilde, XK_dead_macron, XK_dead_breve, XK_dead_abovedot,
- XK_dead_diaeresis,
- XK_twosuperior, XK_dead_abovering,
- XK_dead_cedilla,
- XK_threesuperior,
- XK_dead_doubleacute,
- XK_dead_ogonek, XK_dead_caron,
-// 208
- XK_emdash, XK_plusminus, XK_onequarter, XK_onehalf,
- XK_threequarters,
- XK_agrave, XK_aacute, XK_acircumflex,
- XK_atilde, XK_adiaeresis, XK_aring, XK_ccedilla,
- XK_egrave, XK_eacute, XK_ecircumflex, XK_ediaeresis,
-// 224
- XK_igrave, XK_AE, XK_iacute, XK_ordfeminine,
- XK_icircumflex, XK_idiaeresis, XK_eth, XK_ntilde,
- XK_Lstroke, XK_Ooblique, XK_OE, XK_masculine,
- XK_ograve, XK_oacute, XK_ocircumflex, XK_otilde,
-// 240
- XK_odiaeresis, XK_ae, XK_ugrave, XK_uacute,
- XK_ucircumflex, XK_idotless, XK_udiaeresis, XK_ygrave,
- XK_lstroke, XK_ooblique, XK_oe, XK_ssharp,
- XK_thorn, XK_ydiaeresis, NoSymbol, NoSymbol,
- };
-
-#define MIN_SYMBOL 0xAC
-static KeySym const symbol_to_x[] = {
- XK_Left, XK_Up, XK_Right, XK_Down
- };
-static int const NUM_SYMBOL = sizeof(symbol_to_x) / sizeof(symbol_to_x[0]);
-
-#define MIN_FUNCKEY 0x20
-static KeySym const funckey_to_x[] = {
- XK_F1, XK_F2, XK_F3, XK_F4,
- XK_F5, XK_F6, XK_F7, XK_F8,
- XK_F9, XK_F10, XK_F11, XK_F12,
- XK_Insert, XK_Delete, XK_Home, XK_End,
- XK_Page_Up, XK_Page_Down, XK_F13, XK_F14,
- XK_F15
- };
-static int const NUM_FUNCKEY = sizeof(funckey_to_x) / sizeof(funckey_to_x[0]);
-
-typedef struct {
- KeySym normalSym;
- KeySym keypadSym;
-} darwinKeyPad_t;
-
-static darwinKeyPad_t const normal_to_keypad[] = {
- { XK_0, XK_KP_0 },
- { XK_1, XK_KP_1 },
- { XK_2, XK_KP_2 },
- { XK_3, XK_KP_3 },
- { XK_4, XK_KP_4 },
- { XK_5, XK_KP_5 },
- { XK_6, XK_KP_6 },
- { XK_7, XK_KP_7 },
- { XK_8, XK_KP_8 },
- { XK_9, XK_KP_9 },
- { XK_equal, XK_KP_Equal },
- { XK_asterisk, XK_KP_Multiply },
- { XK_plus, XK_KP_Add },
- { XK_comma, XK_KP_Separator },
- { XK_minus, XK_KP_Subtract },
- { XK_period, XK_KP_Decimal },
- { XK_slash, XK_KP_Divide }
-};
-
-static int const NUM_KEYPAD = sizeof(normal_to_keypad) / sizeof(normal_to_keypad[0]);
-
/* Table of keycode->keysym mappings we use to fallback on for important
keys that are often not in the Unicode mapping. */
commit 37df4d8e2a2d7de312b4ec1a3f4f2bfdea1665b7
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date: Mon Nov 24 12:33:20 2008 -0800
XQuartz: Disable some error spew on Tiger (where it wouldn't be an error)
(cherry picked from commit 73ec6d3dfe0086d352f4eca25f1df5ae1884bb18)
diff --git a/hw/xquartz/quartzKeyboard.c b/hw/xquartz/quartzKeyboard.c
index 9aa9ece..d88df84 100644
--- a/hw/xquartz/quartzKeyboard.c
+++ b/hw/xquartz/quartzKeyboard.c
@@ -732,24 +732,29 @@ Bool QuartzReadSystemKeymap(darwinKeyboardInfo *info) {
ErrorF("X11.app: Debug Info: keyboard_type=%u, currentKeyLayoutRef=%p, currentKeyLayoutDataRef=%p, chr_data=%p\n",
(unsigned)keyboard_type, currentKeyLayoutRef, currentKeyLayoutDataRef, chr_data);
#endif
+
KLGetCurrentKeyboardLayout (&key_layout);
KLGetKeyboardLayoutProperty (key_layout, kKLuchrData, &chr_data);
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
if(chr_data != NULL) {
ErrorF("X11.app: Fallback succeeded, but this is still a bug. Please report the above information.\n");
}
+#endif
}
if (chr_data == NULL) {
- ErrorF("X11.app: Debug Info: kKLuchrData fallback failed, trying kKLKCHRData.\n");
+ ErrorF("X11.app: Debug Info: kKLuchrData failed, trying kKLKCHRData.\n");
ErrorF("If you are using a 3rd party keyboard layout, please see http://xquartz.macosforge.org/trac/ticket/154\n");
KLGetKeyboardLayoutProperty (key_layout, kKLKCHRData, &chr_data);
is_uchr = 0;
num_keycodes = 128;
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
if(chr_data != NULL) {
ErrorF("X11.app: Fallback succeeded, but this is still a bug. Please report the above information.\n");
}
+#endif
}
#endif
commit 1fc07874e5ec0fe56d4de237da2af425103b0238
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date: Sat Nov 22 20:23:46 2008 -0800
XQuartz: Dead code removal
(cherry picked from commit 46c077d9b4a883fc809c32077ce40f33a70d268b)
diff --git a/hw/xquartz/quartz.h b/hw/xquartz/quartz.h
index 8b04b79..c5da4c5 100644
--- a/hw/xquartz/quartz.h
+++ b/hw/xquartz/quartz.h
@@ -54,20 +54,16 @@ typedef void (*InitInputProc)(int argc, char **argv);
* Cursor functions
*/
typedef Bool (*InitCursorProc)(ScreenPtr pScreen);
-typedef void (*CursorUpdateProc)(void);
/*
* Suspend and resume X11 activity
*/
typedef void (*SuspendScreenProc)(ScreenPtr pScreen);
typedef void (*ResumeScreenProc)(ScreenPtr pScreen, int x, int y);
-typedef void (*CaptureScreensProc)(void);
-typedef void (*ReleaseScreensProc)(void);
/*
* Screen state change support
*/
-typedef void (*ScreenChangedProc)(void);
typedef void (*AddPseudoramiXScreensProc)(int *x, int *y, int *width, int *height);
typedef void (*UpdateScreenProc)(ScreenPtr pScreen);
@@ -101,14 +97,10 @@ typedef struct _QuartzModeProcs {
InitInputProc InitInput;
InitCursorProc InitCursor;
- CursorUpdateProc CursorUpdate; // Not used if NULL
SuspendScreenProc SuspendScreen;
ResumeScreenProc ResumeScreen;
- CaptureScreensProc CaptureScreens; // Only called in fullscreen
- ReleaseScreensProc ReleaseScreens; // Only called in fullscreen
- ScreenChangedProc ScreenChanged;
AddPseudoramiXScreensProc AddPseudoramiXScreens;
UpdateScreenProc UpdateScreen;
diff --git a/hw/xquartz/xpr/xprScreen.c b/hw/xquartz/xpr/xprScreen.c
index a4ee303..18406b8 100644
--- a/hw/xquartz/xpr/xprScreen.c
+++ b/hw/xquartz/xpr/xprScreen.c
@@ -423,12 +423,8 @@ static QuartzModeProcsRec xprModeProcs = {
xprSetupScreen,
xprInitInput,
QuartzInitCursor,
- NULL, // No need to update cursor
QuartzSuspendXCursor,
QuartzResumeXCursor,
- NULL, // No capture or release in rootless mode
- NULL,
- NULL, // Xplugin sends screen change events directly
xprAddPseudoramiXScreens,
xprUpdateScreen,
xprIsX11Window,
commit 0c69f87717eaaf752f7d9a4aca06557ee2cdf43e
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date: Sat Nov 22 15:47:14 2008 -0800
XQuartz: More Tiger cleanup: bootstrap_strerror
(cherry picked from commit 37f535aff3e9a7a02711daa98152cdff97745622)
diff --git a/hw/xquartz/mach-startup/bundle-main.c b/hw/xquartz/mach-startup/bundle-main.c
index a49013e..d9c895e 100644
--- a/hw/xquartz/mach-startup/bundle-main.c
+++ b/hw/xquartz/mach-startup/bundle-main.c
@@ -29,6 +29,7 @@
prior written authorization. */
#include <CoreFoundation/CoreFoundation.h>
+#include <AvailabilityMacros.h>
#include <X11/Xlib.h>
#include <unistd.h>
@@ -374,7 +375,11 @@ int startup_trigger(int argc, char **argv, char **envp) {
kr = bootstrap_look_up(bootstrap_port, SERVER_BOOTSTRAP_NAME, &mp);
if (kr != KERN_SUCCESS) {
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
fprintf(stderr, "bootstrap_look_up(): %s\n", bootstrap_strerror(kr));
+#else
+ fprintf(stderr, "bootstrap_look_up(): %ul\n", (unsigned long)kr);
+#endif
exit(EXIT_FAILURE);
}
diff --git a/hw/xquartz/mach-startup/stub.c b/hw/xquartz/mach-startup/stub.c
index bc4f7ec..aa0505a 100644
--- a/hw/xquartz/mach-startup/stub.c
+++ b/hw/xquartz/mach-startup/stub.c
@@ -267,7 +267,11 @@ int main(int argc, char **argv, char **envp) {
}
if(kr != KERN_SUCCESS) {
- fprintf(stderr, "Xquartz: bootstrap_look_up(): Timed out: %s\n", bootstrap_strerror(kr));
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
+ fprintf(stderr, "Xquartz: bootstrap_look_up(): %s\n", bootstrap_strerror(kr));
+#else
+ fprintf(stderr, "Xquartz: bootstrap_look_up(): %ul\n", (unsigned long)kr);
+#endif
return EXIT_FAILURE;
}
}
More information about the xorg-commit
mailing list