summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/cwm/calmwm.h3
-rw-r--r--app/cwm/conf.c6
-rw-r--r--app/cwm/cwm.18
-rw-r--r--app/cwm/kbfunc.c10
-rw-r--r--app/cwm/xevents.c5
5 files changed, 23 insertions, 9 deletions
diff --git a/app/cwm/calmwm.h b/app/cwm/calmwm.h
index 32b4b9305..1bf3f2209 100644
--- a/app/cwm/calmwm.h
+++ b/app/cwm/calmwm.h
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $Id: calmwm.h,v 1.26 2008/03/26 15:45:42 oga Exp $
+ * $Id: calmwm.h,v 1.27 2008/04/07 23:47:09 simon Exp $
*/
#ifndef _CALMWM_H_
@@ -451,6 +451,7 @@ void kbfunc_client_prevgroup(struct client_ctx *, void *);
void kbfunc_client_nogroup(struct client_ctx *, void *);
void kbfunc_client_maximize(struct client_ctx *, void *);
void kbfunc_client_vmaximize(struct client_ctx *, void *);
+void kbfunc_quit_wm(struct client_ctx *, void *);
void kbfunc_client_move(struct client_ctx *, void *);
void kbfunc_client_resize(struct client_ctx *, void *);
void kbfunc_menu_search(struct client_ctx *, void *);
diff --git a/app/cwm/conf.c b/app/cwm/conf.c
index d446f294b..122f69617 100644
--- a/app/cwm/conf.c
+++ b/app/cwm/conf.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $Id: conf.c,v 1.23 2008/03/23 15:09:21 simon Exp $
+ * $Id: conf.c,v 1.24 2008/04/07 23:47:09 simon Exp $
*/
#include "headers.h"
@@ -94,7 +94,7 @@ conf_init(struct conf *c)
conf_bindname(c, "CM-Return", "terminal");
conf_bindname(c, "CM-Delete", "lock");
conf_bindname(c, "M-question", "exec");
- conf_bindname(c, "CM-q", "exec_wm");
+ conf_bindname(c, "CM-w", "exec_wm");
conf_bindname(c, "M-period", "ssh");
conf_bindname(c, "M-Return", "hide");
conf_bindname(c, "M-Down", "lower");
@@ -119,6 +119,7 @@ conf_init(struct conf *c)
conf_bindname(c, "M-Left", "prevgroup");
conf_bindname(c, "CM-f", "maximize");
conf_bindname(c, "CM-equal", "vmaximize");
+ conf_bindname(c, "CM-q", "quit");
conf_bindname(c, "M-h", "moveleft");
conf_bindname(c, "M-j", "movedown");
@@ -260,6 +261,7 @@ struct {
{ "prevgroup", kbfunc_client_prevgroup, 0, 0 },
{ "maximize", kbfunc_client_maximize, KBFLAG_NEEDCLIENT, 0 },
{ "vmaximize", kbfunc_client_vmaximize, KBFLAG_NEEDCLIENT, 0 },
+ { "quit", kbfunc_quit_wm, 0, 0 },
{ "exec", kbfunc_exec, 0, (void *)CWM_EXEC_PROGRAM },
{ "exec_wm", kbfunc_exec, 0, (void *)CWM_EXEC_WM },
{ "ssh", kbfunc_ssh, 0, 0 },
diff --git a/app/cwm/cwm.1 b/app/cwm/cwm.1
index f2b735e5f..476b4b38b 100644
--- a/app/cwm/cwm.1
+++ b/app/cwm/cwm.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: cwm.1,v 1.24 2008/03/23 15:09:21 simon Exp $
+.\" $OpenBSD: cwm.1,v 1.25 2008/04/07 23:47:09 simon Exp $
.\"
.\" Copyright (c) 2004,2005 Marius Aamodt Eriksen <marius@monkey.org>
.\"
@@ -15,7 +15,7 @@
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.\" The following requests are required for all man pages.
-.Dd $Mdocdate: March 23 2008 $
+.Dd $Mdocdate: April 7 2008 $
.Dt CWM 1
.Os
.Sh NAME
@@ -61,6 +61,8 @@ their functionality is described in more detail later.
Spawn a new terminal.
.It Ic C-M-Delete
Lock the screen.
+.It Ic C-M-q
+Quit cwm.
.It Ic M-Enter
Hide current window.
.It Ic M-Down
@@ -104,7 +106,7 @@ This parses
to provide host auto-completion.
.Xr ssh 1
will be executed via the configured terminal emulator.
-.It Ic C-M-q
+.It Ic C-M-w
Spawn
.Dq Exec WindowManager
dialog; allows you to switch from
diff --git a/app/cwm/kbfunc.c b/app/cwm/kbfunc.c
index 4c63b1e6a..124a85af5 100644
--- a/app/cwm/kbfunc.c
+++ b/app/cwm/kbfunc.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $Id: kbfunc.c,v 1.17 2008/04/05 21:09:19 okan Exp $
+ * $Id: kbfunc.c,v 1.18 2008/04/07 23:47:09 simon Exp $
*/
#include <paths.h>
@@ -27,6 +27,8 @@
#define HASH_MARKER "|1|"
#define MOVE_AMOUNT 1
+extern int _xev_quit;
+
void
kbfunc_client_lower(struct client_ctx *cc, void *arg)
{
@@ -488,3 +490,9 @@ kbfunc_client_vmaximize(struct client_ctx *cc, void *arg)
{
client_vertmaximize(cc);
}
+
+void
+kbfunc_quit_wm(struct client_ctx *cc, void *arg)
+{
+ _xev_quit = 1;
+}
diff --git a/app/cwm/xevents.c b/app/cwm/xevents.c
index 3504e0a78..66585983b 100644
--- a/app/cwm/xevents.c
+++ b/app/cwm/xevents.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $Id: xevents.c,v 1.8 2008/03/23 15:09:21 simon Exp $
+ * $Id: xevents.c,v 1.9 2008/04/07 23:47:09 simon Exp $
*/
/*
@@ -451,6 +451,7 @@ out:
static struct xevent_q _xevq, _xevq_putaway;
static short _xev_q_lock = 0;
+int _xev_quit = 0;
void
xev_init(void)
@@ -524,7 +525,7 @@ xev_loop(void)
XEvent e;
struct xevent *xev, *nextxev;
- for (;;) {
+ while (_xev_quit == 0) {
#ifdef DIAGNOSTIC
if (TAILQ_EMPTY(&_xevq))
errx(1, "X event queue empty");