diff --git a/doc/bspwm.1 b/doc/bspwm.1
index 54c69b0..7fb4cbb 100644
--- a/doc/bspwm.1
+++ b/doc/bspwm.1
@@ -2,12 +2,12 @@
.\" Title: bspwm
.\" Author: [see the "Author" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1
-.\" Date: 09/22/2016
+.\" Date: 09/30/2016
.\" Manual: Bspwm Manual
-.\" Source: Bspwm 0.9.1-95-g70b477d
+.\" Source: Bspwm 0.9.1-102-ge2d5e26
.\" Language: English
.\"
-.TH "BSPWM" "1" "09/22/2016" "Bspwm 0\&.9\&.1\-95\-g70b477d" "Bspwm Manual"
+.TH "BSPWM" "1" "09/30/2016" "Bspwm 0\&.9\&.1\-102\-ge2d5e26" "Bspwm Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -1330,6 +1330,11 @@ One of the flags of a node changed\&.
.RS 4
The layer of a window changed\&.
.RE
+.PP
+\fIpointer_action move|resize_corner|resize_side begin|end\fR
+.RS 4
+A pointer action occured\&.
+.RE
.sp
Please note that \fBbspwm\fR initializes monitors before it reads messages on its socket, therefore the initial monitor events can\(cqt be received\&.
.SH "REPORT FORMAT"
diff --git a/doc/bspwm.1.asciidoc b/doc/bspwm.1.asciidoc
index 0c538e1..f3a5c2c 100644
--- a/doc/bspwm.1.asciidoc
+++ b/doc/bspwm.1.asciidoc
@@ -796,6 +796,9 @@ Events
'node_layer below|normal|above'::
The layer of a window changed.
+'pointer_action move|resize_corner|resize_side begin|end'::
+ A pointer action occured.
+
Please note that *bspwm* initializes monitors before it reads messages on its socket, therefore the initial monitor events can't be received.
Report Format
diff --git a/parse.c b/parse.c
index 2ee1a2d..c5328e8 100644
--- a/parse.c
+++ b/parse.c
@@ -320,6 +320,8 @@ bool parse_subscriber_mask(char *s, subscriber_mask_t *mask)
*mask = SBSC_MASK_DESKTOP;
} else if (streq("monitor", s)) {
*mask = SBSC_MASK_MONITOR;
+ } else if (streq("pointer_action", s)) {
+ *mask = SBSC_MASK_POINTER_ACTION;
} else if (streq("node_manage", s)) {
*mask = SBSC_MASK_NODE_MANAGE;
} else if (streq("node_unmanage", s)) {
diff --git a/pointer.c b/pointer.c
index 2446f3f..b0a690d 100644
--- a/pointer.c
+++ b/pointer.c
@@ -217,6 +217,14 @@ void grab_pointer(pointer_action_t pac)
}
free(reply);
+ if (pac == ACTION_MOVE) {
+ put_status(SBSC_MASK_POINTER_ACTION, "pointer_action 0x%08X 0x%08X 0x%08X move begin\n", loc.monitor->id, loc.desktop->id, loc.node->id);
+ } else if (pac == ACTION_RESIZE_CORNER) {
+ put_status(SBSC_MASK_POINTER_ACTION, "pointer_action 0x%08X 0x%08X 0x%08X resize_corner begin\n", loc.monitor->id, loc.desktop->id, loc.node->id);
+ } else if (pac == ACTION_RESIZE_SIDE) {
+ put_status(SBSC_MASK_POINTER_ACTION, "pointer_action 0x%08X 0x%08X 0x%08X resize_side begin\n", loc.monitor->id, loc.desktop->id, loc.node->id);
+ }
+
track_pointer(loc, pac, pos);
}
@@ -271,6 +279,14 @@ void track_pointer(coordinates_t loc, pointer_action_t pac, xcb_point_t pos)
return;
}
+ if (pac == ACTION_MOVE) {
+ put_status(SBSC_MASK_POINTER_ACTION, "pointer_action 0x%08X 0x%08X 0x%08X move end\n", loc.monitor->id, loc.desktop->id, n->id);
+ } else if (pac == ACTION_RESIZE_CORNER) {
+ put_status(SBSC_MASK_POINTER_ACTION, "pointer_action 0x%08X 0x%08X 0x%08X resize_corner end\n", loc.monitor->id, loc.desktop->id, n->id);
+ } else if (pac == ACTION_RESIZE_SIDE) {
+ put_status(SBSC_MASK_POINTER_ACTION, "pointer_action 0x%08X 0x%08X 0x%08X resize_side end\n", loc.monitor->id, loc.desktop->id, n->id);
+ }
+
xcb_rectangle_t r = get_rectangle(NULL, n);
put_status(SBSC_MASK_NODE_GEOMETRY, "node_geometry 0x%08X 0x%08X 0x%08X %ux%u+%i+%i\n", loc.monitor->id, loc.desktop->id, loc.node->id, r.width, r.height, r.x, r.y);
diff --git a/subscribe.h b/subscribe.h
index 2f52750..496ce8d 100644
--- a/subscribe.h
+++ b/subscribe.h
@@ -53,10 +53,11 @@ typedef enum {
SBSC_MASK_NODE_STATE = 1 << 24,
SBSC_MASK_NODE_FLAG = 1 << 25,
SBSC_MASK_NODE_LAYER = 1 << 26,
+ SBSC_MASK_POINTER_ACTION = 1 << 27,
SBSC_MASK_MONITOR = (1 << 7) - (1 << 1),
SBSC_MASK_DESKTOP = (1 << 15) - (1 << 7),
- SBSC_MASK_NODE = (1 << 27) - (1 << 15),
- SBSC_MASK_ALL = (1 << 27) - 1
+ SBSC_MASK_NODE = (1 << 28) - (1 << 15),
+ SBSC_MASK_ALL = (1 << 28) - 1
} subscriber_mask_t;
subscriber_list_t *make_subscriber_list(FILE *stream, int field);