Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
amosbird committed Feb 24, 2020
1 parent 875defe commit d32a221
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 @@ -65,7 +65,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 @@ -50,11 +50,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 @@ -1514,6 +1514,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_leaf(n, d->root) : next_leaf(n, d->root));

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

0 comments on commit d32a221

Please sign in to comment.