xserver: Branch 'xorg-server-1.4-apple' - 3 commits

Jeremy Huddleston jeremyhu at kemper.freedesktop.org
Wed Aug 20 14:45:42 PDT 2008


 configure.ac                |    2 +-
 hw/xquartz/X11Application.m |   33 ++++++++-------------------------
 hw/xquartz/quartzKeyboard.c |    3 ++-
 3 files changed, 11 insertions(+), 27 deletions(-)

New commits:
commit 4e62596dfc6dae8e39cb3840cf69004f9c6637e7
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Wed Aug 20 14:42:22 2008 -0700

    1.4.2-apple10

diff --git a/configure.ac b/configure.ac
index 1c13cac..642e470 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,7 +26,7 @@ dnl
 dnl Process this file with autoconf to create configure.
 
 AC_PREREQ(2.57)
-AC_INIT([xorg-server], 1.4.2-apple9, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
+AC_INIT([xorg-server], 1.4.2-apple10, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
 AC_CONFIG_SRCDIR([Makefile.am])
 AM_INIT_AUTOMAKE([dist-bzip2 foreign])
 AM_MAINTAINER_MODE
commit 3520386261b838196a8918e8bee16bdccbc9781d
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Wed Aug 20 10:37:17 2008 -0700

    XQuartz: Made X11Application.m a little more tidy.

diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m
index b9f4122..2191092 100644
--- a/hw/xquartz/X11Application.m
+++ b/hw/xquartz/X11Application.m
@@ -66,6 +66,10 @@ X11Application *X11App;
 
 #define ALL_KEY_MASKS (NSShiftKeyMask | NSControlKeyMask | NSAlternateKeyMask | NSCommandKeyMask)
 
+ at interface X11Application (Private)
+- (void) sendX11NSEvent:(NSEvent *)e;
+ at end
+
 @implementation X11Application
 
 typedef struct message_struct message;
@@ -77,8 +81,6 @@ struct message_struct {
 
 static mach_port_t _port;
 
-static void send_nsevent(NSEvent *e);
-
 /* Quartz mode initialization routine. This is often dynamically loaded
    but is statically linked into this X server. */
 Bool QuartzModeBundleInit(void);
@@ -192,11 +194,8 @@ static void message_kit_thread (SEL selector, NSObject *arg) {
 }
 
 - (void) sendEvent:(NSEvent *)e {
-    NSEventType type;
     OSX_BOOL for_appkit, for_x;
     
-    type = [e type];
-    
     /* By default pass down the responder chain and to X. */
     for_appkit = YES;
     for_x = YES;
@@ -302,7 +301,7 @@ static void message_kit_thread (SEL selector, NSObject *arg) {
     
     if (for_appkit) [super sendEvent:e];
     
-    if (for_x) send_nsevent(e);
+    if (for_x) [self sendX11NSEvent:e];
 }
 
 - (void) set_window_menu:(NSArray *)list {
@@ -841,27 +840,10 @@ void X11ApplicationMain (int argc, char **argv, char **envp) {
     /* not reached */
 }
 
-/* event conversion */
-
-static inline unsigned short
-convert_flags (unsigned int nsflags) {
-    unsigned int xflags = 0;
-	
-    if (nsflags == ~0) return 0xffff;
-	
-    if (nsflags & NSAlphaShiftKeyMask)	xflags |= LockMask;
-    if (nsflags & NSShiftKeyMask)	xflags |= ShiftMask;
-    if (nsflags & NSControlKeyMask)	xflags |= ControlMask;
-    if (nsflags & NSAlternateKeyMask)	xflags |= Mod1Mask;
-    if (nsflags & NSCommandKeyMask)	xflags |= Mod2Mask;
-    /* FIXME: secondaryfn? */
-	
-    return xflags;
-}
-
+ at implementation X11Application (Private)
 extern int darwin_modifier_flags; // darwinEvents.c
 
-static void send_nsevent(NSEvent *e) {
+- (void) sendX11NSEvent:(NSEvent *)e {
 	NSRect screen;
 	NSPoint location;
 	NSWindow *window;
@@ -938,3 +920,4 @@ static void send_nsevent(NSEvent *e) {
         default: break; /* for gcc */
 	}	
 }
+ at end
commit fcdc9f8b5abd724d75f53d48fdadbed9859e9e79
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Wed Aug 20 10:21:23 2008 -0700

    XQuartz: Added more explanation to debug keylayout spew to cut down on report-spam.

diff --git a/hw/xquartz/quartzKeyboard.c b/hw/xquartz/quartzKeyboard.c
index ba1ca5a..d5d0280 100644
--- a/hw/xquartz/quartzKeyboard.c
+++ b/hw/xquartz/quartzKeyboard.c
@@ -1192,7 +1192,7 @@ Bool QuartzReadSystemKeymap(darwinKeyboardInfo *info) {
 
 #if !defined(__x86_64__) && !defined(__ppc64__)
     if (chr_data == NULL) {
-        ErrorF("X11.app: Error detected in determining keyboard layout.  Please report this error at http://xquartz.macosforge.org\n");
+        ErrorF("X11.app: Error detected in determining keyboard layout.  If you are using an Apple-provided keyboard layout, please report this error at http://xquartz.macosforge.org and http://bugreport.apple.com\n");
         ErrorF("X11.app: Debug Info: keyboard_type=%u, currentKeyLayoutRef=%p, currentKeyLayoutDataRef=%p, chr_data=%p\n",
                (unsigned)keyboard_type, currentKeyLayoutRef, currentKeyLayoutDataRef, chr_data);
 
@@ -1206,6 +1206,7 @@ Bool QuartzReadSystemKeymap(darwinKeyboardInfo *info) {
 
     if (chr_data == NULL) {
         ErrorF("X11.app: Debug Info: kKLuchrData fallback 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;


More information about the xorg-commit mailing list