mirror of
https://github.com/vale981/bspwm
synced 2025-03-06 10:11:43 -05:00
parent
9efe76b8b0
commit
8664c007e4
5 changed files with 32 additions and 5 deletions
11
doc/bspwm.1
11
doc/bspwm.1
|
@ -2,12 +2,12 @@
|
||||||
.\" Title: bspwm
|
.\" Title: bspwm
|
||||||
.\" Author: [see the "Author" section]
|
.\" Author: [see the "Author" section]
|
||||||
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
|
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
|
||||||
.\" Date: 09/22/2016
|
.\" Date: 09/30/2016
|
||||||
.\" Manual: Bspwm Manual
|
.\" Manual: Bspwm Manual
|
||||||
.\" Source: Bspwm 0.9.1-95-g70b477d
|
.\" Source: Bspwm 0.9.1-102-ge2d5e26
|
||||||
.\" Language: English
|
.\" 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
|
.\" * Define some portability stuff
|
||||||
.\" -----------------------------------------------------------------
|
.\" -----------------------------------------------------------------
|
||||||
|
@ -1330,6 +1330,11 @@ One of the flags of a node changed\&.
|
||||||
.RS 4
|
.RS 4
|
||||||
The layer of a window changed\&.
|
The layer of a window changed\&.
|
||||||
.RE
|
.RE
|
||||||
|
.PP
|
||||||
|
\fIpointer_action <monitor_id> <desktop_id> <node_id> move|resize_corner|resize_side begin|end\fR
|
||||||
|
.RS 4
|
||||||
|
A pointer action occured\&.
|
||||||
|
.RE
|
||||||
.sp
|
.sp
|
||||||
Please note that \fBbspwm\fR initializes monitors before it reads messages on its socket, therefore the initial monitor events can\(cqt be received\&.
|
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"
|
.SH "REPORT FORMAT"
|
||||||
|
|
|
@ -796,6 +796,9 @@ Events
|
||||||
'node_layer <monitor_id> <desktop_id> <node_id> below|normal|above'::
|
'node_layer <monitor_id> <desktop_id> <node_id> below|normal|above'::
|
||||||
The layer of a window changed.
|
The layer of a window changed.
|
||||||
|
|
||||||
|
'pointer_action <monitor_id> <desktop_id> <node_id> 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.
|
Please note that *bspwm* initializes monitors before it reads messages on its socket, therefore the initial monitor events can't be received.
|
||||||
|
|
||||||
Report Format
|
Report Format
|
||||||
|
|
2
parse.c
2
parse.c
|
@ -320,6 +320,8 @@ bool parse_subscriber_mask(char *s, subscriber_mask_t *mask)
|
||||||
*mask = SBSC_MASK_DESKTOP;
|
*mask = SBSC_MASK_DESKTOP;
|
||||||
} else if (streq("monitor", s)) {
|
} else if (streq("monitor", s)) {
|
||||||
*mask = SBSC_MASK_MONITOR;
|
*mask = SBSC_MASK_MONITOR;
|
||||||
|
} else if (streq("pointer_action", s)) {
|
||||||
|
*mask = SBSC_MASK_POINTER_ACTION;
|
||||||
} else if (streq("node_manage", s)) {
|
} else if (streq("node_manage", s)) {
|
||||||
*mask = SBSC_MASK_NODE_MANAGE;
|
*mask = SBSC_MASK_NODE_MANAGE;
|
||||||
} else if (streq("node_unmanage", s)) {
|
} else if (streq("node_unmanage", s)) {
|
||||||
|
|
16
pointer.c
16
pointer.c
|
@ -217,6 +217,14 @@ void grab_pointer(pointer_action_t pac)
|
||||||
}
|
}
|
||||||
free(reply);
|
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);
|
track_pointer(loc, pac, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -271,6 +279,14 @@ void track_pointer(coordinates_t loc, pointer_action_t pac, xcb_point_t pos)
|
||||||
return;
|
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);
|
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);
|
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);
|
||||||
|
|
|
@ -53,10 +53,11 @@ typedef enum {
|
||||||
SBSC_MASK_NODE_STATE = 1 << 24,
|
SBSC_MASK_NODE_STATE = 1 << 24,
|
||||||
SBSC_MASK_NODE_FLAG = 1 << 25,
|
SBSC_MASK_NODE_FLAG = 1 << 25,
|
||||||
SBSC_MASK_NODE_LAYER = 1 << 26,
|
SBSC_MASK_NODE_LAYER = 1 << 26,
|
||||||
|
SBSC_MASK_POINTER_ACTION = 1 << 27,
|
||||||
SBSC_MASK_MONITOR = (1 << 7) - (1 << 1),
|
SBSC_MASK_MONITOR = (1 << 7) - (1 << 1),
|
||||||
SBSC_MASK_DESKTOP = (1 << 15) - (1 << 7),
|
SBSC_MASK_DESKTOP = (1 << 15) - (1 << 7),
|
||||||
SBSC_MASK_NODE = (1 << 27) - (1 << 15),
|
SBSC_MASK_NODE = (1 << 28) - (1 << 15),
|
||||||
SBSC_MASK_ALL = (1 << 27) - 1
|
SBSC_MASK_ALL = (1 << 28) - 1
|
||||||
} subscriber_mask_t;
|
} subscriber_mask_t;
|
||||||
|
|
||||||
subscriber_list_t *make_subscriber_list(FILE *stream, int field);
|
subscriber_list_t *make_subscriber_list(FILE *stream, int field);
|
||||||
|
|
Loading…
Add table
Reference in a new issue