all repos — openbox @ 51780c10eae4d9e7920efdb840fd4a07a5f03c8e

openbox fork - make it a bit more like ryudo

hilight the fallback target before it actually gets focused to avoid flickering
Dana Jansens danakj@orodu.net
commit

51780c10eae4d9e7920efdb840fd4a07a5f03c8e

parent

6611c30854e96f73feaafcef7ee3d4e38a799bfc

1 files changed, 16 insertions(+), 10 deletions(-)

jump to
M openbox/screen.copenbox/screen.c

@@ -418,6 +418,7 @@ void screen_set_desktop(guint num)

{ GList *it; guint old; + ObClient *target; g_assert(num < screen_num_desktops);

@@ -438,16 +439,16 @@

/* show windows before hiding the rest to lessen the enter/leave events */ /* show windows from top to bottom */ - for (it = stacking_list; it != NULL; it = it->next) { + for (it = stacking_list; it; it = g_list_next(it)) { if (WINDOW_IS_CLIENT(it->data)) { ObClient *c = it->data; - if (!c->frame->visible && client_should_show(c)) + if (client_should_show(c)) frame_show(c->frame); } } /* hide windows from bottom to top */ - for (it = g_list_last(stacking_list); it != NULL; it = it->prev) { + for (it = g_list_last(stacking_list); it; it = g_list_previous(it)) { if (WINDOW_IS_CLIENT(it->data)) { ObClient *c = it->data; if (c->frame->visible && !client_should_show(c))

@@ -457,13 +458,18 @@ }

event_ignore_queued_enters(); - /*! - When this focus_client check is not used, you can end up with races, as - demonstrated with gnome-panel, sometmies the window you click on on - another desktop ends up losing focus cuz of the fallback. - */ - if (!focus_client) - focus_fallback(OB_FOCUS_FALLBACK_NOFOCUS); + target = focus_fallback_target(OB_FOCUS_FALLBACK_NOFOCUS); + if (target) { + frame_adjust_focus(target->frame, TRUE); + + /*! + When this focus_client check is not used, you can end up with races, + as demonstrated with gnome-panel, sometmies the window you click on + another desktop ends up losing focus cuz of the focus change here. + */ + if (!focus_client) + client_focus(target); + } } static void get_row_col(guint d, guint *r, guint *c)