diff options
| author | Dana Jansens <danakj@orodu.net> | 2007-05-13 07:38:35 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2007-05-13 07:38:35 +0000 |
| commit | 685dca1c5fb1fac160ad845a710bc2c30ff87751 (patch) | |
| tree | f51369842bd62822d3dbdbd1fbe35adb2dc9e68a /openbox/focus.c | |
| parent | 1e957a168808f0357509300e879c0a7e97b49a24 (diff) | |
likewise if a window is unmanaged and we were trying to give it focus, we want to know about it - also if the window gets hidden for some other reason, we also want to know about it.
add a notifier for windows being hidden, and use that instead - it handles both cases.
Diffstat (limited to 'openbox/focus.c')
| -rw-r--r-- | openbox/focus.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/openbox/focus.c b/openbox/focus.c index 92cd7662..39b12d00 100644 --- a/openbox/focus.c +++ b/openbox/focus.c @@ -68,7 +68,7 @@ static gboolean valid_focus_target(ObClient *ft, gboolean dock_windows, gboolean desktop_windows); static void focus_cycle_destructor(ObClient *client, gpointer data); -static void focus_tried_destructor(ObClient *client, gpointer data); +static void focus_tried_hide_notify(ObClient *client, gpointer data); static Window createWindow(Window parent, gulong mask, XSetWindowAttributes *attrib) @@ -87,7 +87,7 @@ void focus_startup(gboolean reconfig) XSetWindowAttributes attr; client_add_destructor(focus_cycle_destructor, NULL); - client_add_destructor(focus_tried_destructor, NULL); + client_add_hide_notify(focus_tried_hide_notify, NULL); /* start with nothing focused */ focus_nothing(); @@ -141,7 +141,7 @@ void focus_shutdown(gboolean reconfig) if (!reconfig) { client_remove_destructor(focus_cycle_destructor); - client_remove_destructor(focus_tried_destructor); + client_remove_hide_notify(focus_tried_hide_notify); /* reset focus to root */ XSetInputFocus(ob_display, PointerRoot, RevertToNone, CurrentTime); @@ -942,7 +942,7 @@ ObClient *focus_order_find_first(guint desktop) return NULL; } -static void focus_tried_destructor(ObClient *client, gpointer data) +static void focus_tried_hide_notify(ObClient *client, gpointer data) { XEvent ce; |
