X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fscreen.c;h=49d3d22d46316c5b7a7d0f266010c84cf1cbd03b;hb=e9d875cf832f01b60be51270c7a95f2394924f52;hp=3145a63c1d09f269ed8efe31b061da8cbb33cfd5;hpb=cbbf90a718ecc6836ef7a77b9040aebb9da348b8;p=chaz%2Fopenbox diff --git a/openbox/screen.c b/openbox/screen.c index 3145a63c..49d3d22d 100644 --- a/openbox/screen.c +++ b/openbox/screen.c @@ -1,5 +1,6 @@ #include "openbox.h" #include "prop.h" +#include "config.h" #include "screen.h" #include "client.h" #include "frame.h" @@ -148,13 +149,23 @@ gboolean screen_annex() void screen_startup() { + GSList *it; + screen_desktop_names = g_ptr_array_new(); /* get the initial size */ screen_resize(); + /* set the names */ + for (it = config_desktops_names; it; it = it->next) + g_ptr_array_add(screen_desktop_names, it->data); /* dont strdup */ + PROP_SETSA(ob_root, net_desktop_names, utf8, screen_desktop_names); + g_ptr_array_set_size(screen_desktop_names, 0); /* rm the ptrs so they dont + get frees when we + update the desktop + names */ screen_num_desktops = 0; - screen_set_num_desktops(4); + screen_set_num_desktops(config_desktops_num); screen_desktop = 0; screen_set_desktop(0); @@ -290,7 +301,7 @@ void screen_set_desktop(guint num) from the switch so it doesnt mess with the focus */ XSync(ob_display, FALSE); while (XCheckTypedEvent(ob_display, EnterNotify, &e)); - focus_fallback(TRUE); + focus_fallback(Fallback_Desktop); dispatch_ob(Event_Ob_Desktop, num, old); }