xserver: Branch 'master' - 5 commits
Keith Packard
keithp at kemper.freedesktop.org
Mon Jun 29 20:58:10 PDT 2015
hw/xquartz/GL/indirect.c | 37 +++++++++++++++++++++++++++++++------
hw/xquartz/X11Application.m | 15 +++++++--------
hw/xquartz/X11Controller.m | 13 ++++++-------
hw/xquartz/quartzKeyboard.c | 2 ++
4 files changed, 46 insertions(+), 21 deletions(-)
New commits:
commit 9003a3e5c55903ce4e371b2d5cb5030b5f97ae0e
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>
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 3a6fa115759c787ec34483437021ad1e55c52423
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>
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 9fe7f5ccada37e2d2a2fa92064b92a0334a3fcdd
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>
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 0b9c32489131a5723bd78decf5d2557b94207cf4
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>
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 77611066397747411f348e4a77871da5cff3b71e
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>
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