aboutsummaryrefslogtreecommitdiff
path: root/sway/input/cursor.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-10-03 21:21:25 +0200
committerGitHub <noreply@github.com>2018-10-03 21:21:25 +0200
commit7fdc557f1e16f14dea080714b3a261daf8f4634e (patch)
tree2564be2f236c91052227bf2cdf322d620caa18b4 /sway/input/cursor.c
parent01b8e171b8dd2dbdda1b1a652c39022602cd9dfb (diff)
parent426c33f4dc2515867a0d3b04cb865d5cad091d10 (diff)
Merge pull request #2709 from BuJo/feature/raise_floating
raise floating
Diffstat (limited to 'sway/input/cursor.c')
-rw-r--r--sway/input/cursor.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c
index afad6f6f..3c62acb9 100644
--- a/sway/input/cursor.c
+++ b/sway/input/cursor.c
@@ -567,15 +567,15 @@ void cursor_send_pointer_motion(struct sway_cursor *cursor, uint32_t time_msec,
struct wlr_surface *surface = NULL;
double sx, sy;
- // Find the node beneath the pointer's previous position
- struct sway_node *prev_node = node_at_coords(seat,
- cursor->previous.x, cursor->previous.y, &surface, &sx, &sy);
+ struct sway_node *prev_node = cursor->previous.node;
+ struct sway_node *node = node_at_coords(seat,
+ cursor->cursor->x, cursor->cursor->y, &surface, &sx, &sy);
+
// Update the stored previous position
cursor->previous.x = cursor->cursor->x;
cursor->previous.y = cursor->cursor->y;
+ cursor->previous.node = node;
- struct sway_node *node = node_at_coords(seat,
- cursor->cursor->x, cursor->cursor->y, &surface, &sx, &sy);
if (node && config->focus_follows_mouse && allow_refocusing) {
struct sway_node *focus = seat_get_focus(seat);
if (focus && node->type == N_WORKSPACE) {