diff options
author | Tony Crisci <tony@dubstepdish.com> | 2018-01-14 13:19:21 -0500 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2018-01-14 13:19:21 -0500 |
commit | 83ddd2d9dbee1b77993f5cc45427854e18aae6f1 (patch) | |
tree | f2ec5fbc8b47b66f85978aa7feb1a09e34aaf569 /sway/input | |
parent | render wl-shell and xwayland views (diff) | |
download | sway-83ddd2d9dbee1b77993f5cc45427854e18aae6f1.tar.gz sway-83ddd2d9dbee1b77993f5cc45427854e18aae6f1.tar.zst sway-83ddd2d9dbee1b77993f5cc45427854e18aae6f1.zip |
render override redirect
Diffstat (limited to 'sway/input')
-rw-r--r-- | sway/input/cursor.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c index c51b59f9..e6a4eca8 100644 --- a/sway/input/cursor.c +++ b/sway/input/cursor.c | |||
@@ -24,6 +24,31 @@ static void cursor_send_pointer_motion(struct sway_cursor *cursor, | |||
24 | struct wlr_seat *seat = cursor->seat->wlr_seat; | 24 | struct wlr_seat *seat = cursor->seat->wlr_seat; |
25 | struct wlr_surface *surface = NULL; | 25 | struct wlr_surface *surface = NULL; |
26 | double sx, sy; | 26 | double sx, sy; |
27 | |||
28 | // check for unmanaged views first | ||
29 | struct sway_view *view; | ||
30 | wl_list_for_each_reverse(view, &root_container.sway_root->unmanaged_views, | ||
31 | unmanaged_view_link) { | ||
32 | if (view->type == SWAY_XWAYLAND_VIEW) { | ||
33 | struct wlr_xwayland_surface *xsurface = view->wlr_xwayland_surface; | ||
34 | struct wlr_box box = { | ||
35 | .x = xsurface->x, | ||
36 | .y = xsurface->y, | ||
37 | .width = xsurface->width, | ||
38 | .height = xsurface->height, | ||
39 | }; | ||
40 | |||
41 | if (wlr_box_contains_point(&box, cursor->x, cursor->y)) { | ||
42 | surface = xsurface->surface; | ||
43 | sx = cursor->x - box.x; | ||
44 | sy = cursor->y - box.y; | ||
45 | wlr_seat_pointer_notify_enter(seat, surface, sx, sy); | ||
46 | wlr_seat_pointer_notify_motion(seat, time, sx, sy); | ||
47 | return; | ||
48 | } | ||
49 | } | ||
50 | } | ||
51 | |||
27 | swayc_t *swayc = | 52 | swayc_t *swayc = |
28 | swayc_at(&root_container, cursor->x, cursor->y, &surface, &sx, &sy); | 53 | swayc_at(&root_container, cursor->x, cursor->y, &surface, &sx, &sy); |
29 | if (swayc) { | 54 | if (swayc) { |