aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/cursor.c
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2018-05-26 10:35:15 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2018-05-26 10:35:15 -0400
commitfea654a6ce4d618bfd0cc9b5d78d0726802889ec (patch)
tree6b89a2ddfc7722b20e9a1e563ddd1c8477c6bd8f /sway/input/cursor.c
parentMerge pull request #2030 from chebykinn/fix-focus-follows-mouse-tabs (diff)
downloadsway-fea654a6ce4d618bfd0cc9b5d78d0726802889ec.tar.gz
sway-fea654a6ce4d618bfd0cc9b5d78d0726802889ec.tar.zst
sway-fea654a6ce4d618bfd0cc9b5d78d0726802889ec.zip
Replace oft-failing abort with if statement
Fixes #2045
Diffstat (limited to 'sway/input/cursor.c')
-rw-r--r--sway/input/cursor.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c
index 98780989..1cf432f3 100644
--- a/sway/input/cursor.c
+++ b/sway/input/cursor.c
@@ -161,15 +161,12 @@ void cursor_send_pointer_motion(struct sway_cursor *cursor, uint32_t time_msec,
161 if (output != focus) { 161 if (output != focus) {
162 seat_set_focus_warp(cursor->seat, c, false); 162 seat_set_focus_warp(cursor->seat, c, false);
163 } 163 }
164 } else { 164 } else if (c->type == C_VIEW) {
165 // Don't switch focus on title mouseover for 165 // Don't switch focus on title mouseover for
166 // stacked and tabbed layouts 166 // stacked and tabbed layouts
167 // If pointed container is in nested containers which are 167 // If pointed container is in nested containers which are
168 // inside tabbed/stacked layout we should skip them 168 // inside tabbed/stacked layout we should skip them
169 bool do_mouse_focus = true; 169 bool do_mouse_focus = true;
170 if(!sway_assert(c->type == C_VIEW, "pointed container is not a view")) {
171 return;
172 }
173 bool is_visible = view_is_visible(c->sway_view); 170 bool is_visible = view_is_visible(c->sway_view);
174 struct sway_container *p = c->parent; 171 struct sway_container *p = c->parent;
175 while (p) { 172 while (p) {