xserver: Branch 'xorg-server-1.4-apple' - 3 commits
Jeremy Huddleston
jeremyhu at kemper.freedesktop.org
Fri Aug 8 01:17:32 PDT 2008
configure.ac | 2 -
dix/getevents.c | 2 +
hw/xquartz/quartzKeyboard.c | 47 +++++++++++++++++++++++++++++++++++++++++---
3 files changed, 47 insertions(+), 4 deletions(-)
New commits:
commit c6d92c5206c17f1fe0cc77fef86153378cbd2767
Author: Peter Hutterer <peter.hutterer at redhat.com>
Date: Fri Aug 8 17:37:06 2008 +0930
dix: don't try to create events if we don't have a screen. #16898
A NULL screen may happen during server shutdown, when the output has been shut
down but the devices still generate events.
X.Org Bug 16898 <http://bugs.freedesktop.org/show_bug.cgi?id=16898>
(cherry picked from commit 465a9bb96e8a90e53e655b3245e22910201786d7)
diff --git a/dix/getevents.c b/dix/getevents.c
index cdfabd3..790e7b8 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -535,6 +535,8 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons,
ScreenPtr scr = miPointerGetScreen(pDev);
/* Sanity checks. */
+ if (!scr) /* can happen during server shutdown */
+ return 0;
if (type != MotionNotify && type != ButtonPress && type != ButtonRelease)
return 0;
commit 745f476049dac5f519f250f7c431e46f33034930
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date: Fri Aug 8 00:20:59 2008 -0700
1.4.2-apple6
diff --git a/configure.ac b/configure.ac
index e964b05..2dca9ec 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-apple5, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
+AC_INIT([xorg-server], 1.4.2-apple6, [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 5854e712e9ebc210d2f8de6f5d4fb650944f314a
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date: Fri Aug 8 00:19:41 2008 -0700
XQuartz: Re-added deprecated code fallback failsafe for keyboard layout on Leopard with some debugging spew.
diff --git a/hw/xquartz/quartzKeyboard.c b/hw/xquartz/quartzKeyboard.c
index 5e7a13c..0bfb50b 100644
--- a/hw/xquartz/quartzKeyboard.c
+++ b/hw/xquartz/quartzKeyboard.c
@@ -71,6 +71,8 @@
#include "X11/keysym.h"
#include "keysym2ucs.h"
+#include <Availability.h>
+
void QuartzXkbUpdate(DeviceIntPtr pDev);
enum {
@@ -1090,6 +1092,7 @@ Bool LegalModifier(unsigned int key, DeviceIntPtr pDev)
/* TODO: Not thread safe */
unsigned int QuartzSystemKeymapSeed(void) {
static unsigned int seed = 0;
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
static TISInputSourceRef last_key_layout = NULL;
TISInputSourceRef key_layout;
@@ -1106,7 +1109,15 @@ unsigned int QuartzSystemKeymapSeed(void) {
} else {
last_key_layout = key_layout;
}
+#else
+ static KeyboardLayoutRef last_key_layout;
+ KeyboardLayoutRef key_layout;
+ KLGetCurrentKeyboardLayout (&key_layout);
+ if (key_layout != last_key_layout)
+ seed++;
+ last_key_layout = key_layout;
+#endif
return seed;
}
@@ -1148,6 +1159,9 @@ static KeySym make_dead_key(KeySym in) {
}
Bool QuartzReadSystemKeymap(darwinKeyboardInfo *info) {
+#if __MAC_OS_X_VERSION_MIN_REQUIRED < 1060
+ KeyboardLayoutRef key_layout;
+#endif
const void *chr_data = NULL;
int num_keycodes = NUM_KEYCODES;
UInt32 keyboard_type = 0;
@@ -1156,17 +1170,44 @@ Bool QuartzReadSystemKeymap(darwinKeyboardInfo *info) {
KeySym *k;
TISInputSourceRef currentKeyLayoutRef = TISCopyCurrentKeyboardLayoutInputSource();
- keyboard_type = LMGetKbdType ();
+ keyboard_type = LMGetKbdType();
+
if (currentKeyLayoutRef) {
CFDataRef currentKeyLayoutDataRef = (CFDataRef )TISGetInputSourceProperty(currentKeyLayoutRef, kTISPropertyUnicodeKeyLayoutData);
- if (currentKeyLayoutDataRef) chr_data = CFDataGetBytePtr(currentKeyLayoutDataRef);
+ if (currentKeyLayoutDataRef)
+ chr_data = CFDataGetBytePtr(currentKeyLayoutDataRef);
+ }
+
+#if __MAC_OS_X_VERSION_MIN_REQUIRED < 1060
+ 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: Debug Info: currentKeyLayoutRef=%p, chr_data=%p\n", currentKeyLayoutRef, chr_data);
+
+ KLGetCurrentKeyboardLayout (&key_layout);
+ KLGetKeyboardLayoutProperty (key_layout, kKLuchrData, &chr_data);
+
+ if(chr_data != NULL) {
+ ErrorF("X11.app: Fallback succeeded, but this is still a bug. Please report the above information.\n");
+ }
}
if (chr_data == NULL) {
+ ErrorF("X11.app: Debug Info: kKLuchrData fallback failed, trying kKLKCHRData.\n", currentKeyLayoutRef, chr_data);
+ KLGetKeyboardLayoutProperty (key_layout, kKLKCHRData, &chr_data);
+ is_uchr = 0;
+ num_keycodes = 128;
+
+ 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 ( "Couldn't get uchr or kchr resource\n");
return FALSE;
}
-
+
/* Scan the keycode range for the Unicode character that each
key produces in the four shift states. Then convert that to
an X11 keysym (which may just the bit that says "this is
More information about the xorg-commit
mailing list