CREATE_(OB_CONFIG_FILE);
CREATE_(OB_WM_ACTION_UNDECORATE);
CREATE_(OB_WM_STATE_UNDECORATED);
+ CREATE_(OB_WM_STATE_LOCKED);
+ CREATE_(OB_LAST_DESKTOP);
CREATE_(OB_CONTROL);
CREATE_(OB_VERSION);
CREATE_(OB_APP_ROLE);
/* Openbox specific atoms */
+ OBT_PROP_OB_FOCUS,
OBT_PROP_OB_WM_ACTION_UNDECORATE,
OBT_PROP_OB_WM_STATE_UNDECORATED,
+ OBT_PROP_OB_WM_STATE_LOCKED,
OBT_PROP_OPENBOX_PID, /* this is depreecated in favour of ob_control */
OBT_PROP_OB_THEME,
OBT_PROP_OB_CONFIG_FILE,
self->type == OB_CLIENT_TYPE_TOOLBAR);
}
+gboolean client_occupies_space(ObClient *self)
+{
+ return !(self->type == OB_CLIENT_TYPE_DESKTOP ||
+ self->type == OB_CLIENT_TYPE_SPLASH);
+}
+
gboolean client_mouse_focusable(ObClient *self)
{
- return !(self->type == OB_CLIENT_TYPE_MENU ||
+ return !(/*self->type == OB_CLIENT_TYPE_MENU ||*/
self->type == OB_CLIENT_TYPE_TOOLBAR ||
self->type == OB_CLIENT_TYPE_SPLASH ||
self->type == OB_CLIENT_TYPE_DOCK);
return;
}
- if (client_enter_focusable(client) && client_can_focus(client)) {
+ ob_debug_type(OB_DEBUG_FOCUS, "using enter event with serial %lu "
+ "on client 0x%x", event_curserial, client->window);
+
+ if (client_enter_focusable(client) && client_can_focus(client) && (!config_focus_delay || event_time_after(client_left_focused, event_curtime - config_focus_delay /*milliseconds here, so not *1000 */))) {
if (config_focus_delay) {
ObFocusDelayData *data;
ob_debug_type(OB_DEBUG_APP_BUGS,
"_NET_ACTIVE_WINDOW message for window %s is "
"missing source indication", client->title);
- client_activate(client, FALSE, FALSE, TRUE, TRUE,
- (e->xclient.data.l[0] == 0 ||
- e->xclient.data.l[0] == 2));
+ if (!client->locked)
+ client_activate(client, FALSE, FALSE, TRUE, TRUE,
+ (e->xclient.data.l[0] == 0 ||
+ e->xclient.data.l[0] == 2));
+ } else if (msgtype == OBT_PROP_ATOM(OB_FOCUS)) {
+ client_focus(client);
} else if (msgtype == OBT_PROP_ATOM(NET_WM_MOVERESIZE)) {
ob_debug("net_wm_moveresize for 0x%lx direction %d",
client->window, e->xclient.data.l[2]);
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_tell_ksplash();
return TRUE;
}
if (ob_state() != OB_STATE_RUNNING)
return;
- screen_update_areas();
+ /* this calls screen_update_areas(), which we need ! */
dock_configure();
- // bug: this is done in screen_update_areas() already
-// for (it = client_list; it; it = g_list_next(it))
-// client_move_onscreen(it->data, FALSE);
+ for (it = client_list; it; it = g_list_next(it)) {
- client_move_onscreen(it->data, FALSE);
+ client_reconfigure(it->data, FALSE);
+ }
}
void screen_set_num_desktops(guint num)