Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't grab pointer when not in float mode #880

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@
#define SMALEN 32
#define INIT_CAP 8

#define cleaned_mask(m) (m & ~(num_lock | scroll_lock | caps_lock))
/* #define cleaned_mask(m) (m & ~(num_lock | scroll_lock | caps_lock)) */
#define cleaned_mask(m) (m & ~(num_lock | scroll_lock))
#define streq(s1, s2) (strcmp((s1), (s2)) == 0)
#define unsigned_subtract(a, b) \
do { \
Expand Down
6 changes: 5 additions & 1 deletion src/pointer.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,15 @@ void pointer_init(void)

void window_grab_buttons(xcb_window_t win)
{
coordinates_t loc;
bool grab = false;
if (locate_window(win, &loc))
grab = loc.node->client->state == STATE_FLOATING;
for (unsigned int i = 0; i < LENGTH(BUTTONS); i++) {
if (click_to_focus == (int8_t) XCB_BUTTON_INDEX_ANY || click_to_focus == (int8_t) BUTTONS[i]) {
window_grab_button(win, BUTTONS[i], XCB_NONE);
}
if (pointer_actions[i] != ACTION_NONE) {
if (grab && pointer_actions[i] != ACTION_NONE) {
window_grab_button(win, BUTTONS[i], pointer_modifier);
}
}
Expand Down
1 change: 1 addition & 0 deletions src/tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -1733,6 +1733,7 @@ bool find_closest_node(coordinates_t *ref, coordinates_t *dst, cycle_dir_t dir,
monitor_t *m = ref->monitor;
desktop_t *d = ref->desktop;
node_t *n = ref->node;
if (!n) return false;
n = (dir == CYCLE_PREV ? prev_node(n) : next_node(n));

#define HANDLE_BOUNDARIES(m, d, n) \
Expand Down