xserver: Branch 'xorg-server-1.4-apple' - 2 commits
Jeremy Huddleston
jeremyhu at kemper.freedesktop.org
Fri Jan 4 23:06:52 PST 2008
hw/xquartz/Makefile.am | 1
hw/xquartz/bundle/Info.plist | 4 -
hw/xquartz/darwin.h | 2
hw/xquartz/xpr/xprScreen.c | 91 +++++++++++++++++++++----------------------
4 files changed, 49 insertions(+), 49 deletions(-)
New commits:
commit fab82c097c738def12ea70c38635b07ada8581c5
Author: Jeremy Huddleston <jeremy at yuffie.local>
Date: Fri Jan 4 22:51:12 2008 -0800
XQuartz: Fixed copyright in About box for 2008. Happy New Year!
diff --git a/hw/xquartz/Makefile.am b/hw/xquartz/Makefile.am
index 1f19102..9ac6e0a 100644
--- a/hw/xquartz/Makefile.am
+++ b/hw/xquartz/Makefile.am
@@ -3,6 +3,7 @@ AM_CFLAGS = $(XSERVER_CFLAGS) $(DIX_CFLAGS)
AM_OBJCFLAGS = $(XSERVER_CFLAGS) $(DIX_CFLAGS)
AM_CPPFLAGS = \
-DBUILD_DATE=\"$(BUILD_DATE)\" \
+ -DXSERVER_VERSION=\"$(VERSION)\" \
-DINXQUARTZ \
-DUSE_NEW_CLUT \
-DXFree86Server \
diff --git a/hw/xquartz/bundle/Info.plist b/hw/xquartz/bundle/Info.plist
index fce8c96..5babdfe 100644
--- a/hw/xquartz/bundle/Info.plist
+++ b/hw/xquartz/bundle/Info.plist
@@ -25,9 +25,9 @@
<key>CSResourcesFileMapped</key>
<true/>
<key>NSHumanReadableCopyright</key>
- <string>Copyright © 2003-2007, Apple Inc.
+ <string>Copyright © 2003-2008, Apple Inc.
Copyright © 2003, XFree86 Project, Inc.
-Copyright © 2003-2007, X.org Project, Inc.
+Copyright © 2003-2008, X.org Project, Inc.
</string>
<key>NSMainNibFile</key>
<string>main</string>
commit 4790016cc2e90103e308dc87c41df3912e46a1f9
Author: Jeremy Huddleston <jeremy at yuffie.local>
Date: Fri Jan 4 12:23:09 2008 -0800
XQuartz: Flush the debug log for easier debugging
Also cleaned up formatting in xpr's eventHandler
(cherry picked from commit 16861d6d4239c7f3918332ef07752f1e211afb23)
diff --git a/hw/xquartz/darwin.h b/hw/xquartz/darwin.h
index 365f5b7..f516432 100644
--- a/hw/xquartz/darwin.h
+++ b/hw/xquartz/darwin.h
@@ -124,7 +124,7 @@ enum {
#ifdef ENABLE_DEBUG_LOG
extern FILE *debug_log_fp;
#define DEBUG_LOG_NAME "x11-debug.txt"
-#define DEBUG_LOG(msg, args...) if (debug_log_fp) fprintf(debug_log_fp, "%s:%d: " msg, __FUNCTION__, __LINE__, ##args )
+#define DEBUG_LOG(msg, args...) if (debug_log_fp) fprintf(debug_log_fp, "%s:%s:%d " msg, __FILE__, __FUNCTION__, __LINE__, ##args ); fflush(debug_log_fp);
#else
#define DEBUG_LOG(msg, args...)
#endif
diff --git a/hw/xquartz/xpr/xprScreen.c b/hw/xquartz/xpr/xprScreen.c
index 29179e5..e4e1fda 100644
--- a/hw/xquartz/xpr/xprScreen.c
+++ b/hw/xquartz/xpr/xprScreen.c
@@ -62,53 +62,52 @@ static const char *xprOpenGLBundle = "glxCGL.bundle";
* eventHandler
* Callback handler for Xplugin events.
*/
-static void
-eventHandler(unsigned int type, const void *arg,
- unsigned int arg_size, void *data)
-{
+static void eventHandler(unsigned int type, const void *arg,
+ unsigned int arg_size, void *data) {
switch (type) {
- case XP_EVENT_DISPLAY_CHANGED:
- DEBUG_LOG("XP_EVENT_DISPLAY_CHANGED\n");
- QuartzMessageServerThread(kXDarwinDisplayChanged, 0);
- break;
-
- case XP_EVENT_WINDOW_STATE_CHANGED:
- DEBUG_LOG("XP_EVENT_WINDOW_STATE_CHANGED\n");
- if (arg_size >= sizeof(xp_window_state_event)) {
- const xp_window_state_event *ws_arg = arg;
-
- QuartzMessageServerThread(kXDarwinWindowState, 2,
- ws_arg->id, ws_arg->state);
- }
- break;
-
- case XP_EVENT_WINDOW_MOVED:
- DEBUG_LOG("XP_EVENT_WINDOW_MOVED\n");
- if (arg_size == sizeof(xp_window_id)) {
- xp_window_id id = * (xp_window_id *) arg;
- WindowPtr pWin = xprGetXWindow(id);
- QuartzMessageServerThread(kXDarwinWindowMoved, 1, pWin);
- }
- break;
-
- case XP_EVENT_SURFACE_DESTROYED:
- DEBUG_LOG("XP_EVENT_SURFACE_DESTROYED\n");
- case XP_EVENT_SURFACE_CHANGED:
- DEBUG_LOG("XP_EVENT_SURFACE_CHANGED\n");
- if (arg_size == sizeof(xp_surface_id)) {
- int kind;
-
- if (type == XP_EVENT_SURFACE_DESTROYED)
- kind = AppleDRISurfaceNotifyDestroyed;
- else
- kind = AppleDRISurfaceNotifyChanged;
-
- DRISurfaceNotify(*(xp_surface_id *) arg, kind);
- }
- break;
- default:
- ErrorF("Unknown XP_EVENT type (%d) in xprScreen:eventHandler\n",
- type);
+ case XP_EVENT_DISPLAY_CHANGED:
+ DEBUG_LOG("XP_EVENT_DISPLAY_CHANGED\n");
+ QuartzMessageServerThread(kXDarwinDisplayChanged, 0);
+ break;
+
+ case XP_EVENT_WINDOW_STATE_CHANGED:
+ if (arg_size >= sizeof(xp_window_state_event)) {
+ const xp_window_state_event *ws_arg = arg;
+
+ DEBUG_LOG("XP_EVENT_WINDOW_STATE_CHANGED: id=%d, state=%d\n", ws_arg->id, ws_arg->state);
+ QuartzMessageServerThread(kXDarwinWindowState, 2,
+ ws_arg->id, ws_arg->state);
+ } else {
+ DEBUG_LOG("XP_EVENT_WINDOW_STATE_CHANGED: ignored\n");
+ }
+ break;
+
+ case XP_EVENT_WINDOW_MOVED:
+ DEBUG_LOG("XP_EVENT_WINDOW_MOVED\n");
+ if (arg_size == sizeof(xp_window_id)) {
+ xp_window_id id = * (xp_window_id *) arg;
+ WindowPtr pWin = xprGetXWindow(id);
+ QuartzMessageServerThread(kXDarwinWindowMoved, 1, pWin);
+ }
+ break;
+
+ case XP_EVENT_SURFACE_DESTROYED:
+ DEBUG_LOG("XP_EVENT_SURFACE_DESTROYED\n");
+ case XP_EVENT_SURFACE_CHANGED:
+ DEBUG_LOG("XP_EVENT_SURFACE_CHANGED\n");
+ if (arg_size == sizeof(xp_surface_id)) {
+ int kind;
+
+ if (type == XP_EVENT_SURFACE_DESTROYED)
+ kind = AppleDRISurfaceNotifyDestroyed;
+ else
+ kind = AppleDRISurfaceNotifyChanged;
+
+ DRISurfaceNotify(*(xp_surface_id *) arg, kind);
+ }
+ break;
+ default:
+ ErrorF("Unknown XP_EVENT type (%d) in xprScreen:eventHandler\n", type);
}
}
More information about the xorg-commit
mailing list