From: Mikael Magnusson Date: Wed, 17 Apr 2013 10:55:53 +0000 (+0200) Subject: Merge branch 'mikabox/personal' into wip/mikabox X-Git-Tag: mikabox-3.5-7~37 X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=d23578286e21b8915893ff1f02ae7465b2bd3493;p=mikachu%2Fopenbox.git Merge branch 'mikabox/personal' into wip/mikabox Conflicts: obt/prop.c openbox/event.c openbox/screen.c --- d23578286e21b8915893ff1f02ae7465b2bd3493 diff --cc obt/prop.c index b71a7125,517803f7..1ec6e23a --- a/obt/prop.c +++ b/obt/prop.c @@@ -191,7 -190,7 +192,8 @@@ void obt_prop_startup(void 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); diff --cc obt/prop.h index 6260a7a9,28cd7225..6909b174 --- a/obt/prop.h +++ b/obt/prop.h @@@ -208,9 -205,9 +208,10 @@@ typedef enum /* 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, diff --cc openbox/client.c index 41ed4c62,028c82f3..095870b3 --- a/openbox/client.c +++ b/openbox/client.c @@@ -2814,15 -2686,9 +2818,15 @@@ gboolean client_helper(ObClient *self 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); diff --cc openbox/event.c index a1aa5940,4ab0a1c5..518c6b23 --- a/openbox/event.c +++ b/openbox/event.c @@@ -815,10 -813,7 +817,10 @@@ void event_enter_client(ObClient *clien return; } + 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)) { + 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; @@@ -1459,10 -1447,11 +1463,12 @@@ static void event_handle_client(ObClien 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]); diff --cc openbox/screen.c index 33acb4a1,d4244af0..34f46a7e --- a/openbox/screen.c +++ b/openbox/screen.c @@@ -314,10 -312,10 +315,10 @@@ gboolean screen_annex(void 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; } @@@ -498,13 -505,12 +503,12 @@@ void screen_resize(void 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)