diff options
author | Luke from DC <[email protected]> | 2023-07-10 15:48:49 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2023-07-10 17:48:49 +0200 |
commit | 56800933d572091490dd686ef13df2ff04340309 (patch) | |
tree | abd9ba872af5ddcd2cbf720efb58b2ca0f060023 | |
parent | a217a0b96b4e6524ac5286125e18d62b1b91e71f (diff) | |
download | mate-media-56800933d572091490dd686ef13df2ff04340309.tar.bz2 mate-media-56800933d572091490dd686ef13df2ff04340309.tar.xz |
in-process: enable scrolling on icon as in out of process builds
* in-process: enable scrolling on icon as in out of process builds
- Use same code to catch scroll events in-process and out
-rw-r--r-- | mate-volume-control/gvc-applet.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/mate-volume-control/gvc-applet.c b/mate-volume-control/gvc-applet.c index 3b05afe..8476aa9 100644 --- a/mate-volume-control/gvc-applet.c +++ b/mate-volume-control/gvc-applet.c @@ -509,9 +509,6 @@ gboolean gvc_applet_fill (GvcApplet *applet, MatePanelApplet* applet_widget) { #ifndef IN_PROCESS - GdkEventMask event_mask; - GdkWindow *window; - g_set_application_name (_("Volume Control Applet")); gtk_window_set_default_icon_name (APPLET_ICON); mate_panel_applet_set_flags (applet_widget, MATE_PANEL_APPLET_EXPAND_MINOR); @@ -545,16 +542,10 @@ gvc_applet_fill (GvcApplet *applet, MatePanelApplet* applet_widget) gtk_container_add (GTK_CONTAINER (applet->priv->applet), GTK_WIDGET (applet->priv->box)); gtk_widget_show_all (GTK_WIDGET (applet->priv->applet)); -#ifndef IN_PROCESS - /* Enable 'scroll-event' signal to get through */ - window = gtk_widget_get_window (GTK_WIDGET (applet->priv->icon_input)); - event_mask = gdk_window_get_events (window); - gdk_window_set_events (window, event_mask | GDK_SCROLL_MASK); - - window = gtk_widget_get_window (GTK_WIDGET (applet->priv->icon_output)); - event_mask = gdk_window_get_events (window); - gdk_window_set_events (window, event_mask | GDK_SCROLL_MASK); -#endif + /* Enable 'scroll-event' signal to be received */ + gtk_widget_add_events (GTK_WIDGET(applet->priv->icon_input), GDK_SCROLL_MASK); + gtk_widget_add_events (GTK_WIDGET(applet->priv->icon_output), GDK_SCROLL_MASK); + /* Update icons on size/orientation changes*/ g_object_connect (applet->priv->applet, "signal::change_size", gvc_applet_set_size, applet, |