summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sway/input/cursor.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c
index 8f44eeae..409e7b12 100644
--- a/sway/input/cursor.c
+++ b/sway/input/cursor.c
@@ -1096,6 +1096,8 @@ static void dispatch_cursor_axis(struct sway_cursor *cursor,
1096 enum wlr_edges edge = cont ? find_edge(cont, cursor) : WLR_EDGE_NONE; 1096 enum wlr_edges edge = cont ? find_edge(cont, cursor) : WLR_EDGE_NONE;
1097 bool on_border = edge != WLR_EDGE_NONE; 1097 bool on_border = edge != WLR_EDGE_NONE;
1098 bool on_titlebar = cont && !on_border && !surface; 1098 bool on_titlebar = cont && !on_border && !surface;
1099 bool on_titlebar_border = cont && on_border &&
1100 cursor->cursor->y < cont->content_y;
1099 bool on_contents = cont && !on_border && surface; 1101 bool on_contents = cont && !on_border && surface;
1100 float scroll_factor = 1102 float scroll_factor =
1101 (ic == NULL || ic->scroll_factor == FLT_MIN) ? 1.0f : ic->scroll_factor; 1103 (ic == NULL || ic->scroll_factor == FLT_MIN) ? 1.0f : ic->scroll_factor;
@@ -1121,7 +1123,7 @@ static void dispatch_cursor_axis(struct sway_cursor *cursor,
1121 } 1123 }
1122 1124
1123 // Scrolling on a tabbed or stacked title bar (handled as press event) 1125 // Scrolling on a tabbed or stacked title bar (handled as press event)
1124 if (!handled && on_titlebar) { 1126 if (!handled && (on_titlebar || on_titlebar_border)) {
1125 enum sway_container_layout layout = container_parent_layout(cont); 1127 enum sway_container_layout layout = container_parent_layout(cont);
1126 if (layout == L_TABBED || layout == L_STACKED) { 1128 if (layout == L_TABBED || layout == L_STACKED) {
1127 struct sway_node *tabcontainer = node_get_parent(node); 1129 struct sway_node *tabcontainer = node_get_parent(node);