Skip to content

Commit

Permalink
Added some DEBUG_LOG sauce to the XP_EVENT handling code
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Byer committed Nov 19, 2007
1 parent 920265a commit 3208298
Showing 1 changed file with 34 additions and 34 deletions.
68 changes: 34 additions & 34 deletions hw/darwin/quartz/xpr/xprScreen.c
Expand Up @@ -64,49 +64,49 @@ static void
eventHandler(unsigned int type, const void *arg,
unsigned int arg_size, void *data)
{
switch (type)
{
switch (type) {
case XP_EVENT_DISPLAY_CHANGED:
// ErrorF("XP_EVENT_DISPLAY_MOVED\n");
QuartzMessageServerThread(kXDarwinDisplayChanged, 0);
break;
DEBUG_LOG("XP_EVENT_DISPLAY_CHANGED\n");
QuartzMessageServerThread(kXDarwinDisplayChanged, 0);
break;

case XP_EVENT_WINDOW_STATE_CHANGED:
// ErrorF("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;
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:
// ErrorF("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;

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:
// ErrorF("XP_EVENT_SURFACE_MOVED\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);
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);
}
}

Expand Down

0 comments on commit 3208298

Please sign in to comment.