aboutsummaryrefslogtreecommitdiff
path: root/sway/input
diff options
context:
space:
mode:
Diffstat (limited to 'sway/input')
-rw-r--r--sway/input/cursor.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c
index fb4728b4..87811550 100644
--- a/sway/input/cursor.c
+++ b/sway/input/cursor.c
@@ -280,7 +280,7 @@ static void cursor_do_rebase(struct sway_cursor *cursor, uint32_t time_msec,
void cursor_rebase(struct sway_cursor *cursor) {
uint32_t time_msec = get_current_time_msec();
struct wlr_surface *surface = NULL;
- double sx, sy;
+ double sx = 0.0, sy = 0.0;
cursor->previous.node = node_at_coords(cursor->seat,
cursor->cursor->x, cursor->cursor->y, &surface, &sx, &sy);
cursor_do_rebase(cursor, time_msec, cursor->previous.node, surface, sx, sy);
@@ -431,7 +431,7 @@ static void handle_cursor_motion(struct wl_listener *listener, void *data) {
struct sway_node *node = NULL;
double sx, sy;
if (cursor->active_constraint) {
- node = node_at_coords(cursor->seat,
+ node_at_coords(cursor->seat,
cursor->cursor->x, cursor->cursor->y, &surface, &sx, &sy);
if (cursor->active_constraint->surface != surface) {
@@ -476,7 +476,7 @@ static void cursor_motion_absolute(struct sway_cursor *cursor,
dx, dy, dx, dy);
struct wlr_surface *surface = NULL;
- double sx, sy;
+ double sx = 0.0, sy = 0.0;
struct sway_node *node = node_at_coords(cursor->seat,
lx, ly, &surface, &sx, &sy);