Fixes #456.
.\" Title: bspwm
.\" Author: [see the "Author" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 04/16/2016
+.\" Date: 04/19/2016
.\" Manual: Bspwm Manual
-.\" Source: Bspwm 0.9.1-32-g828c93f
+.\" Source: Bspwm 0.9.1-39-ge70f826
.\" Language: English
.\"
-.TH "BSPWM" "1" "04/16/2016" "Bspwm 0\&.9\&.1\-32\-g828c93f" "Bspwm Manual"
+.TH "BSPWM" "1" "04/19/2016" "Bspwm 0\&.9\&.1\-39\-ge70f826" "Bspwm Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.RS 4
.\}
.nf
-NODE_SEL := (DIR|CYCLE_DIR|PATH|last|older|newer|focused|biggest|<node_id>)[\&.[!]focused][\&.[!]automatic][\&.[!]local][\&.[!]leaf][\&.[!]window][\&.[!]STATE][\&.[!]FLAG][\&.[!]LAYER][\&.[!]same_class]
+NODE_SEL := (DIR|CYCLE_DIR|PATH|last|older|newer|focused|pointed|biggest|<node_id>)[\&.[!]focused][\&.[!]automatic][\&.[!]local][\&.[!]leaf][\&.[!]window][\&.[!]STATE][\&.[!]FLAG][\&.[!]LAYER][\&.[!]same_class]
STATE := tiled|pseudo_tiled|floating|fullscreen
Selects the currently focused node\&.
.RE
.PP
+pointed
+.RS 4
+Selects the window under the pointer\&.
+.RE
+.PP
biggest
.RS 4
Selects the biggest window on the current desktop\&.
Select a node.
----
-NODE_SEL := (DIR|CYCLE_DIR|PATH|last|older|newer|focused|biggest|<node_id>)[.[!]focused][.[!]automatic][.[!]local][.[!]leaf][.[!]window][.[!]STATE][.[!]FLAG][.[!]LAYER][.[!]same_class]
+NODE_SEL := (DIR|CYCLE_DIR|PATH|last|older|newer|focused|pointed|biggest|<node_id>)[.[!]focused][.[!]automatic][.[!]local][.[!]leaf][.[!]window][.[!]STATE][.[!]FLAG][.[!]LAYER][.[!]same_class]
STATE := tiled|pseudo_tiled|floating|fullscreen
focused::
Selects the currently focused node.
+pointed::
+ Selects the window under the pointer.
+
biggest::
Selects the biggest window on the current desktop.
history_find_node(HISTORY_OLDER, ref, dst, sel);
} else if (streq("biggest", desc)) {
dst->node = find_biggest(ref->monitor, ref->desktop, ref->node, sel);
+ } else if (streq("pointed", desc)) {
+ xcb_window_t win;
+ query_pointer(&win, NULL);
+ if (locate_window(win, dst) && node_matches(dst, ref, sel)) {
+ return SELECTOR_OK;
+ } else {
+ return SELECTOR_INVALID;
+ }
} else if (streq("focused", desc)) {
coordinates_t loc = {mon, mon->desk, mon->desk->focus};
if (node_matches(&loc, ref, sel)) {