git.lucas.co / cce-mail
mail client (IMAP/SMTP)
git clone https://git.lucas.co/cce-mail.git

commit39e680532f60bec3ef7ba096adec060e8c3e71bb
parentfe58cc820a
authorLucas Galante <[email protected]>
date2026-08-21 14:07
feat: resize cursor over the split separator

cce-ui consults Application::cursor_icon(x, y) on every pointer frame and
this app never implemented it, so the separator showed the default arrow.
EwResize now covers the grab band and the whole drag — mid-drag the
pointer legally outruns the clamped line, and the cursor must not
flicker back to the arrow there. (cce-designer's pane-edge hotspots are
the precedent, down to the drag-duration rule.)

Co-Authored-By: Claude Fable 5 <[email protected]>

 src/main.rs | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/src/main.rs b/src/main.rs
index 134193c..ceca49a 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -2,7 +2,7 @@ mod scroll_region;
 use scroll_region::ScrollRegion;
 use wayland_client::QueueHandle;
 use cce_ui::cosmic_text::FontSystem;
-use cce_ui::engine::{Application, EngineState, LogicalPosition, LogicalSize, WindowSettings};
+use cce_ui::engine::{Application, CursorIcon, EngineState, LogicalPosition, LogicalSize, WindowSettings};
 use cce_ui::widget::{
     MouseButton, ElementState, MouseScrollDelta, KeyEvent, WidgetHost,
     TextBox, Button, TextLabel, Key, Dropdown
@@ -3189,6 +3189,19 @@ impl Application for ClearEmailApp {
         Some(__pc.finish())
     }
 
+    fn cursor_icon(&self, x: f32, y: f32) -> Option<CursorIcon> {
+        // Resize arrows over the split separator's grab band, and for the
+        // whole drag — mid-drag the pointer legally outruns the clamped
+        // line, and the cursor must not flicker back to the arrow there.
+        if !self.compose_open
+            && (self.split_dragging
+                || ((x - self.split_geom().1).abs() <= SPLIT_GRAB_SLOP && y > MENUBAR_H))
+        {
+            return Some(CursorIcon::EwResize);
+        }
+        None
+    }
+
     fn display_list_text(&self) -> bool {
         true
     }