#include "openbox.h"
#include "prop.h"
+#include "config.h"
#include "screen.h"
#include "client.h"
#include "frame.h"
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);
{
guint i, old;
gulong *viewport;
- GSList *it;
+ GList *it;
g_assert(num > 0);
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);
}
void screen_update_struts()
{
- GSList *it;
+ GList *it;
guint i;
g_free(strut);
*/
if (!RECT_EQUAL(old_area, area[i])) {
/* the area has changed, adjust all the maximized windows */
- GSList *it;
+ GList *it;
for (it = client_list; it; it = it->next) {
Client *c = it->data;
if (i < screen_num_desktops) {