diff options
author | Jon TURNEY <jon.turney@dronecode.org.uk> | 2012-11-06 21:29:55 +0000 |
---|---|---|
committer | Jon TURNEY <jon.turney@dronecode.org.uk> | 2012-11-30 14:26:54 +0000 |
commit | b607176a89cc74e1c001742d6c2b3af65ddf6fc0 (patch) | |
tree | f9f16e587841435f9944115df7ba7e2834ae382d | |
parent | 0d59ca6faadebf658641b1964dbc6e923ff993c4 (diff) |
Debug tweak
-rw-r--r-- | src/main.c | 2 | ||||
-rw-r--r-- | src/wndproc.c | 14 |
2 files changed, 10 insertions, 6 deletions
@@ -44,7 +44,7 @@ eventHandler(const xcwm_event_t *event) xcwm_window_t *window = xcwm_event_get_window(event); xcwm_event_type_t type = xcwm_event_get_type(event); - DEBUG("event %d, window 0x%08x, XID 0x%08x\n", type, window, window->window_id); + // DEBUG("event %d, window 0x%08x, XID 0x%08x\n", type, window, window->window_id); switch (type) { diff --git a/src/wndproc.c b/src/wndproc.c index e64599f..462dc70 100644 --- a/src/wndproc.c +++ b/src/wndproc.c @@ -293,13 +293,17 @@ UpdateImage(xcwm_window_t *window) HWND hWnd = xcwm_window_get_local_data(window); if (hWnd) { + xcwm_rect_t *dmgRect = xcwm_window_get_damaged_rect(window); + // DEBUG("damaged rect is %ldx%ld @ (%ld, %ld)\n", dmgRect->width, dmgRect->height, dmgRect->x, dmgRect->y); + + if (dmgRect->width == 0 || dmgRect->height == 0) { + DEBUG("damaged rect has zero area, %ldx%ld\n", dmgRect->width, dmgRect->height); + } + xcwm_image_t *image; image = xcwm_image_copy_damaged(window); if (image) { - xcwm_rect_t *dmgRect = xcwm_window_get_damaged_rect(window); - // DEBUG("damaged rect is %ldx%ld @ (%ld, %ld)\n", dmgRect->width, dmgRect->height, dmgRect->x, dmgRect->y); - CheckForAlpha(hWnd, image); /* Update the region asked for */ @@ -672,7 +676,7 @@ winStartMousePolling(void) WIN_POLLING_MOUSE_TIMER_ID, MOUSE_POLLING_INTERVAL, winMousePollingTimerProc); - DEBUG("started mouse polling timer, id %d\n", g_uipMousePollingTimerID); + // DEBUG("started mouse polling timer, id %d\n", g_uipMousePollingTimerID); } } @@ -683,7 +687,7 @@ winStopMousePolling(void) if (g_uipMousePollingTimerID != 0) { KillTimer(NULL, g_uipMousePollingTimerID); - DEBUG("stopped mouse polling timer, id %d\n", g_uipMousePollingTimerID); + // DEBUG("stopped mouse polling timer, id %d\n", g_uipMousePollingTimerID); g_uipMousePollingTimerID = 0; } } |