all repos — openbox @ 7ea56abf05b9e6cd4e806dbfa1146562378edc7b

openbox fork - make it a bit more like ryudo

add a RECONFIGURING state, and enter that when doing reconfiguring
Dana Jansens danakj@orodu.net
commit

7ea56abf05b9e6cd4e806dbfa1146562378edc7b

parent

8562034e30e8b319a746009859cbefc1f41b41f5

5 files changed, 15 insertions(+), 5 deletions(-)

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

@@ -652,9 +652,11 @@ else if (e->type == MappingNotify) {

/* keyboard layout changes for modifier mapping changes. reload the modifier map, and rebind all the key bindings as appropriate */ ob_debug("Kepboard map changed. Reloading keyboard bindings.\n"); + ob_set_state(OB_STATE_RECONFIGURING); modkeys_shutdown(TRUE); modkeys_startup(TRUE); keyboard_rebind(); + ob_set_state(OB_STATE_RUNNING); } else if (e->type == ClientMessage) { /* This is for _NET_WM_REQUEST_FRAME_EXTENTS messages. They come for
M openbox/misc.hopenbox/misc.h

@@ -60,7 +60,8 @@ typedef enum

{ OB_STATE_STARTING, OB_STATE_RUNNING, - OB_STATE_EXITING + OB_STATE_EXITING, + OB_STATE_RECONFIGURING } ObState; typedef enum
M openbox/openbox.copenbox/openbox.c

@@ -121,7 +121,7 @@ gint main(gint argc, gchar **argv)

{ gchar *program_name; - state = OB_STATE_STARTING; + ob_set_state(OB_STATE_STARTING); /* initialize the locale */ if (!setlocale(LC_ALL, ""))

@@ -367,9 +367,10 @@ }

reconfigure = FALSE; - state = OB_STATE_RUNNING; + ob_set_state(OB_STATE_RUNNING); ob_main_loop_run(ob_main_loop); - state = OB_STATE_EXITING; + ob_set_state(reconfigure ? + OB_STATE_RECONFIGURING : OB_STATE_EXITING); if (!reconfigure) { dock_remove_all();

@@ -709,3 +710,8 @@ ObState ob_state()

{ return state; } + +void ob_set_state(ObState s) +{ + state = s; +}
M openbox/openbox.hopenbox/openbox.h

@@ -52,6 +52,7 @@ extern gboolean ob_debug_xinerama;

/* The state of execution of the window manager */ ObState ob_state(); +void ob_set_state(ObState state); void ob_restart_other(const gchar *path); void ob_restart();
M openbox/screen.copenbox/screen.c

@@ -492,7 +492,7 @@ screen_physical_size.height = geometry[1] = h;

PROP_SETA32(RootWindow(ob_display, ob_screen), net_desktop_geometry, cardinal, geometry, 2); - if (ob_state() == OB_STATE_STARTING) + if (ob_state() != OB_STATE_RUNNING) return; screen_update_areas();