add some comments and asserts to make sure I don't ever add this bug again
This commit is contained in:
parent
dd80df31c4
commit
1cacfa85d0
3 changed files with 13 additions and 3 deletions
|
@ -34,7 +34,6 @@ void focus_startup()
|
||||||
XSetWindowAttributes attrib;
|
XSetWindowAttributes attrib;
|
||||||
|
|
||||||
focus_client = NULL;
|
focus_client = NULL;
|
||||||
focus_cycle_popup = popup_new(TRUE);
|
|
||||||
|
|
||||||
attrib.override_redirect = TRUE;
|
attrib.override_redirect = TRUE;
|
||||||
focus_backup = XCreateWindow(ob_display, ob_root,
|
focus_backup = XCreateWindow(ob_display, ob_root,
|
||||||
|
@ -43,6 +42,10 @@ void focus_startup()
|
||||||
CWOverrideRedirect, &attrib);
|
CWOverrideRedirect, &attrib);
|
||||||
XMapRaised(ob_display, focus_backup);
|
XMapRaised(ob_display, focus_backup);
|
||||||
|
|
||||||
|
/* do this *after* focus_backup is created, since it is used for
|
||||||
|
stacking */
|
||||||
|
focus_cycle_popup = popup_new(TRUE);
|
||||||
|
|
||||||
/* start with nothing focused */
|
/* start with nothing focused */
|
||||||
focus_set_client(NULL);
|
focus_set_client(NULL);
|
||||||
}
|
}
|
||||||
|
|
|
@ -197,6 +197,9 @@ int main(int argc, char **argv)
|
||||||
timer_startup();
|
timer_startup();
|
||||||
event_startup();
|
event_startup();
|
||||||
grab_startup();
|
grab_startup();
|
||||||
|
/* focus_backup is used for stacking, so this needs to come before
|
||||||
|
anything that calls stacking_add */
|
||||||
|
focus_startup();
|
||||||
window_startup();
|
window_startup();
|
||||||
plugin_startup();
|
plugin_startup();
|
||||||
/* load the plugins specified in the pluginrc */
|
/* load the plugins specified in the pluginrc */
|
||||||
|
@ -218,7 +221,6 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
frame_startup();
|
frame_startup();
|
||||||
moveresize_startup();
|
moveresize_startup();
|
||||||
focus_startup();
|
|
||||||
screen_startup();
|
screen_startup();
|
||||||
group_startup();
|
group_startup();
|
||||||
client_startup();
|
client_startup();
|
||||||
|
|
|
@ -61,6 +61,8 @@ static void do_restack(GList *wins, GList *before)
|
||||||
|
|
||||||
for (i = 1, it = wins; it; ++i, it = g_list_next(it)) {
|
for (i = 1, it = wins; it; ++i, it = g_list_next(it)) {
|
||||||
win[i] = window_top(it->data);
|
win[i] = window_top(it->data);
|
||||||
|
g_assert(win[i] != None); /* better not call stacking shit before
|
||||||
|
setting your top level window value */
|
||||||
stacking_list = g_list_insert_before(stacking_list, before, it->data);
|
stacking_list = g_list_insert_before(stacking_list, before, it->data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -253,7 +255,10 @@ void stacking_lower(ObWindow *window)
|
||||||
void stacking_add(ObWindow *win)
|
void stacking_add(ObWindow *win)
|
||||||
{
|
{
|
||||||
StackLayer l;
|
StackLayer l;
|
||||||
GList *wins, *it;
|
GList *wins;
|
||||||
|
|
||||||
|
g_assert(focus_backup != None); /* make sure I dont break this in the
|
||||||
|
future */
|
||||||
|
|
||||||
l = window_layer(win);
|
l = window_layer(win);
|
||||||
wins = g_list_append(NULL, win); /* list of 1 element */
|
wins = g_list_append(NULL, win); /* list of 1 element */
|
||||||
|
|
Loading…
Reference in a new issue