summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/actions.c12
-rw-r--r--src/actions.h1
2 files changed, 13 insertions, 0 deletions
diff --git a/src/actions.c b/src/actions.c
index f7f3163..1ea65ad 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -159,6 +159,7 @@ user_command user_commands[] =
{"focus", cmd_next_frame, arg_VOID},
{"only", cmd_only, arg_VOID},
{"remove", cmd_remove, arg_VOID},
+ {"banish", cmd_banish, arg_VOID},
/* the following screen commands may or may not be able to be
implemented. See the screen documentation for what should be
@@ -847,3 +848,14 @@ cmd_remove (void *data)
set_active_window (find_window_other());
}
}
+
+/* banish the rat pointer */
+void
+cmd_banish (void *data)
+{
+ screen_info *s;
+
+ s = current_screen ();
+
+ XWarpPointer (dpy, None, s->root, 0, 0, 0, 0, s->root_attr.width - 2, s->root_attr.height - 2);
+}
diff --git a/src/actions.h b/src/actions.h
index 3438685..191b825 100644
--- a/src/actions.h
+++ b/src/actions.h
@@ -69,6 +69,7 @@ void cmd_h_split (void *data);
void cmd_v_split (void *data);
void cmd_only (void *data);
void cmd_remove (void *data);
+void cmd_banish (void *data);
/* void cmd_xterm (void *data); */