Fixes #490.
.\" Title: bspwm
.\" Author: [see the "Author" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/20/2016
+.\" Date: 05/21/2016
.\" Manual: Bspwm Manual
-.\" Source: Bspwm 0.9.1-75-g666af89
+.\" Source: Bspwm 0.9.1-76-g319566e
.\" Language: English
.\"
-.TH "BSPWM" "1" "05/20/2016" "Bspwm 0\&.9\&.1\-75\-g666af89" "Bspwm Manual"
+.TH "BSPWM" "1" "05/21/2016" "Bspwm 0\&.9\&.1\-76\-g319566e" "Bspwm Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
\fBmove\fR,
\fBresize_side\fR,
\fBresize_corner\fR,
-\fBfocus\fR\&.
+\fBfocus\fR,
+\fBnone\fR\&.
.RE
.PP
\fIclick_to_focus\fR
'pointer_action1'::
'pointer_action2'::
'pointer_action3'::
- Action performed when pressing 'pointer_modifier' + 'button<n>'. Accept the following values: *move*, *resize_side*, *resize_corner*, *focus*.
+ Action performed when pressing 'pointer_modifier' + 'button<n>'. Accept the following values: *move*, *resize_side*, *resize_corner*, *focus*, *none*.
'click_to_focus'::
Focus a window (or a monitor) by clicking it.
streq("pointer_action2", name) ||
streq("pointer_action3", name)) {
int index = name[14] - '1';
- if (!parse_pointer_action(value, &pointer_actions[index])) {
+ if (parse_pointer_action(value, &pointer_actions[index])) {
+ ungrab_buttons();
+ grab_buttons();
+ } else {
fail(rsp, "config: %s: Invalid value: '%s'.\n", name, value);
return;
}
} else if (streq("focus", s)) {
*a = ACTION_FOCUS;
return true;
+ } else if (streq("none", s)) {
+ *a = ACTION_NONE;
+ return true;
}
return false;
}
}
uint8_t buttons[] = {XCB_BUTTON_INDEX_1, XCB_BUTTON_INDEX_2, XCB_BUTTON_INDEX_3};
for (unsigned int i = 0; i < LENGTH(buttons); i++) {
- grab_button(buttons[i], pointer_modifier);
+ if (pointer_actions[i] != ACTION_NONE) {
+ grab_button(buttons[i], pointer_modifier);
+ }
}
}
void print_pointer_action(pointer_action_t a, FILE *rsp)
{
switch (a) {
- case ACTION_FOCUS:
- fprintf(rsp, "focus");
- break;
case ACTION_MOVE:
fprintf(rsp, "move");
break;
case ACTION_RESIZE_CORNER:
fprintf(rsp, "resize_corner");
break;
+ case ACTION_FOCUS:
+ fprintf(rsp, "focus");
+ break;
+ case ACTION_NONE:
+ fprintf(rsp, "none");
+ break;
}
}
} resize_handle_t;
typedef enum {
+ ACTION_NONE,
ACTION_FOCUS,
ACTION_MOVE,
ACTION_RESIZE_SIDE,