diff options
author | Jon TURNEY <jon.turney@dronecode.org.uk> | 2012-11-03 18:52:51 +0000 |
---|---|---|
committer | Jon TURNEY <jon.turney@dronecode.org.uk> | 2012-11-21 14:02:48 +0000 |
commit | aa3af5af63897eaa6d7b949d3e11a9a6235e944b (patch) | |
tree | c7b2c9168f8187b3cf5d0b5ced42bcb9411a774d | |
parent | 3ee95391a89a60c7cb19aca113d334d7a457c11f (diff) |
Debug tweaks
-rw-r--r-- | src/libxcwm/atoms.c | 2 | ||||
-rw-r--r-- | src/libxcwm/event_loop.c | 9 | ||||
-rw-r--r-- | src/libxcwm/input.c | 6 | ||||
-rw-r--r-- | src/libxcwm/window.c | 12 |
4 files changed, 13 insertions, 16 deletions
diff --git a/src/libxcwm/atoms.c b/src/libxcwm/atoms.c index 151df24..ad1e7b8 100644 --- a/src/libxcwm/atoms.c +++ b/src/libxcwm/atoms.c @@ -172,6 +172,8 @@ create_wm_cm_window(xcwm_context_t *context) { context->wm_cm_window = xcb_generate_id(context->conn); + printf("Created CM window with XID 0x%08x\n", context->wm_cm_window); + xcb_create_window(context->conn, XCB_COPY_FROM_PARENT, context->wm_cm_window, diff --git a/src/libxcwm/event_loop.c b/src/libxcwm/event_loop.c index 8a59851..745707d 100644 --- a/src/libxcwm/event_loop.c +++ b/src/libxcwm/event_loop.c @@ -203,11 +203,16 @@ run_event_loop(void *thread_arg_struct) xcb_damage_notify_event_t *dmgevnt = (xcb_damage_notify_event_t *)evt; + /* printf("damage %d,%d @ %d,%d reported against window 0x%08x\n", */ + /* dmgevnt->area.width, dmgevnt->area.height, dmgevnt->area.x, dmgevnt->area.y, */ + /* dmgevnt->drawable); */ + return_evt = malloc(sizeof(xcwm_event_t)); return_evt->event_type = XCWM_EVENT_WINDOW_DAMAGE; return_evt->window = _xcwm_get_window_node_by_window_id(dmgevnt->drawable); if (!return_evt->window) { + printf("damage reported against unknown window 0x%08x\n", dmgevnt->drawable); free(return_evt); continue; } @@ -228,6 +233,8 @@ run_event_loop(void *thread_arg_struct) xcb_generate_id(return_evt->window->context->conn); xcb_rectangle_t rect; + printf("initial damage on window 0x%08x\n", dmgevnt->drawable); + /* Remove the damage */ xcb_xfixes_create_region(return_evt->window->context->conn, region, @@ -237,7 +244,7 @@ run_event_loop(void *thread_arg_struct) return_evt->window->damage, region, XCB_NONE); - + /* Add new damage area for entire window */ rect.x = 0; rect.y = 0; diff --git a/src/libxcwm/input.c b/src/libxcwm/input.c index 3efc35a..083b505 100644 --- a/src/libxcwm/input.c +++ b/src/libxcwm/input.c @@ -45,7 +45,7 @@ xcwm_input_key_event(xcwm_context_t *context, uint8_t code, int state) XCB_CURRENT_TIME, none, 0, 0, 1); xcb_flush(context->conn); - printf("Injected key event - key code %i\n", code); + /* printf("Injected key event - key code %i\n", code); */ } void @@ -66,8 +66,8 @@ xcwm_input_mouse_button_event(xcwm_window_t *window, XCB_CURRENT_TIME, window->window_id, 0, 0, 0); xcb_flush(window->context->conn); - printf("Injected mouse event - button %d, state: %d\n", - button, state); + /* printf("Injected mouse event - button %d, state: %d\n", */ + /* button, state); */ } void diff --git a/src/libxcwm/window.c b/src/libxcwm/window.c index 201584f..35714e3 100644 --- a/src/libxcwm/window.c +++ b/src/libxcwm/window.c @@ -79,18 +79,6 @@ xcwm_window_set_to_bottom(xcwm_window_t *window) void xcwm_window_set_input_focus(xcwm_window_t *window) { - - // Test -- David - xcb_get_input_focus_cookie_t cookie = - xcb_get_input_focus(window->context->conn); - xcb_get_input_focus_reply_t *reply = - xcb_get_input_focus_reply(window->context->conn, cookie, NULL); - printf("Focus was in window 0x%08x, now in 0x%08x (window.c)\n", - reply->focus, window->window_id); - free(reply); - - // End test -- David - xcb_set_input_focus(window->context->conn, XCB_INPUT_FOCUS_PARENT, window->window_id, XCB_CURRENT_TIME); xcb_flush(window->context->conn); |