xserver: Branch 'server-1.17-branch' - 10 commits

Jeremy Huddleston jeremyhu at kemper.freedesktop.org
Mon Oct 19 11:10:58 PDT 2015


 dev/null                         |binary
 hw/xquartz/GL/indirect.c         |   37 +++++++++++++++++++++++++++++++------
 hw/xquartz/X11Application.m      |   27 +++++++++++++++++----------
 hw/xquartz/X11Controller.m       |   13 ++++++-------
 hw/xquartz/bundle/Info.plist.cpp |   13 +++++++++++++
 hw/xquartz/bundle/Makefile.am    |   30 ------------------------------
 hw/xquartz/bundle/mk_bundke.sh   |    2 +-
 hw/xquartz/darwinEvents.c        |   11 ++++-------
 hw/xquartz/quartzKeyboard.c      |    2 ++
 9 files changed, 74 insertions(+), 61 deletions(-)

New commits:
commit eb9dea1e25388a8fdc31b9b138bd5ece32a3eb54
Author: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
Date:   Sun Oct 18 23:01:53 2015 -0700

    XQuartz: Cleanup formatting of DarwinEQInit that was butchered by automation a few years ago
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
    (cherry picked from commit 27ad21254f257bac6c647315d749ee69f20c24e0)

diff --git a/hw/xquartz/darwinEvents.c b/hw/xquartz/darwinEvents.c
index f66cb0d..6964e20 100644
--- a/hw/xquartz/darwinEvents.c
+++ b/hw/xquartz/darwinEvents.c
@@ -367,14 +367,12 @@ DarwinEQInit(void)
 {
     int *p;
 
-    for (p = darwin_x11_modifier_mask_list, darwin_all_modifier_mask = 0; *p;
-         p++) {
+    for (p = darwin_x11_modifier_mask_list; *p; p++) {
         darwin_x11_modifier_mask |= *p;
     }
 
-    for (p = darwin_all_modifier_mask_additions,
-         darwin_all_modifier_mask = darwin_x11_modifier_mask;
-         *p; p++) {
+    darwin_all_modifier_mask = darwin_x11_modifier_mask;
+    for (p = darwin_all_modifier_mask_additions; *p; p++) {
         darwin_all_modifier_mask |= *p;
     }
 
@@ -387,7 +385,6 @@ DarwinEQInit(void)
      */
     if (!darwinEvents) {
         darwinEvents = InitEventList(GetMaximumEventsNum());
-        ;
 
         if (!darwinEvents)
             FatalError("Couldn't allocate event buffer\n");
commit 5e7aaf5e93e51e79548da46381c91d0efc4d9885
Author: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
Date:   Sun Oct 18 23:03:23 2015 -0700

    XQuartz: Make sure that darwin_all_modifier_mask_additions is 0-terminated
    
    Found by ASan
    
    X.Org X Server 1.17.99.901 Build Date: 20151018
    ================================================================
    ==40471==ERROR: AddressSanitizer: global-buffer-overflow on address 0x000101fed7a4 at pc 0x000101584030 bp 0x70000029f920 sp 0x70000029f918
    READ of size 4 at 0x000101fed7a4 thread T7
        #0 0x10158402f in DarwinEQInit darwinEvents.c:377
        #1 0x10157f3bc in InitInput darwin.c:566
        #2 0x101be87ad in dix_main main.c:268
        #3 0x10159131b in server_thread quartzStartup.c:66
        #4 0x7fff8a535c12 in _pthread_body (/usr/lib/system/libsystem_pthread.dylib+0x3c12)
        #5 0x7fff8a535b8f in _pthread_start (/usr/lib/system/libsystem_pthread.dylib+0x3b8f)
        #6 0x7fff8a533374 in thread_start (/usr/lib/system/libsystem_pthread.dylib+0x1374)
    
    0x000101fed7a4 is located 0 bytes to the right of global variable 'darwin_all_modifier_mask_additions' defined in 'darwinEvents.c:181:12'
    (0x101fed7a0) of size 4
    SUMMARY: AddressSanitizer: global-buffer-overflow darwinEvents.c:377 DarwinEQInit
    Shadow bytes around the buggy address:
      0x1000203fdaa0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
      0x1000203fdab0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
      0x1000203fdac0: f9 f9 f9 f9 00 00 00 00 00 00 f9 f9 f9 f9 f9 f9
      0x1000203fdad0: 00 00 00 00 00 00 00 00 f9 f9 f9 f9 00 00 00 00
      0x1000203fdae0: 00 00 f9 f9 f9 f9 f9 f9 00 00 00 00 00 f9 f9 f9
    =>0x1000203fdaf0: f9 f9 f9 f9[04]f9 f9 f9 f9 f9 f9 f9 00 00 00 00
      0x1000203fdb00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
      0x1000203fdb10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
      0x1000203fdb20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
      0x1000203fdb30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
      0x1000203fdb40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    Shadow byte legend (one shadow byte represents 8 application bytes):
      Addressable:           00
      Partially addressable: 01 02 03 04 05 06 07
      Heap left redzone:       fa
      Heap right redzone:      fb
      Freed heap region:       fd
      Stack left redzone:      f1
      Stack mid redzone:       f2
      Stack right redzone:     f3
      Stack partial redzone:   f4
      Stack after return:      f5
      Stack use after scope:   f8
      Global redzone:          f9
      Global init order:       f6
      Poisoned by user:        f7
      Container overflow:      fc
      Array cookie:            ac
      Intra object redzone:    bb
      ASan internal:           fe
      Left alloca redzone:     ca
      Right alloca redzone:    cb
    Thread T7 created by T0 here:
        #0 0x10242ee99 in wrap_pthread_create
    (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/7.0.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib+0x37e99)
        #1 0x101591089 in create_thread quartzStartup.c:78
        #2 0x101590ed9 in QuartzInitServer quartzStartup.c:95
        #3 0x1015697eb in X11ApplicationMain X11Application.m:1277
        #4 0x101575dc0 in X11ControllerMain X11Controller.m:984
        #5 0x10159171a in server_main quartzStartup.c:127
        #6 0x101540fc0 in do_start_x11_server bundle-main.c:436
        #7 0x101544869 in _Xstart_x11_server mach_startupServer.c:189
        #8 0x101545c96 in mach_startup_server mach_startupServer.c:398
        #9 0x7fff8d1b70f3 in mach_msg_server (/usr/lib/system/libsystem_kernel.dylib+0x110f3)
        #10 0x1015416e7 in main bundle-main.c:774
        #11 0x7fff8bd975ac in start (/usr/lib/system/libdyld.dylib+0x35ac)
        #12 0x0  (<unknown module>)
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
    (cherry picked from commit 3db7e332d374bf8cee581c31b7d50d7ac0509187)

diff --git a/hw/xquartz/darwinEvents.c b/hw/xquartz/darwinEvents.c
index 5a5e4da..f66cb0d 100644
--- a/hw/xquartz/darwinEvents.c
+++ b/hw/xquartz/darwinEvents.c
@@ -178,7 +178,7 @@ static int darwin_x11_modifier_mask_list[] = {
     0
 };
 
-static int darwin_all_modifier_mask_additions[] = { NX_SECONDARYFNMASK, };
+static int darwin_all_modifier_mask_additions[] = { NX_SECONDARYFNMASK, 0 };
 
 static void
 DarwinUpdateModifiers(int pressed,                    // KeyPress or KeyRelease
commit 52506f60b6680e11fa418f4e59e7159eb5b7ec39
Author: Ken Thomases <ken at codeweavers.com>
Date:   Mon Oct 12 16:45:41 2015 -0700

    XQuartz: Fix how we calculate the height of the OSX menu bar
    
    +[NSScreen mainScreen] does not mean the primary display.  It used to mean the
    one with the key window.  When "Displays have separate spaces" is enabled, it
    means the active screen, the one whose menu bar is mostly opaque.  As such, it
    may not be the screen whose lower-left corner is located at (0, 0).  That's
    why its max-Y is not necessarily comparable to its height.  That only works
    for the primary display.
    
    This code could use [[NSScreen screens] firstObject].  This is always the
    primary display, the one whose lower-left corner is at (0, 0).
    
    Once that's done, the above change should be reverted.  The height of the
    visible frame would be the full height of the screen minus the menu bar _and
    the Dock_ if the Dock is along the bottom of the screen.
    
    Actually, there's a theoretically-simpler approach: use
    -[NSMenu menuBarHeight].  That replaces a long-deprecated method
    +[NSMenuView menuBarHeight].  However, there was a bug in Tiger that led to
    the former not working while the latter still worked. I haven't actually
    checked recently.
    
    CrossOver's still-kicking X server code uses this code, which tries all of
    the above:
    
           NSScreen* primaryScreen = [[NSScreen screens] objectAtIndex:0];
           aquaMenuBarHeight = [[NSApp mainMenu] menuBarHeight];
           if (!aquaMenuBarHeight) aquaMenuBarHeight = [NSMenuView menuBarHeight];
           if (!aquaMenuBarHeight) aquaMenuBarHeight =
               NSHeight([primaryScreen frame]) - NSMaxY([primaryScreen visibleFrame]);
    
    Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
    Signed-off-by: Ken Thomases <ken at codeweavers.com>
    (cherry picked from commit 4513f924a7065edbd267cf96837af94ce5a58a6f)

diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m
index 8a928ba..d2c5d30 100644
--- a/hw/xquartz/X11Application.m
+++ b/hw/xquartz/X11Application.m
@@ -1238,8 +1238,16 @@ X11ApplicationMain(int argc, char **argv, char **envp)
     QuartzModeBundleInit();
 
     /* Calculate the height of the menubar so we can avoid it. */
-    aquaMenuBarHeight = NSHeight([[NSScreen mainScreen] frame]) -
-                        NSMaxY([[NSScreen mainScreen] visibleFrame]);
+    aquaMenuBarHeight = [[NSApp mainMenu] menuBarHeight];
+#if ! __LP64__
+    if (!aquaMenuBarHeight) {
+        aquaMenuBarHeight = [NSMenuView menuBarHeight];
+    }
+#endif
+    if (!aquaMenuBarHeight) {
+        NSScreen* primaryScreen = [[NSScreen screens] objectAtIndex:0];
+        aquaMenuBarHeight = NSHeight([primaryScreen frame]) - NSMaxY([primaryScreen visibleFrame]);
+    }
 
 #ifdef HAVE_LIBDISPATCH
     eventTranslationQueue = dispatch_queue_create(
commit 3a7ed42d33d264f7151fa2ed9bef7a55bde1c0e2
Author: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
Date:   Mon Oct 12 02:06:10 2015 -0700

    XQuartz: Remove InfoPlist.strings
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
    (cherry picked from commit 6e6827aac33eddeacfb37ef3d7b0397b1446bf66)

diff --git a/hw/xquartz/bundle/Makefile.am b/hw/xquartz/bundle/Makefile.am
index 87392b4..0740752 100644
--- a/hw/xquartz/bundle/Makefile.am
+++ b/hw/xquartz/bundle/Makefile.am
@@ -30,153 +30,123 @@ EXTRA_DIST = \
 	Info.plist.cpp \
 	PkgInfo \
 	$(resource_DATA) \
-	Resources/ar.lproj/InfoPlist.strings \
 	Resources/ar.lproj/Localizable.strings \
 	Resources/ar.lproj/locversion.plist \
 	Resources/ar.lproj/main.nib/designable.nib \
 	Resources/ar.lproj/main.nib/keyedobjects.nib \
-	Resources/ca.lproj/InfoPlist.strings \
 	Resources/ca.lproj/Localizable.strings \
 	Resources/ca.lproj/locversion.plist \
 	Resources/ca.lproj/main.nib/designable.nib \
 	Resources/ca.lproj/main.nib/keyedobjects.nib \
-	Resources/cs.lproj/InfoPlist.strings \
 	Resources/cs.lproj/Localizable.strings \
 	Resources/cs.lproj/locversion.plist \
 	Resources/cs.lproj/main.nib/designable.nib \
 	Resources/cs.lproj/main.nib/keyedobjects.nib \
-	Resources/da.lproj/InfoPlist.strings \
 	Resources/da.lproj/Localizable.strings \
 	Resources/da.lproj/locversion.plist \
 	Resources/da.lproj/main.nib/designable.nib \
 	Resources/da.lproj/main.nib/keyedobjects.nib \
-	Resources/Dutch.lproj/InfoPlist.strings \
 	Resources/Dutch.lproj/Localizable.strings \
 	Resources/Dutch.lproj/locversion.plist \
 	Resources/Dutch.lproj/main.nib/designable.nib \
 	Resources/Dutch.lproj/main.nib/keyedobjects.nib \
-	Resources/el.lproj/InfoPlist.strings \
 	Resources/el.lproj/Localizable.strings \
 	Resources/el.lproj/locversion.plist \
 	Resources/el.lproj/main.nib/designable.nib \
 	Resources/el.lproj/main.nib/keyedobjects.nib \
-	Resources/English.lproj/InfoPlist.strings \
 	Resources/English.lproj/Localizable.strings \
 	Resources/English.lproj/locversion.plist \
 	Resources/English.lproj/main.nib/designable.nib \
 	Resources/English.lproj/main.nib/keyedobjects.nib \
-	Resources/fi.lproj/InfoPlist.strings \
 	Resources/fi.lproj/Localizable.strings \
 	Resources/fi.lproj/locversion.plist \
 	Resources/fi.lproj/main.nib/designable.nib \
 	Resources/fi.lproj/main.nib/keyedobjects.nib \
-	Resources/French.lproj/InfoPlist.strings \
 	Resources/French.lproj/Localizable.strings \
 	Resources/French.lproj/locversion.plist \
 	Resources/French.lproj/main.nib/designable.nib \
 	Resources/French.lproj/main.nib/keyedobjects.nib \
-	Resources/German.lproj/InfoPlist.strings \
 	Resources/German.lproj/Localizable.strings \
 	Resources/German.lproj/locversion.plist \
 	Resources/German.lproj/main.nib/designable.nib \
 	Resources/German.lproj/main.nib/keyedobjects.nib \
-	Resources/he.lproj/InfoPlist.strings \
 	Resources/he.lproj/Localizable.strings \
 	Resources/he.lproj/locversion.plist \
 	Resources/he.lproj/main.nib/designable.nib \
 	Resources/he.lproj/main.nib/keyedobjects.nib \
-	Resources/hr.lproj/InfoPlist.strings \
 	Resources/hr.lproj/Localizable.strings \
 	Resources/hr.lproj/locversion.plist \
 	Resources/hr.lproj/main.nib/designable.nib \
 	Resources/hr.lproj/main.nib/keyedobjects.nib \
-	Resources/hu.lproj/InfoPlist.strings \
 	Resources/hu.lproj/Localizable.strings \
 	Resources/hu.lproj/locversion.plist \
 	Resources/hu.lproj/main.nib/designable.nib \
 	Resources/hu.lproj/main.nib/keyedobjects.nib \
-	Resources/Italian.lproj/InfoPlist.strings \
 	Resources/Italian.lproj/Localizable.strings \
 	Resources/Italian.lproj/locversion.plist \
 	Resources/Italian.lproj/main.nib/designable.nib \
 	Resources/Italian.lproj/main.nib/keyedobjects.nib \
-	Resources/Japanese.lproj/InfoPlist.strings \
 	Resources/Japanese.lproj/Localizable.strings \
 	Resources/Japanese.lproj/locversion.plist \
 	Resources/Japanese.lproj/main.nib/designable.nib \
 	Resources/Japanese.lproj/main.nib/keyedobjects.nib \
-	Resources/ko.lproj/InfoPlist.strings \
 	Resources/ko.lproj/Localizable.strings \
 	Resources/ko.lproj/locversion.plist \
 	Resources/ko.lproj/main.nib/designable.nib \
 	Resources/ko.lproj/main.nib/keyedobjects.nib \
-	Resources/no.lproj/InfoPlist.strings \
 	Resources/no.lproj/Localizable.strings \
 	Resources/no.lproj/locversion.plist \
 	Resources/no.lproj/main.nib/designable.nib \
 	Resources/no.lproj/main.nib/keyedobjects.nib \
-	Resources/pl.lproj/InfoPlist.strings \
 	Resources/pl.lproj/Localizable.strings \
 	Resources/pl.lproj/locversion.plist \
 	Resources/pl.lproj/main.nib/designable.nib \
 	Resources/pl.lproj/main.nib/keyedobjects.nib \
-	Resources/pt.lproj/InfoPlist.strings \
 	Resources/pt.lproj/Localizable.strings \
 	Resources/pt.lproj/locversion.plist \
 	Resources/pt.lproj/main.nib/designable.nib \
 	Resources/pt.lproj/main.nib/keyedobjects.nib \
-	Resources/pt_PT.lproj/InfoPlist.strings \
 	Resources/pt_PT.lproj/Localizable.strings \
 	Resources/pt_PT.lproj/locversion.plist \
 	Resources/pt_PT.lproj/main.nib/designable.nib \
 	Resources/pt_PT.lproj/main.nib/keyedobjects.nib \
-	Resources/ro.lproj/InfoPlist.strings \
 	Resources/ro.lproj/Localizable.strings \
 	Resources/ro.lproj/locversion.plist \
 	Resources/ro.lproj/main.nib/designable.nib \
 	Resources/ro.lproj/main.nib/keyedobjects.nib \
-	Resources/ru.lproj/InfoPlist.strings \
 	Resources/ru.lproj/Localizable.strings \
 	Resources/ru.lproj/locversion.plist \
 	Resources/ru.lproj/main.nib/designable.nib \
 	Resources/ru.lproj/main.nib/keyedobjects.nib \
-	Resources/sk.lproj/InfoPlist.strings \
 	Resources/sk.lproj/Localizable.strings \
 	Resources/sk.lproj/locversion.plist \
 	Resources/sk.lproj/main.nib/designable.nib \
 	Resources/sk.lproj/main.nib/keyedobjects.nib \
-	Resources/Spanish.lproj/InfoPlist.strings \
 	Resources/Spanish.lproj/Localizable.strings \
 	Resources/Spanish.lproj/locversion.plist \
 	Resources/Spanish.lproj/main.nib/designable.nib \
 	Resources/Spanish.lproj/main.nib/keyedobjects.nib \
-	Resources/sv.lproj/InfoPlist.strings \
 	Resources/sv.lproj/Localizable.strings \
 	Resources/sv.lproj/locversion.plist \
 	Resources/sv.lproj/main.nib/designable.nib \
 	Resources/sv.lproj/main.nib/keyedobjects.nib \
-	Resources/th.lproj/InfoPlist.strings \
 	Resources/th.lproj/Localizable.strings \
 	Resources/th.lproj/locversion.plist \
 	Resources/th.lproj/main.nib/designable.nib \
 	Resources/th.lproj/main.nib/keyedobjects.nib \
-	Resources/tr.lproj/InfoPlist.strings \
 	Resources/tr.lproj/Localizable.strings \
 	Resources/tr.lproj/locversion.plist \
 	Resources/tr.lproj/main.nib/designable.nib \
 	Resources/tr.lproj/main.nib/keyedobjects.nib \
-	Resources/uk.lproj/InfoPlist.strings \
 	Resources/uk.lproj/Localizable.strings \
 	Resources/uk.lproj/locversion.plist \
 	Resources/uk.lproj/main.nib/designable.nib \
 	Resources/uk.lproj/main.nib/keyedobjects.nib \
 	Resources/X11.icns \
-	Resources/zh_CN.lproj/InfoPlist.strings \
 	Resources/zh_CN.lproj/Localizable.strings \
 	Resources/zh_CN.lproj/locversion.plist \
 	Resources/zh_CN.lproj/main.nib/designable.nib \
 	Resources/zh_CN.lproj/main.nib/keyedobjects.nib \
-	Resources/zh_TW.lproj/InfoPlist.strings \
 	Resources/zh_TW.lproj/Localizable.strings \
 	Resources/zh_TW.lproj/locversion.plist \
 	Resources/zh_TW.lproj/main.nib/designable.nib \
diff --git a/hw/xquartz/bundle/Resources/Dutch.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/Dutch.lproj/InfoPlist.strings
deleted file mode 100644
index 8f978d6..0000000
Binary files a/hw/xquartz/bundle/Resources/Dutch.lproj/InfoPlist.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Resources/English.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/English.lproj/InfoPlist.strings
deleted file mode 100644
index 88e1f04..0000000
Binary files a/hw/xquartz/bundle/Resources/English.lproj/InfoPlist.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Resources/French.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/French.lproj/InfoPlist.strings
deleted file mode 100644
index 88e1f04..0000000
Binary files a/hw/xquartz/bundle/Resources/French.lproj/InfoPlist.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Resources/German.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/German.lproj/InfoPlist.strings
deleted file mode 100644
index aa37e75..0000000
Binary files a/hw/xquartz/bundle/Resources/German.lproj/InfoPlist.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Resources/Italian.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/Italian.lproj/InfoPlist.strings
deleted file mode 100644
index 4121698..0000000
Binary files a/hw/xquartz/bundle/Resources/Italian.lproj/InfoPlist.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Resources/Japanese.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/Japanese.lproj/InfoPlist.strings
deleted file mode 100644
index 2d6330f..0000000
Binary files a/hw/xquartz/bundle/Resources/Japanese.lproj/InfoPlist.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Resources/Spanish.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/Spanish.lproj/InfoPlist.strings
deleted file mode 100644
index 0e4287d..0000000
Binary files a/hw/xquartz/bundle/Resources/Spanish.lproj/InfoPlist.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Resources/ar.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/ar.lproj/InfoPlist.strings
deleted file mode 100644
index 88e1f04..0000000
Binary files a/hw/xquartz/bundle/Resources/ar.lproj/InfoPlist.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Resources/ca.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/ca.lproj/InfoPlist.strings
deleted file mode 100644
index 95214ff..0000000
Binary files a/hw/xquartz/bundle/Resources/ca.lproj/InfoPlist.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Resources/cs.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/cs.lproj/InfoPlist.strings
deleted file mode 100644
index 0f74e7c..0000000
Binary files a/hw/xquartz/bundle/Resources/cs.lproj/InfoPlist.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Resources/da.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/da.lproj/InfoPlist.strings
deleted file mode 100644
index 88e1f04..0000000
Binary files a/hw/xquartz/bundle/Resources/da.lproj/InfoPlist.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Resources/el.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/el.lproj/InfoPlist.strings
deleted file mode 100644
index 72eb2b1..0000000
Binary files a/hw/xquartz/bundle/Resources/el.lproj/InfoPlist.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Resources/fi.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/fi.lproj/InfoPlist.strings
deleted file mode 100644
index 8e4f647..0000000
Binary files a/hw/xquartz/bundle/Resources/fi.lproj/InfoPlist.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Resources/he.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/he.lproj/InfoPlist.strings
deleted file mode 100644
index 3dd6946..0000000
Binary files a/hw/xquartz/bundle/Resources/he.lproj/InfoPlist.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Resources/hr.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/hr.lproj/InfoPlist.strings
deleted file mode 100644
index 7baab08..0000000
Binary files a/hw/xquartz/bundle/Resources/hr.lproj/InfoPlist.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Resources/hu.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/hu.lproj/InfoPlist.strings
deleted file mode 100644
index 842ef04..0000000
Binary files a/hw/xquartz/bundle/Resources/hu.lproj/InfoPlist.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Resources/ko.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/ko.lproj/InfoPlist.strings
deleted file mode 100644
index 4c738f8..0000000
Binary files a/hw/xquartz/bundle/Resources/ko.lproj/InfoPlist.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Resources/no.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/no.lproj/InfoPlist.strings
deleted file mode 100644
index eb1cfb0..0000000
Binary files a/hw/xquartz/bundle/Resources/no.lproj/InfoPlist.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Resources/pl.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/pl.lproj/InfoPlist.strings
deleted file mode 100644
index b9c9502..0000000
Binary files a/hw/xquartz/bundle/Resources/pl.lproj/InfoPlist.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Resources/pt.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/pt.lproj/InfoPlist.strings
deleted file mode 100644
index 33c6374..0000000
Binary files a/hw/xquartz/bundle/Resources/pt.lproj/InfoPlist.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Resources/pt_PT.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/pt_PT.lproj/InfoPlist.strings
deleted file mode 100644
index 33c6374..0000000
Binary files a/hw/xquartz/bundle/Resources/pt_PT.lproj/InfoPlist.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Resources/ro.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/ro.lproj/InfoPlist.strings
deleted file mode 100644
index dba225f..0000000
Binary files a/hw/xquartz/bundle/Resources/ro.lproj/InfoPlist.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Resources/ru.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/ru.lproj/InfoPlist.strings
deleted file mode 100644
index 7f722e4..0000000
Binary files a/hw/xquartz/bundle/Resources/ru.lproj/InfoPlist.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Resources/sk.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/sk.lproj/InfoPlist.strings
deleted file mode 100644
index 53b3005..0000000
Binary files a/hw/xquartz/bundle/Resources/sk.lproj/InfoPlist.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Resources/sv.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/sv.lproj/InfoPlist.strings
deleted file mode 100644
index 1522655..0000000
Binary files a/hw/xquartz/bundle/Resources/sv.lproj/InfoPlist.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Resources/th.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/th.lproj/InfoPlist.strings
deleted file mode 100644
index 51d294b..0000000
Binary files a/hw/xquartz/bundle/Resources/th.lproj/InfoPlist.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Resources/tr.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/tr.lproj/InfoPlist.strings
deleted file mode 100644
index 2e003a7..0000000
Binary files a/hw/xquartz/bundle/Resources/tr.lproj/InfoPlist.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Resources/uk.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/uk.lproj/InfoPlist.strings
deleted file mode 100644
index 1153eaf..0000000
Binary files a/hw/xquartz/bundle/Resources/uk.lproj/InfoPlist.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Resources/zh_CN.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/zh_CN.lproj/InfoPlist.strings
deleted file mode 100644
index b5df368..0000000
Binary files a/hw/xquartz/bundle/Resources/zh_CN.lproj/InfoPlist.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/Resources/zh_TW.lproj/InfoPlist.strings b/hw/xquartz/bundle/Resources/zh_TW.lproj/InfoPlist.strings
deleted file mode 100644
index d56e1de..0000000
Binary files a/hw/xquartz/bundle/Resources/zh_TW.lproj/InfoPlist.strings and /dev/null differ
diff --git a/hw/xquartz/bundle/mk_bundke.sh b/hw/xquartz/bundle/mk_bundke.sh
index 288c6a9..632e5f7 100755
--- a/hw/xquartz/bundle/mk_bundke.sh
+++ b/hw/xquartz/bundle/mk_bundke.sh
@@ -12,7 +12,7 @@ for lang in ${localities} ; do
     mkdir -p ${BUNDLE_ROOT}/Contents/Resources/${lang}.lproj/main.nib
     [ -d ${BUNDLE_ROOT}/Contents/Resources/${lang}.lproj/main.nib ] || exit 1
 
-    for f in InfoPlist.strings Localizable.strings main.nib/keyedobjects.nib ; do
+    for f in Localizable.strings main.nib/keyedobjects.nib ; do
         install -m 644 ${SRCDIR}/Resources/${lang}.lproj/$f ${BUNDLE_ROOT}/Contents/Resources/${lang}.lproj/${f}
     done
 done
commit d939043594fe75c49f356e717f94195050f6d08c
Author: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
Date:   Mon Oct 12 02:04:11 2015 -0700

    XQuartz: Relax App Transport Security for communicating with the update server
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
    (cherry picked from commit df80e2649aa47957986554928e6bf41b86c15240)

diff --git a/hw/xquartz/bundle/Info.plist.cpp b/hw/xquartz/bundle/Info.plist.cpp
index a0d9050..06e33f8 100644
--- a/hw/xquartz/bundle/Info.plist.cpp
+++ b/hw/xquartz/bundle/Info.plist.cpp
@@ -35,6 +35,19 @@
 		<string>sparkle.pem</string>
         <key>SUFeedURL</key>
                 <string>http://xquartz.macosforge.org/downloads/sparkle/release.xml</string>
+	<key>NSAppTransportSecurity</key>
+	<dict>
+		<key>NSExceptionDomains</key>
+		<dict>
+			<key>macosforge.org</key>
+			<dict>
+				<key>NSIncludesSubdomains</key>
+				<true/>
+				<key>NSExceptionAllowsInsecureHTTPLoads</key>
+				<true/>
+			</dict>
+		</dict>
+	</dict>
 #endif
 	<key>LSApplicationCategoryType</key>
 		<string>public.app-category.utilities</string>
commit ba00d8fe70cbb16e45e578437defaf3eed6d25f4
Author: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
Date:   Tue Jun 9 23:41:12 2015 -0700

    XQuartz: Silence -Wformat-security for NSRunAlertPanel
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
    (cherry picked from commit 9003a3e5c55903ce4e371b2d5cb5030b5f97ae0e)

diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m
index 2efbd65..8a928ba 100644
--- a/hw/xquartz/X11Application.m
+++ b/hw/xquartz/X11Application.m
@@ -1069,12 +1069,12 @@ X11ApplicationCanEnterRandR(void)
     if (!XQuartzIsRootless)
         QuartzShowFullscreen(FALSE);
 
-    switch (NSRunAlertPanel(title, msg,
+    switch (NSRunAlertPanel(title, @"%@",
                             NSLocalizedString(@"Allow",
                                               @""),
                             NSLocalizedString(@"Cancel",
                                               @""),
-                            NSLocalizedString(@"Always Allow", @""))) {
+                            NSLocalizedString(@"Always Allow", @""), msg)) {
     case NSAlertOtherReturn:
         [X11App prefs_set_boolean:@PREFS_NO_RANDR_ALERT value:YES];
         [X11App prefs_synchronize];
@@ -1122,10 +1122,10 @@ X11ApplicationFatalError(const char *f, va_list args)
      */
     dispatch_sync(dispatch_get_main_queue(), ^{
                       if (NSAlertDefaultReturn ==
-                          NSRunAlertPanel (title, msg,
+                          NSRunAlertPanel (title, @"%@",
                                            NSLocalizedString (@"Quit", @""),
-                                           NSLocalizedString (
-                                               @"Report...", @""), nil)) {
+                                           NSLocalizedString (@"Report...", @""),
+                                           nil, msg)) {
                           exit (EXIT_FAILURE);
                       }
                   });
@@ -1160,9 +1160,8 @@ check_xinitrc(void)
             @"Startup xinitrc dialog");
 
     if (NSAlertDefaultReturn ==
-        NSRunAlertPanel(nil, msg, NSLocalizedString(@"Yes", @""),
-                        NSLocalizedString(@"No",
-                                          @""), nil)) {
+        NSRunAlertPanel(nil, @"%@", NSLocalizedString(@"Yes", @""),
+                        NSLocalizedString(@"No", @""), nil, msg)) {
         char buf2[1024];
         int i = -1;
 
diff --git a/hw/xquartz/X11Controller.m b/hw/xquartz/X11Controller.m
index a5c5138..c75493c 100644
--- a/hw/xquartz/X11Controller.m
+++ b/hw/xquartz/X11Controller.m
@@ -929,9 +929,9 @@ extern char *bundle_id_prefix;
      *        and then run the alert on a timer? It seems to work here, so..
      */
 
-    return (NSRunAlertPanel(title, msg, NSLocalizedString(@"Quit", @""),
-                            NSLocalizedString(@"Cancel", @""), nil)
-            == NSAlertDefaultReturn) ? NSTerminateNow : NSTerminateCancel;
+    NSInteger result = NSRunAlertPanel(title, @"%@", NSLocalizedString(@"Quit", @""),
+                                       NSLocalizedString(@"Cancel", @""), nil, msg);
+    return (result == NSAlertDefaultReturn) ? NSTerminateNow : NSTerminateCancel;
 }
 
 - (void) applicationWillTerminate:(NSNotification *)aNotification _X_NORETURN
commit 434890171d5ab4ec61a05596cb33e469a61a870c
Author: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
Date:   Tue Jun 9 23:34:50 2015 -0700

    XQuartz: Silence -Wunused-function
    
    quartzKeyboard.c:741:1: warning: unused function 'macroman2ucs' [-Wunused-function,Unused Entity Issue]
    macroman2ucs(unsigned char c)
    ^
    1 warning generated.
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
    (cherry picked from commit 3a6fa115759c787ec34483437021ad1e55c52423)

diff --git a/hw/xquartz/quartzKeyboard.c b/hw/xquartz/quartzKeyboard.c
index 84e34d9..2fed593 100644
--- a/hw/xquartz/quartzKeyboard.c
+++ b/hw/xquartz/quartzKeyboard.c
@@ -737,6 +737,7 @@ LegalModifier(unsigned int key, DeviceIntPtr pDev)
     return 1;
 }
 
+#if !defined(__LP64__) || MAC_OS_X_VERSION_MIN_REQUIRED < 1050
 static inline UniChar
 macroman2ucs(unsigned char c)
 {
@@ -782,6 +783,7 @@ macroman2ucs(unsigned char c)
     if (c < 128) return c;
     else return table[c - 128];
 }
+#endif
 
 static KeySym
 make_dead_key(KeySym in)
commit 601e9b5f8c147ef4242b4bda76e9a16e3d635370
Author: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
Date:   Tue Jun 9 23:30:50 2015 -0700

    XQuartz: Silence -Wunused-variable
    
    X11Controller.m:939:9: warning: unused variable 'remain' [-Wunused-variable,Unused Entity Issue]
        int remain;
            ^
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
    (cherry picked from commit 9fe7f5ccada37e2d2a2fa92064b92a0334a3fcdd)

diff --git a/hw/xquartz/X11Controller.m b/hw/xquartz/X11Controller.m
index c3c6976..a5c5138 100644
--- a/hw/xquartz/X11Controller.m
+++ b/hw/xquartz/X11Controller.m
@@ -936,7 +936,6 @@ extern char *bundle_id_prefix;
 
 - (void) applicationWillTerminate:(NSNotification *)aNotification _X_NORETURN
 {
-    int remain;
     [X11App prefs_synchronize];
 
     /* shutdown the X server, it will exit () for us. */
commit 414fc605a930c5baa7e65cc303b05f3977b86baf
Author: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
Date:   Tue Jun 9 23:29:40 2015 -0700

    XQuartz: Silence -Wpointer-bool-conversion
    
    X11Controller.m:417:17: error: address of function 'asl_log_descriptor' will always evaluate to 'true'
          [-Werror,-Wpointer-bool-conversion,Value Conversion Issue]
                if (asl_log_descriptor) {
                ~~  ^~~~~~~~~~~~~~~~~~
    X11Controller.m:417:17: note: prefix with the address-of operator to silence this warning [Semantic Issue]
                if (asl_log_descriptor) {
                    ^
                    &
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
    (cherry picked from commit 0b9c32489131a5723bd78decf5d2557b94207cf4)

diff --git a/hw/xquartz/X11Controller.m b/hw/xquartz/X11Controller.m
index 022e832..c3c6976 100644
--- a/hw/xquartz/X11Controller.m
+++ b/hw/xquartz/X11Controller.m
@@ -364,7 +364,7 @@ extern char *bundle_id_prefix;
     }
 
 #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1080
-    if (asl_log_descriptor) {
+    if (&asl_log_descriptor) {
         char *asl_sender;
         aslmsg amsg = asl_new(ASL_TYPE_MSG);
         assert(amsg);
@@ -414,7 +414,7 @@ extern char *bundle_id_prefix;
 
         case 0:                                     /* child2 */
 #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1080
-            if (asl_log_descriptor) {
+            if (&asl_log_descriptor) {
                 /* Replace our stdout/stderr */
                 dup2(stdout_pipe[1], STDOUT_FILENO);
                 dup2(stderr_pipe[1], STDERR_FILENO);
@@ -443,7 +443,7 @@ extern char *bundle_id_prefix;
     }
 
 #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1080
-    if (asl_log_descriptor) {
+    if (&asl_log_descriptor) {
         /* Close the write ends of the pipe */
         close(stdout_pipe[1]);
         close(stderr_pipe[1]);
commit c15e48bb032514f1123f715719c25eaba7e043a7
Author: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
Date:   Sun Jun 1 04:29:19 2014 -0700

    XQuartz: GLX: Use __glXEnableExtension to build extensions list
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
    (cherry picked from commit 3790001ea29658872aebda00a03170e392b47878)

diff --git a/hw/xquartz/GL/indirect.c b/hw/xquartz/GL/indirect.c
index 19b7d86..4e6ab3d 100644
--- a/hw/xquartz/GL/indirect.c
+++ b/hw/xquartz/GL/indirect.c
@@ -52,6 +52,7 @@
 
 #include "visualConfigs.h"
 #include "dri.h"
+#include "extension_string.h"
 
 #include "darwin.h"
 #define GLAQUA_DEBUG_MSG(msg, args ...) ASL_LOG(ASL_LEVEL_DEBUG, "GLXAqua", \
@@ -111,6 +112,10 @@ typedef struct __GLXAquaDrawable __GLXAquaDrawable;
  */
 struct __GLXAquaScreen {
     __GLXscreen base;
+
+    /* Supported GLX extensions */
+    unsigned char glx_enable_bits[__GLX_EXT_BYTES];
+
     int index;
     int num_vis;
 };
@@ -541,13 +546,33 @@ __glXAquaScreenProbe(ScreenPtr pScreen)
 
     screen->base.GLXmajor = 1;
     screen->base.GLXminor = 4;
-    screen->base.GLXextensions = strdup("GLX_SGIX_fbconfig "
-                                        "GLX_SGIS_multisample "
-                                        "GLX_ARB_multisample "
-                                        "GLX_EXT_visual_info "
-                                        "GLX_EXT_import_context ");
 
-    /*We may be able to add more GLXextensions at a later time. */
+    memset(screen->glx_enable_bits, 0, __GLX_EXT_BYTES);
+
+    __glXEnableExtension(screen->glx_enable_bits, "GLX_EXT_visual_info");
+    __glXEnableExtension(screen->glx_enable_bits, "GLX_EXT_visual_rating");
+    __glXEnableExtension(screen->glx_enable_bits, "GLX_EXT_import_context");
+    __glXEnableExtension(screen->glx_enable_bits, "GLX_OML_swap_method");
+    __glXEnableExtension(screen->glx_enable_bits, "GLX_SGIX_fbconfig");
+
+    __glXEnableExtension(screen->glx_enable_bits, "GLX_SGIS_multisample");
+    __glXEnableExtension(screen->glx_enable_bits, "GLX_ARB_multisample");
+
+    //__glXEnableExtension(screen->glx_enable_bits, "GLX_ARB_create_context");
+    //__glXEnableExtension(screen->glx_enable_bits, "GLX_ARB_create_context_profile");
+
+    // Generate the GLX extensions string (overrides that set by __glXScreenInit())
+    {
+        unsigned int buffer_size =
+            __glXGetExtensionString(screen->glx_enable_bits, NULL);
+        if (buffer_size > 0) {
+            free(screen->base.GLXextensions);
+
+            screen->base.GLXextensions = xnfalloc(buffer_size);
+            __glXGetExtensionString(screen->glx_enable_bits,
+                                    screen->base.GLXextensions);
+        }
+    }
 
     return &screen->base;
 }


More information about the xorg-commit mailing list