diff --git a/overlays/patches/eww.patch b/overlays/patches/eww.patch index 22d1776..a4b4f08 100644 --- a/overlays/patches/eww.patch +++ b/overlays/patches/eww.patch @@ -2,15 +2,6 @@ diff --git a/crates/eww/src/widgets/widget_definitions.rs b/crates/eww/src/widge index 16f1f17d063..08d54cbe343 100644 --- a/crates/eww/src/widgets/widget_definitions.rs +++ b/crates/eww/src/widgets/widget_definitions.rs -@@ -8,7 +8,7 @@ use crate::{ - use anyhow::{anyhow, Context, Result}; - use codespan_reporting::diagnostic::Severity; - use eww_shared_util::Spanned; --use gdk::{ModifierType, NotifyType}; -+use gdk::{ModifierType, NotifyType, ScrollDirection}; - - use glib::translate::FromGlib; - use gtk::{self, glib, prelude::*, DestDefaults, TargetEntry, TargetList}; @@ -679,11 +679,14 @@ fn build_gtk_event_box(bargs: &mut BuilderArgs) -> Result { // @prop onscroll - event to execute when the user scrolls with the mouse over the widget. The placeholder `{}` used in the command will be replaced with either `up` or `down`. prop(timeout: as_duration = Duration::from_millis(200), onscroll: as_string) { @@ -22,8 +13,8 @@ index 16f1f17d063..08d54cbe343 100644 - run_command(timeout, &onscroll, &[if delta < 0f64 { "up" } else { "down" }]); + connect_single_handler!(gtk_widget, gtk_widget.connect_scroll_event(move |_, evt| { + let dir = match evt.direction() { -+ ScrollDirection::Left => "up", -+ ScrollDirection::Right => "down", ++ gdk::ScrollDirection::Left => "up", ++ gdk::ScrollDirection::Right => "down", + _ => "", + }; + if dir != "" {