all repos — openbox @ e384e8a42e933fd75fcb57d6a575b9903e55ebde

openbox fork - make it a bit more like ryudo

make cycling desktops not move when cancelling
Dana Jansens danakj@orodu.net
commit

e384e8a42e933fd75fcb57d6a575b9903e55ebde

parent

a3f8c5c45a1ff323fc088cc5af49ab48d5679e54

2 files changed, 9 insertions(+), 25 deletions(-)

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

@@ -1531,9 +1531,7 @@ screen_set_desktop(data->desktop.desk, TRUE);

if (data->inter.any.interactive) screen_desktop_popup(data->desktop.desk, TRUE); } - } - - if (!data->inter.any.interactive || data->inter.final) + } else screen_desktop_popup(0, FALSE); }
M openbox/screen.copenbox/screen.c

@@ -647,20 +647,12 @@

guint screen_cycle_desktop(ObDirection dir, gboolean wrap, gboolean linear, gboolean dialog, gboolean done, gboolean cancel) { - static gboolean first = TRUE; - static guint origd, d; - guint r, c; + guint d, r, c; - if (cancel) { - d = origd; - goto done_cycle; - } else if (done && dialog) { - goto done_cycle; - } - if (first) { - first = FALSE; - d = origd = screen_desktop; - } + d = screen_desktop; + + if ((cancel || done) && dialog) + goto show_cycle_dialog; get_row_col(d, &r, &c);

@@ -773,16 +765,10 @@ d = translate_row_col(r, c);

} show_cycle_dialog: - if (dialog) { + if (dialog && !cancel && !done) { screen_desktop_popup(d, TRUE); - return d; - } - -done_cycle: - first = TRUE; - - screen_desktop_popup(0, FALSE); - + } else + screen_desktop_popup(0, FALSE); return d; }