diff options
author | Ryan Dwyer <RyanDwyer@users.noreply.github.com> | 2018-08-03 08:18:09 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-03 08:18:09 +1000 |
commit | e07da5fc5c6ac5c186662b56b08ca71531119de0 (patch) | |
tree | 428ebc7eb82930ff38d495862afe7ee7c5042f4b | |
parent | Merge pull request #2410 from minus7/fix-fullscreen (diff) | |
parent | Fix pointer events for fullscreen views (diff) | |
download | sway-e07da5fc5c6ac5c186662b56b08ca71531119de0.tar.gz sway-e07da5fc5c6ac5c186662b56b08ca71531119de0.tar.zst sway-e07da5fc5c6ac5c186662b56b08ca71531119de0.zip |
Merge pull request #2411 from emersion/fullscreen-pointer-input
Fix pointer events for fullscreen views
-rw-r--r-- | include/sway/tree/container.h | 4 | ||||
-rw-r--r-- | sway/input/cursor.c | 3 | ||||
-rw-r--r-- | sway/tree/container.c | 2 |
3 files changed, 7 insertions, 2 deletions
diff --git a/include/sway/tree/container.h b/include/sway/tree/container.h index 12ff8a5a..c3942e9e 100644 --- a/include/sway/tree/container.h +++ b/include/sway/tree/container.h | |||
@@ -234,6 +234,10 @@ struct sway_container *container_at(struct sway_container *workspace, | |||
234 | double lx, double ly, struct wlr_surface **surface, | 234 | double lx, double ly, struct wlr_surface **surface, |
235 | double *sx, double *sy); | 235 | double *sx, double *sy); |
236 | 236 | ||
237 | struct sway_container *container_at_view(struct sway_container *view, | ||
238 | double lx, double ly, struct wlr_surface **surface, | ||
239 | double *sx, double *sy); | ||
240 | |||
237 | /** | 241 | /** |
238 | * Apply the function for each descendant of the container breadth first. | 242 | * Apply the function for each descendant of the container breadth first. |
239 | */ | 243 | */ |
diff --git a/sway/input/cursor.c b/sway/input/cursor.c index 99858d93..c2fc4e9e 100644 --- a/sway/input/cursor.c +++ b/sway/input/cursor.c | |||
@@ -99,7 +99,8 @@ static struct sway_container *container_at_coords( | |||
99 | return ws; | 99 | return ws; |
100 | } | 100 | } |
101 | if (ws->sway_workspace->fullscreen) { | 101 | if (ws->sway_workspace->fullscreen) { |
102 | return container_at(ws, lx, ly, surface, sx, sy); | 102 | return container_at_view(ws->sway_workspace->fullscreen, lx, ly, |
103 | surface, sx, sy); | ||
103 | } | 104 | } |
104 | if ((*surface = layer_surface_at(output, | 105 | if ((*surface = layer_surface_at(output, |
105 | &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_TOP], | 106 | &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_TOP], |
diff --git a/sway/tree/container.c b/sway/tree/container.c index b980c5e9..46c54e2d 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c | |||
@@ -535,7 +535,7 @@ struct sway_container *container_parent(struct sway_container *container, | |||
535 | return container; | 535 | return container; |
536 | } | 536 | } |
537 | 537 | ||
538 | static struct sway_container *container_at_view(struct sway_container *swayc, | 538 | struct sway_container *container_at_view(struct sway_container *swayc, |
539 | double lx, double ly, | 539 | double lx, double ly, |
540 | struct wlr_surface **surface, double *sx, double *sy) { | 540 | struct wlr_surface **surface, double *sx, double *sy) { |
541 | if (!sway_assert(swayc->type == C_VIEW, "Expected a view")) { | 541 | if (!sway_assert(swayc->type == C_VIEW, "Expected a view")) { |