fix(status-area): forward SNI scroll events (#1431)
StatusNotifierItems can expose a Scroll(int delta, string orientation) method for tray hosts to call when the user wheels over an item. The status-area applet handled activation and context menus, but did not forward wheel events to that method. Track the hovered tray item only while the pointer is over an icon, ignore wheel events already captured by widgets, accumulate fine-grained wheel deltas into discrete scroll steps, and call Scroll on the item proxy. Add unit coverage for the delta/orientation mapping and pixel accumulation. Signed-off-by: William Fish <william.michael.fish@gmail.com>
This commit is contained in:
parent
0441c67b10
commit
fddf3d569b
2 changed files with 109 additions and 7 deletions
|
|
@ -202,6 +202,8 @@ pub trait StatusNotifierItem {
|
|||
fn activate(&self, x: i32, y: i32) -> zbus::Result<()>;
|
||||
|
||||
fn secondary_activate(&self, x: i32, y: i32) -> zbus::Result<()>;
|
||||
|
||||
fn scroll(&self, delta: i32, orientation: &str) -> zbus::Result<()>;
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue