From 02aa9820c07a474ef65c1113d4bdfe0e44fde6b5 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Sun, 12 Sep 2010 18:34:56 +0000 Subject: [PATCH] add debugging printf function for hunting down focus switching bugs, requires -DPRINT_LOTS_OF_DEBUG SVN revision: 52170 --- src/bin/e_border.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/bin/e_border.c b/src/bin/e_border.c index 05ef9b29c..8adb4e020 100644 --- a/src/bin/e_border.c +++ b/src/bin/e_border.c @@ -18,6 +18,7 @@ /* local subsystem functions */ static void _e_border_free(E_Border *bd); static void _e_border_del(E_Border *bd); +static void _e_border_print(E_Border *bd, const char *func); /* FIXME: these likely belong in a separate icccm/client handler */ /* and the border needs to become a dumb object that just does what its */ @@ -1560,6 +1561,9 @@ e_border_raise_latest_set(E_Border *bd) EAPI void e_border_focus_set_with_pointer(E_Border *bd) { +#ifdef PRINT_LOTS_OF_DEBUG + _e_border_print(bd); +#endif /* note: this is here as it seems there are enough apps that do not even * expect us to emulate a look of focus but not actually set x input * focus as we do - so simply abort any focuse set on such windows */ @@ -1576,6 +1580,7 @@ e_border_focus_set_with_pointer(E_Border *bd) if (!ecore_x_pointer_grab(bd->zone->container->win)) return; */ + if (e_config->focus_policy == E_FOCUS_SLOPPY) { if (e_border_under_pointer_get(bd->desk, bd)) @@ -4035,6 +4040,20 @@ _e_border_del(E_Border *bd) } } +static void +_e_border_print(E_Border *bd, const char *func) +{ + if (!bd) return; + + printf("*Window Info*" + "\tPointer: %p\n" + "\tName: %s\n" + "\tTitle: %s\n" + "\tBorderless: %s\n", + bd, bd->client.icccm.name, bd->client.icccm.title, + bd->borderless ? "TRUE" : "FALSE"); +} + static Eina_Bool _e_border_cb_window_show_request(void *data __UNUSED__, int ev_type __UNUSED__, void *ev) {