all repos — openbox @ e7e02728a337f3757aa00c260cb16f5f8224eae0

openbox fork - make it a bit more like ryudo

reordering things when mapping windows a little to work with iconified windows with iconified toolbars on restart. (e.g. ooffice)
Dana Jansens danakj@orodu.net
commit

e7e02728a337f3757aa00c260cb16f5f8224eae0

parent

3b48aa4ea29b4c41037b0f8b02c17e7fa138e31f

1 files changed, 13 insertions(+), 11 deletions(-)

jump to
M openbox/client.copenbox/client.c

@@ -201,14 +201,17 @@ XFree(wmhints);

} } - for (i = 0; i < nchild; ++i) { - if (children[i] == None) + /* manage windows in reverse order from how they were originally mapped. + this is an attempt to manage children windows before their parents, so + that when the parent is mapped, it can find the child */ + for (i = nchild; i > 0; --i) { + if (children[i--1] == None) continue; - if (XGetWindowAttributes(ob_display, children[i], &attrib)) { + if (XGetWindowAttributes(ob_display, children[i-1], &attrib)) { if (attrib.override_redirect) continue; if (attrib.map_state != IsUnmapped) - client_manage(children[i]); + client_manage(children[i-1]); } } XFree(children);

@@ -289,6 +292,11 @@

ob_debug("Window type: %d\n", self->type); ob_debug("Window group: 0x%x\n", self->group?self->group->leader:0); + /* now we have all of the window's information so we can set this up. + do this before creating the frame, so it can tell that we are still + mapping and doesn't go applying things right away */ + client_setup_decor_and_functions(self, FALSE); + /* specify that if we exit, the window should not be destroyed and should be reparented back to root automatically */ XChangeSaveSet(ob_display, window, SetModeInsert);

@@ -316,17 +324,11 @@ /* do this after we have a frame.. it uses the frame to help determine the

WM_STATE to apply. */ client_change_state(self); - /* add ourselves to the focus order. do this before - setup_decor_and_functions. if the window is mapping in a state that is - not allowed, then it will be adjusted, and that can change its position - in the focus order (deiconify for example) */ + /* add ourselves to the focus order */ focus_order_add_new(self); /* do this to add ourselves to the stacking list in a non-intrusive way */ client_calc_layer(self); - - /* now we have all of the window's information so we can set this up */ - client_setup_decor_and_functions(self, FALSE); /* focus the new window? */ if (ob_state() != OB_STATE_STARTING &&