aboutsummaryrefslogtreecommitdiff
path: root/monsterwm.c
diff options
context:
space:
mode:
Diffstat (limited to 'monsterwm.c')
-rw-r--r--monsterwm.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/monsterwm.c b/monsterwm.c
index bb1795e..00027af 100644
--- a/monsterwm.c
+++ b/monsterwm.c
@@ -80,6 +80,7 @@ typedef struct {
/* exposed function prototypes sorted alphabetically */
static void change_desktop(const Arg *arg);
static void client_to_desktop(const Arg *arg);
+static void focusurgent();
static void killclient();
static void last_desktop();
static void move_down();
@@ -564,6 +565,15 @@ void focusin(XEvent *e) {
}
/**
+ * find and focus the first client which received
+ * an urgent hint in the current desktop
+ */
+void focusurgent(void) {
+ Desktop *d = &desktops[currdeskidx];
+ for (Client *c = d->head; c; c = c->next) if (c->isurgn) focus(c, d);
+}
+
+/**
* get a pixel with the requested color to
* fill some window area (such as borders)
*/