summary refs log tree commit diff
path: root/calmwm.h
diff options
context:
space:
mode:
authorokan <okan>2014-01-22 21:48:27 +0000
committerokan <okan>2014-01-22 21:48:27 +0000
commit77aa5ac45b06b4afa392e21d55e3318913b0347b (patch)
tree958f412e4eb2d3682b95e9c62eb40085e43d3e41 /calmwm.h
parentac3162439ad826026b499363b445e8c533313ff2 (diff)
downloadcwm-77aa5ac45b06b4afa392e21d55e3318913b0347b.tar.gz
cwm-77aa5ac45b06b4afa392e21d55e3318913b0347b.tar.xz
cwm-77aa5ac45b06b4afa392e21d55e3318913b0347b.zip
Somewhat streamline event loop/restart/quit handling; most notable
change allows a restart to trigger proper teardown first, even though
teardown is not (yet) complete.

After some discussion with oga@nicotinebsd.org regarding a more
complicated version/idea.
Diffstat (limited to 'calmwm.h')
-rw-r--r--calmwm.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/calmwm.h b/calmwm.h
index 408e098..38323e0 100644
--- a/calmwm.h
+++ b/calmwm.h
@@ -85,6 +85,10 @@
 
 #define CWM_WIN			0x0001
 
+#define CWM_QUIT		0x0000
+#define CWM_RUNNING		0x0001
+#define CWM_RESTART		0x0002
+
 union arg {
 	char	*c;
 	int	 i;
@@ -327,6 +331,7 @@ extern struct client_ctx_q		 Clientq;
 extern struct conf			 Conf;
 extern const char			*homedir;
 extern int				 HasRandr, Randr_ev;
+extern volatile sig_atomic_t		 cwm_status;
 
 enum {
 	WM_STATE,
@@ -473,11 +478,10 @@ void			 kbfunc_client_search(struct client_ctx *, union arg *);
 void			 kbfunc_client_vmaximize(struct client_ctx *,
 			     union arg *);
 void			 kbfunc_cmdexec(struct client_ctx *, union arg *);
+void			 kbfunc_cwm_status(struct client_ctx *, union arg *);
 void			 kbfunc_exec(struct client_ctx *, union arg *);
 void			 kbfunc_lock(struct client_ctx *, union arg *);
 void			 kbfunc_menu_search(struct client_ctx *, union arg *);
-void			 kbfunc_quit_wm(struct client_ctx *, union arg *);
-void			 kbfunc_restart(struct client_ctx *, union arg *);
 void			 kbfunc_ssh(struct client_ctx *, union arg *);
 void			 kbfunc_term(struct client_ctx *, union arg *);
 void 			 kbfunc_tile(struct client_ctx *, union arg *);
@@ -527,7 +531,7 @@ void			 conf_init(struct conf *);
 void			 conf_ignore(struct conf *, const char *);
 void			 conf_screen(struct screen_ctx *);
 
-void			 xev_loop(void);
+void			 xev_process(void);
 
 void			 xu_btn_grab(Window, int, unsigned int);
 void			 xu_btn_ungrab(Window);