xserver: Branch 'xorg-server-1.5-apple' - 6 commits

Jeremy Huddleston jeremyhu at kemper.freedesktop.org
Fri Nov 28 12:59:26 PST 2008


 hw/xquartz/X11Application.h           |    1 +
 hw/xquartz/X11Application.m           |   16 +++++++++++-----
 hw/xquartz/X11Controller.m            |   15 +--------------
 hw/xquartz/doc/Xquartz.man.pre        |    3 +++
 hw/xquartz/mach-startup/Makefile.am   |    8 +++++++-
 hw/xquartz/mach-startup/bundle-main.c |   27 ++++++++++++++++++++++++++-
 hw/xquartz/quartzKeyboard.c           |    5 +++--
 7 files changed, 52 insertions(+), 23 deletions(-)

New commits:
commit 635019ad18db921fec99256294debd8571074abf
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Fri Nov 28 12:59:09 2008 -0800

    XQuartz: Added option to enable/disable test extensions
    
    defaults write org.x.X11 enable_test_extensions -boolean true
    (cherry picked from commit fd4710aff3723d5f3422cf6a6530172eafc556d9)

diff --git a/hw/xquartz/X11Application.h b/hw/xquartz/X11Application.h
index 1cfbe08..80aee59 100644
--- a/hw/xquartz/X11Application.h
+++ b/hw/xquartz/X11Application.h
@@ -92,6 +92,7 @@ extern int quartzHasRoot, quartzEnableRootless, quartzFullscreenMenu;
 #define PREFS_APPKIT_MODIFIERS      "appkit_modifiers"
 #define PREFS_WINDOW_ITEM_MODIFIERS "window_item_modifiers"
 #define PREFS_ROOTLESS              "rootless"
+#define PREFS_TEST_EXTENSIONS       "enable_test_extensions"
 #define PREFS_XP_OPTIONS            "xp_options"
 #define PREFS_LOGIN_SHELL           "login_shell"
 #define PREFS_CLICK_THROUGH         "wm_click_through"
diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m
index ecb6e21..18ab690 100644
--- a/hw/xquartz/X11Application.m
+++ b/hw/xquartz/X11Application.m
@@ -66,6 +66,8 @@ extern BOOL xpbproxy_init (void);
 int X11EnableKeyEquivalents = TRUE, quartzFullscreenMenu = FALSE;
 int quartzHasRoot = FALSE, quartzEnableRootless = TRUE;
 
+extern Bool noTestExtensions;
+
 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
 static TISInputSourceRef last_key_layout;
 #else
@@ -708,14 +710,16 @@ static NSMutableArray * cfarray_to_nsarray (CFArrayRef in) {
     }
 
     X11EnableKeyEquivalents = [self prefs_get_boolean:@PREFS_KEYEQUIVS
-                               default:X11EnableKeyEquivalents];
+                                              default:X11EnableKeyEquivalents];
 	
     darwinSyncKeymap = [self prefs_get_boolean:@PREFS_SYNC_KEYMAP
-                        default:darwinSyncKeymap];
+                                       default:darwinSyncKeymap];
 		
     darwinDesiredDepth = [self prefs_get_integer:@PREFS_DEPTH
-                          default:darwinDesiredDepth];
-	
+                                         default:darwinDesiredDepth];
+    
+    noTestExtensions = ![self prefs_get_boolean:@PREFS_TEST_EXTENSIONS
+                                        default:FALSE];
 }
 
 /* This will end up at the end of the responder chain. */
diff --git a/hw/xquartz/doc/Xquartz.man.pre b/hw/xquartz/doc/Xquartz.man.pre
index a9f9a58..a442c96 100644
--- a/hw/xquartz/doc/Xquartz.man.pre
+++ b/hw/xquartz/doc/Xquartz.man.pre
@@ -71,6 +71,9 @@ Update the the OSX NSPasteboard when the X11 CLIPBOARD is updated.  Note that en
 .TP 8
 .B defaults write org.x.X11 sync_primary_on_select -boolean true
 This option defaults to false and is provided only "for experts."  It updates the NSPasteboard whenever a new X11 selection is made (rather than requiring you to hit cmd-c to copy the selection to the NSPasteboard).  Since the X11 protocol does not require applications to send notification when they change selection, this might not work in all cases (if you run into this problem, try selecting text in another application first, then selecting the text you want).
+.TP 8
+.B defaults write org.x.X11 enable_test_extensions -boolean true
+This option defaults to false and is only accessible through the command line.  Enable this option to turn on the DEC-XTRAP, RECORD, and XTEST extensions in the server.
 .SH OPTIONS
 .PP
 In addition to the normal server options described in the \fIXserver(1)\fP
diff --git a/hw/xquartz/mach-startup/Makefile.am b/hw/xquartz/mach-startup/Makefile.am
index 5bcd07b..65ee2fa 100644
--- a/hw/xquartz/mach-startup/Makefile.am
+++ b/hw/xquartz/mach-startup/Makefile.am
@@ -39,6 +39,11 @@ X11_LDFLAGS += \
 	-Wl,-framework,OpenGL
 endif
 
+if RECORD
+X11_LDADD += \
+	$(top_builddir)/record/librecord.la
+endif
+
 bin_PROGRAMS = Xquartz
 
 dist_Xquartz_SOURCES = \
commit e8151e534690b78ffbdb5a144524268fd6ebe2b1
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Fri Nov 28 11:18:14 2008 -0800

    XQuartz: Avoid some warning messages being spewed to system.log by AppKit
    (cherry picked from commit 780eff230ce41ad785e54d61a82c731269ae0446)

diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m
index 9f5d3b6..ecb6e21 100644
--- a/hw/xquartz/X11Application.m
+++ b/hw/xquartz/X11Application.m
@@ -964,7 +964,9 @@ extern int darwin_modifier_flags; // darwinEvents.c
         handle_mouse:
             pDev = darwinPointer;
 
-            if([e subtype] == NSTabletProximityEventSubtype) {
+            /* NSTabletPoint can have no subtype */
+            if([e type] != NSTabletPoint &&
+               [e subtype] == NSTabletProximityEventSubtype) {
                 switch([e pointingDeviceType]) {
                     case NSEraserPointingDevice:
                         darwinTabletCurrent=darwinTabletEraser;
commit a39d43bd018fdb2db14214cddfb49c25b0219fcf
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Fri Nov 28 01:45:37 2008 -0800

    XQuarz: Setup our PATH and PWD earlier, so our initial client benefits from it as well...
    (cherry picked from commit cbae2b447357b3fed6ff19414c60dd3792045600)

diff --git a/hw/xquartz/X11Controller.m b/hw/xquartz/X11Controller.m
index 233fd4f..67a80d3 100644
--- a/hw/xquartz/X11Controller.m
+++ b/hw/xquartz/X11Controller.m
@@ -34,8 +34,6 @@
 #include <dix-config.h>
 #endif
 
-#define DEFAULT_PATH "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11/bin"
-
 #include "quartzCommon.h"
 
 #import "X11Controller.h"
@@ -362,18 +360,7 @@ BOOL xquartz_resetenv_display = NO;
     snprintf(buf, sizeof(buf), ":%s", display);
 	setenv("DISPLAY", buf, TRUE);
       }
-	
-      temp = getenv("PATH");
-      if (temp == NULL || temp[0] == 0) 
-	setenv ("PATH", DEFAULT_PATH, TRUE);
-      else if (strnstr(temp, "/usr/X11/bin", sizeof(temp)) == NULL) {
-	snprintf(buf, sizeof(buf), "%s:/usr/X11/bin", temp);            
-	setenv("PATH", buf, TRUE);      
-      }
-      /* cd $HOME */
-      temp = getenv("HOME");
-      if (temp != NULL && temp[0]!=0) chdir(temp);
-	
+
       execvp(argv[0], (char **const) argv);
 	
       _exit(2);
diff --git a/hw/xquartz/mach-startup/Makefile.am b/hw/xquartz/mach-startup/Makefile.am
index 64a53f3..5bcd07b 100644
--- a/hw/xquartz/mach-startup/Makefile.am
+++ b/hw/xquartz/mach-startup/Makefile.am
@@ -1,6 +1,7 @@
 AM_CPPFLAGS = \
 	-DBUILD_DATE=\"$(BUILD_DATE)\" \
-	-DXSERVER_VERSION=\"$(VERSION)\"
+	-DXSERVER_VERSION=\"$(VERSION)\" \
+	-DX11BINDIR=\"$(bindir)\"
 
 x11appdir = $(APPLE_APPLICATIONS_DIR)/X11.app/Contents/MacOS
 x11app_PROGRAMS = X11
diff --git a/hw/xquartz/mach-startup/bundle-main.c b/hw/xquartz/mach-startup/bundle-main.c
index e58277a..2fcd35b 100644
--- a/hw/xquartz/mach-startup/bundle-main.c
+++ b/hw/xquartz/mach-startup/bundle-main.c
@@ -419,6 +419,28 @@ int startup_trigger(int argc, char **argv, char **envp) {
     return execute(command_from_prefs("startx_script", DEFAULT_STARTX));
 }
 
+/** Setup the environment we want our child processes to inherit */
+static void setup_env() {
+    char buf[1024], *temp;
+
+    /* Make sure /usr/X11/bin is in the $PATH */
+    temp = getenv("PATH");
+    if(temp == NULL || temp[0] == 0) {
+        snprintf(buf, sizeof(buf), "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:%s", X11BINDIR);
+        setenv("PATH", buf, TRUE);
+    } else if(strnstr(temp, X11BINDIR, sizeof(temp)) == NULL) {
+        snprintf(buf, sizeof(buf), "%s:%s", temp, X11BINDIR);
+        setenv("PATH", buf, TRUE);
+    }
+
+    fprintf(stderr, "PATH: %s\n", getenv("PATH"));
+    
+    /* cd $HOME */
+    temp = getenv("HOME");
+    if(temp != NULL && temp[0] != '\0')
+        chdir(temp);
+}
+
 /*** Main ***/
 int main(int argc, char **argv, char **envp) {
     Bool listenOnly = FALSE;
@@ -427,7 +449,10 @@ int main(int argc, char **argv, char **envp) {
     mach_port_t mp;
     kern_return_t kr;
 
-    // The server must not run the PanoramiX operations.
+    /* Setup our environment for our children */
+    setup_env();
+    
+    /* The server must not run the PanoramiX operations. */
     noPanoramiXExtension = TRUE;
 
     /* Setup the initial crasherporter info */
commit 45fd0b681d4b12458471901ea0cc21f1090f7a1f
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Wed Nov 26 12:15:58 2008 -0800

    XQuartz: Fix dead-acute on Greek keyboards
    (cherry picked from commit 807f2ec35c5f95b56b3e2b5eac51aec300fe5cb6)

diff --git a/hw/xquartz/quartzKeyboard.c b/hw/xquartz/quartzKeyboard.c
index 0ee3801..7159d01 100644
--- a/hw/xquartz/quartzKeyboard.c
+++ b/hw/xquartz/quartzKeyboard.c
@@ -145,8 +145,9 @@ const static struct {
     KeySym normal, dead;
 } dead_keys[] = {
     {XK_grave, XK_dead_grave},
-    {XK_apostrophe, XK_dead_acute},         /* "=" on a Czech keyboard */
+    {XK_apostrophe, XK_dead_acute},             /* US:"=" on a Czech keyboard */
     {XK_acute, XK_dead_acute},
+    {UKEYSYM (0x384), XK_dead_acute},           /* US:";" on a Greek keyboard */
     {XK_asciicircum, XK_dead_circumflex},
     {UKEYSYM (0x2c6), XK_dead_circumflex},	/* MODIFIER LETTER CIRCUMFLEX ACCENT */
     {XK_asciitilde, XK_dead_tilde},
commit 03fd0ba554f197f4d50a01593b8892f9cb98c5d4
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Wed Nov 26 12:07:52 2008 -0800

    XQuartz: Fix Czech keyboard dead-acute
    (cherry picked from commit 771df2786bc60389489f0967e705c7c95bdda085)

diff --git a/hw/xquartz/quartzKeyboard.c b/hw/xquartz/quartzKeyboard.c
index 40f4216..0ee3801 100644
--- a/hw/xquartz/quartzKeyboard.c
+++ b/hw/xquartz/quartzKeyboard.c
@@ -145,6 +145,7 @@ const static struct {
     KeySym normal, dead;
 } dead_keys[] = {
     {XK_grave, XK_dead_grave},
+    {XK_apostrophe, XK_dead_acute},         /* "=" on a Czech keyboard */
     {XK_acute, XK_dead_acute},
     {XK_asciicircum, XK_dead_circumflex},
     {UKEYSYM (0x2c6), XK_dead_circumflex},	/* MODIFIER LETTER CIRCUMFLEX ACCENT */
commit 4fa7d91710b56445b40209b787c66b358b2f8d3d
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Tue Nov 25 20:14:37 2008 -0800

    XQuartz: Fix an uninitialized keyboard_type on Tiger
    (cherry picked from commit 27b1a5eb3482052253ebdce1a09aedf05ac1b099)

diff --git a/hw/xquartz/quartzKeyboard.c b/hw/xquartz/quartzKeyboard.c
index e192dff..40f4216 100644
--- a/hw/xquartz/quartzKeyboard.c
+++ b/hw/xquartz/quartzKeyboard.c
@@ -571,7 +571,7 @@ Bool QuartzReadSystemKeymap(darwinKeyboardInfo *info) {
 #endif
     const void *chr_data = NULL;
     int num_keycodes = NUM_KEYCODES;
-    UInt32 keyboard_type = 0;
+    UInt32 keyboard_type = LMGetKbdType();
     int i, j;
     OSStatus err;
     KeySym *k;
@@ -579,7 +579,6 @@ Bool QuartzReadSystemKeymap(darwinKeyboardInfo *info) {
 
 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
     TISInputSourceRef currentKeyLayoutRef = TISCopyCurrentKeyboardLayoutInputSource();
-    keyboard_type = LMGetKbdType();
 
     if (currentKeyLayoutRef) {
       currentKeyLayoutDataRef = (CFDataRef )TISGetInputSourceProperty(currentKeyLayoutRef, kTISPropertyUnicodeKeyLayoutData);


More information about the xorg-commit mailing list