X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Ffocus.c;h=e6e6bba1bf4d20435868b0de9b15c830b07bed01;hb=3541c60fcbee11fe4fe7ba806219c3c16bb5a574;hp=6e738d4a0642c3b5529816c0019e1f1226831ff3;hpb=0745e2ee0aa6b8e7dbab1a4124e60ccb5b4e8441;p=chaz%2Fopenbox diff --git a/openbox/focus.c b/openbox/focus.c index 6e738d4a..e6e6bba1 100644 --- a/openbox/focus.c +++ b/openbox/focus.c @@ -20,32 +20,34 @@ ObClient *focus_client; GList **focus_order; /* these lists are created when screen_startup sets the number of desktops */ +ObClient *focus_cycle_target; -static ObClient *focus_cycle_target; static Popup *focus_cycle_popup; -void focus_startup() +void focus_startup(gboolean reconfig) { - focus_cycle_popup = popup_new(TRUE); - /* start with nothing focused */ - focus_set_client(NULL); + if (!reconfig) + /* start with nothing focused */ + focus_set_client(NULL); } -void focus_shutdown() +void focus_shutdown(gboolean reconfig) { guint i; - for (i = 0; i < screen_num_desktops; ++i) - g_list_free(focus_order[i]); - g_free(focus_order); - popup_free(focus_cycle_popup); - /* reset focus to root */ - XSetInputFocus(ob_display, PointerRoot, RevertToPointerRoot, - event_lasttime); + if (!reconfig) { + for (i = 0; i < screen_num_desktops; ++i) + g_list_free(focus_order[i]); + g_free(focus_order); + + /* reset focus to root */ + XSetInputFocus(ob_display, PointerRoot, RevertToPointerRoot, + event_lasttime); + } } static void push_to_top(ObClient *client)