From 3f3fa08b15956f2e2641d08134b8e486cf0d84d3 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sat, 27 Nov 2010 16:44:32 +0100 Subject: [PATCH] more debug for ClientMessages --- src/handlers.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/handlers.c b/src/handlers.c index 90f6c1b2..36b2a2fd 100644 --- a/src/handlers.c +++ b/src/handlers.c @@ -665,12 +665,18 @@ int handle_expose_event(void *data, xcb_connection_t *conn, xcb_expose_event_t * int handle_client_message(void *data, xcb_connection_t *conn, xcb_client_message_event_t *event) { LOG("ClientMessage for window 0x%08x\n", event->window); if (event->type == atoms[_NET_WM_STATE]) { - if (event->format != 32 || event->data.data32[1] != atoms[_NET_WM_STATE_FULLSCREEN]) + if (event->format != 32 || event->data.data32[1] != atoms[_NET_WM_STATE_FULLSCREEN]) { + DLOG("atom in clientmessage is %d, fullscreen is %d\n", + event->data.data32[1], atoms[_NET_WM_STATE_FULLSCREEN]); + DLOG("not about fullscreen atom\n"); return 0; + } Con *con = con_by_window_id(event->window); - if (con == NULL) + if (con == NULL) { + DLOG("Could not get window for client message\n"); return 0; + } /* Check if the fullscreen state should be toggled */ if ((con->fullscreen_mode != CF_NONE && @@ -678,8 +684,10 @@ int handle_client_message(void *data, xcb_connection_t *conn, xcb_client_message event->data.data32[0] == _NET_WM_STATE_TOGGLE)) || (con->fullscreen_mode == CF_NONE && (event->data.data32[0] == _NET_WM_STATE_ADD || - event->data.data32[0] == _NET_WM_STATE_TOGGLE))) - con_toggle_fullscreen(con); + event->data.data32[0] == _NET_WM_STATE_TOGGLE))) { + DLOG("toggling fullscreen\n"); + con_toggle_fullscreen(con); + } tree_render(); x_push_changes(croot); -- 2.39.5