diff options
-rw-r--r-- | sway/desktop/output.c | 3 | ||||
-rw-r--r-- | sway/input/cursor.c | 2 | ||||
-rw-r--r-- | sway/input/seat.c | 9 |
3 files changed, 8 insertions, 6 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index 7e9f7b7e..e49c4cca 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c | |||
@@ -80,7 +80,8 @@ static bool get_surface_box(struct surface_iterator_data *data, | |||
80 | int sw = surface->current.width; | 80 | int sw = surface->current.width; |
81 | int sh = surface->current.height; | 81 | int sh = surface->current.height; |
82 | 82 | ||
83 | double _sx = sx, _sy = sy; | 83 | double _sx = sx + surface->sx; |
84 | double _sy = sy + surface->sy; | ||
84 | rotate_child_position(&_sx, &_sy, sw, sh, data->width, data->height, | 85 | rotate_child_position(&_sx, &_sy, sw, sh, data->width, data->height, |
85 | data->rotation); | 86 | data->rotation); |
86 | 87 | ||
diff --git a/sway/input/cursor.c b/sway/input/cursor.c index be3fc9c7..69a019bb 100644 --- a/sway/input/cursor.c +++ b/sway/input/cursor.c | |||
@@ -395,6 +395,7 @@ void cursor_send_pointer_motion(struct sway_cursor *cursor, uint32_t time_msec, | |||
395 | } | 395 | } |
396 | 396 | ||
397 | struct sway_seat *seat = cursor->seat; | 397 | struct sway_seat *seat = cursor->seat; |
398 | struct wlr_seat *wlr_seat = seat->wlr_seat; | ||
398 | 399 | ||
399 | if (seat->operation != OP_NONE) { | 400 | if (seat->operation != OP_NONE) { |
400 | switch (seat->operation) { | 401 | switch (seat->operation) { |
@@ -418,7 +419,6 @@ void cursor_send_pointer_motion(struct sway_cursor *cursor, uint32_t time_msec, | |||
418 | return; | 419 | return; |
419 | } | 420 | } |
420 | 421 | ||
421 | struct wlr_seat *wlr_seat = seat->wlr_seat; | ||
422 | struct wlr_surface *surface = NULL; | 422 | struct wlr_surface *surface = NULL; |
423 | double sx, sy; | 423 | double sx, sy; |
424 | 424 | ||
diff --git a/sway/input/seat.c b/sway/input/seat.c index e86a2b81..5709a7f7 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c | |||
@@ -222,16 +222,16 @@ void drag_icon_update_position(struct sway_drag_icon *icon) { | |||
222 | struct sway_seat *seat = icon->seat; | 222 | struct sway_seat *seat = icon->seat; |
223 | struct wlr_cursor *cursor = seat->cursor->cursor; | 223 | struct wlr_cursor *cursor = seat->cursor->cursor; |
224 | if (wlr_icon->is_pointer) { | 224 | if (wlr_icon->is_pointer) { |
225 | icon->x = cursor->x + wlr_icon->sx; | 225 | icon->x = cursor->x; |
226 | icon->y = cursor->y + wlr_icon->sy; | 226 | icon->y = cursor->y; |
227 | } else { | 227 | } else { |
228 | struct wlr_touch_point *point = | 228 | struct wlr_touch_point *point = |
229 | wlr_seat_touch_get_point(seat->wlr_seat, wlr_icon->touch_id); | 229 | wlr_seat_touch_get_point(seat->wlr_seat, wlr_icon->touch_id); |
230 | if (point == NULL) { | 230 | if (point == NULL) { |
231 | return; | 231 | return; |
232 | } | 232 | } |
233 | icon->x = seat->touch_x + wlr_icon->sx; | 233 | icon->x = seat->touch_x; |
234 | icon->y = seat->touch_y + wlr_icon->sy; | 234 | icon->y = seat->touch_y; |
235 | } | 235 | } |
236 | 236 | ||
237 | drag_icon_damage_whole(icon); | 237 | drag_icon_damage_whole(icon); |
@@ -289,6 +289,7 @@ static void handle_new_drag_icon(struct wl_listener *listener, void *data) { | |||
289 | wl_list_insert(&root->drag_icons, &icon->link); | 289 | wl_list_insert(&root->drag_icons, &icon->link); |
290 | 290 | ||
291 | drag_icon_update_position(icon); | 291 | drag_icon_update_position(icon); |
292 | seat_end_mouse_operation(seat); | ||
292 | } | 293 | } |
293 | 294 | ||
294 | static void collect_focus_iter(struct sway_node *node, void *data) { | 295 | static void collect_focus_iter(struct sway_node *node, void *data) { |