X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Ffocus.c;h=6f72e84aa8939416b3fa3eedd3e7af36ea37ad34;hb=05e9cb73ceffa9cb15732dbf307355394e608b2a;hp=d09494bfdb66e3fa348743d7de55caf0d1b1df73;hpb=648c55b829e09c66222a9bbf08d10434622feae2;p=chaz%2Fopenbox diff --git a/openbox/focus.c b/openbox/focus.c index d09494bf..6f72e84a 100644 --- a/openbox/focus.c +++ b/openbox/focus.c @@ -8,7 +8,8 @@ #include Client *focus_client = NULL; -GList **focus_order = NULL; +GList **focus_order = NULL; /* these lists are created when screen_startup + sets the number of desktops */ Window focus_backup = None; @@ -16,8 +17,6 @@ void focus_set_client(Client *client); void focus_startup() { - guint i; - /* create the window which gets focus when no clients get it. Have to make it override-redirect so we don't try manage it, since it is mapped. */ @@ -29,10 +28,6 @@ void focus_startup() CopyFromParent, CWOverrideRedirect, &attrib); XMapRaised(ob_display, focus_backup); - focus_order = g_new(GList*, screen_num_desktops); - for (i = 0; i < screen_num_desktops; ++i) - focus_order[i] = NULL; - /* start with nothing focused */ focus_set_client(NULL); } @@ -45,6 +40,8 @@ void focus_shutdown() g_list_free(focus_order[i]); g_free(focus_order); + XDestroyWindow(ob_display, focus_backup); + /* reset focus to root */ XSetInputFocus(ob_display, PointerRoot, RevertToNone, CurrentTime); }