Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
amosbird committed Sep 5, 2021
1 parent e22d0fa commit 6f7a1c4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,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 @@ -1712,6 +1712,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

0 comments on commit 6f7a1c4

Please sign in to comment.