diff options
author | emersion <contact@emersion.fr> | 2018-08-03 09:47:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-03 09:47:54 +0100 |
commit | 16c1e21f26ad47fb3ecfee994b19c5215734a543 (patch) | |
tree | 8c9251aeeedcfdd86381665e412c38b64a90d052 /sway | |
parent | Merge pull request #2413 from RyanDwyer/dont-move-empty-workspace (diff) | |
parent | Fix crash when moving cursor over a fullscreen split container (diff) | |
download | sway-16c1e21f26ad47fb3ecfee994b19c5215734a543.tar.gz sway-16c1e21f26ad47fb3ecfee994b19c5215734a543.tar.zst sway-16c1e21f26ad47fb3ecfee994b19c5215734a543.zip |
Merge pull request #2415 from RyanDwyer/fix-fullscreen-container-crash
Fix crash when moving cursor over a fullscreen split container
Diffstat (limited to 'sway')
-rw-r--r-- | sway/input/cursor.c | 2 | ||||
-rw-r--r-- | sway/tree/container.c | 8 |
2 files changed, 3 insertions, 7 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c index c2fc4e9e..80b4f9dc 100644 --- a/sway/input/cursor.c +++ b/sway/input/cursor.c | |||
@@ -99,7 +99,7 @@ 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_view(ws->sway_workspace->fullscreen, lx, ly, | 102 | return tiling_container_at(ws->sway_workspace->fullscreen, lx, ly, |
103 | surface, sx, sy); | 103 | surface, sx, sy); |
104 | } | 104 | } |
105 | if ((*surface = layer_surface_at(output, | 105 | if ((*surface = layer_surface_at(output, |
diff --git a/sway/tree/container.c b/sway/tree/container.c index 46c54e2d..4a503652 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 | struct sway_container *container_at_view(struct sway_container *swayc, | 538 | static 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")) { |
@@ -574,10 +574,6 @@ struct sway_container *container_at_view(struct sway_container *swayc, | |||
574 | return NULL; | 574 | return NULL; |
575 | } | 575 | } |
576 | 576 | ||
577 | static struct sway_container *tiling_container_at( | ||
578 | struct sway_container *con, double lx, double ly, | ||
579 | struct wlr_surface **surface, double *sx, double *sy); | ||
580 | |||
581 | /** | 577 | /** |
582 | * container_at for a container with layout L_TABBED. | 578 | * container_at for a container with layout L_TABBED. |
583 | */ | 579 | */ |
@@ -684,7 +680,7 @@ static struct sway_container *floating_container_at(double lx, double ly, | |||
684 | return NULL; | 680 | return NULL; |
685 | } | 681 | } |
686 | 682 | ||
687 | static struct sway_container *tiling_container_at( | 683 | struct sway_container *tiling_container_at( |
688 | struct sway_container *con, double lx, double ly, | 684 | struct sway_container *con, double lx, double ly, |
689 | struct wlr_surface **surface, double *sx, double *sy) { | 685 | struct wlr_surface **surface, double *sx, double *sy) { |
690 | if (con->type == C_VIEW) { | 686 | if (con->type == C_VIEW) { |