NET_SUPPORTING_WM_CHECK, WINDOW, screen_support_win);
/* set properties on the supporting window */
- OBT_PROP_SETS(screen_support_win, NET_WM_NAME, utf8, "Openbox");
+ OBT_PROP_SETS(screen_support_win, NET_WM_NAME, "Openbox");
OBT_PROP_SET32(screen_support_win, NET_SUPPORTING_WM_CHECK,
WINDOW, screen_support_win);
NET_SUPPORTED, ATOM, supported, num_support);
g_free(supported);
- OBT_PROP_SETS(RootWindow(obt_display, ob_screen), OB_VERSION, utf8,
+ OBT_PROP_SETS(RootWindow(obt_display, ob_screen), OB_VERSION,
OPENBOX_VERSION);
screen_tell_ksplash();
screen_resize();
/* have names already been set for the desktops? */
- if (OBT_PROP_GETSS(obt_root(ob_screen), NET_DESKTOP_NAMES, utf8, &names)) {
+ if (OBT_PROP_GETSS_UTF8(obt_root(ob_screen), NET_DESKTOP_NAMES, &names)) {
g_strfreev(names);
namesexist = TRUE;
}
/* set the root window property */
OBT_PROP_SETSS(obt_root(ob_screen),
- NET_DESKTOP_NAMES, utf8, (const gchar*const*)names);
+ NET_DESKTOP_NAMES, (const gchar*const*)names);
g_strfreev(names);
}
if (ob_state() != OB_STATE_RUNNING)
return;
- screen_update_areas();
+ /* this calls screen_update_areas(), which we need ! */
dock_configure();
- for (it = client_list; it; it = g_list_next(it))
- client_move_onscreen(it->data, FALSE);
+ if (oldw)
+ for (it = client_list; it; it = g_list_next(it))
+ client_move_onscreen(it->data, FALSE);
}
void screen_set_num_desktops(guint num)
screen_desktop_names = NULL;
if (OBT_PROP_GETSS(obt_root(ob_screen),
- NET_DESKTOP_NAMES, utf8, &screen_desktop_names))
+ NET_DESKTOP_NAMES, &screen_desktop_names))
for (i = 0; screen_desktop_names[i] && i < screen_num_desktops; ++i);
else
i = 0;
/* if we changed any names, then set the root property so we can
all agree on the names */
OBT_PROP_SETSS(obt_root(ob_screen), NET_DESKTOP_NAMES,
- utf8, (const gchar*const*)screen_desktop_names);
+ (const gchar*const*)screen_desktop_names);
}
/* resize the pager for these names */
dims, 4 * screen_num_desktops);
/* the area has changed, adjust all the windows if they need it */
- for (it = onscreen; it; it = g_list_next(it)) {
- client_move_onscreen(it->data, FALSE);
+ for (it = onscreen; it; it = g_list_next(it))
client_reconfigure(it->data, FALSE);
- }
g_free(dims);
}
}
}
}
- return most;
+ return most < screen_num_monitors ? most : screen_monitor_primary(FALSE);
}
const Rect* screen_physical_area_all_monitors(void)
}
return ret;
}
+
+gboolean screen_compare_desktops(guint a, guint b)
+{
+ if (a == DESKTOP_ALL)
+ a = screen_desktop;
+ if (b == DESKTOP_ALL)
+ b = screen_desktop;
+ return a == b;
+}