From 4dbb7347a4b344658d28cfd49f6a925f000422ee Mon Sep 17 00:00:00 2001 From: lukefromdc Date: Sat, 26 Dec 2015 17:35:48 -0500 Subject: gtk3: stop cpufreq-applet turning transparent gtk3: stop cpufreq-applet turning transparent -prevent the cpufreq applet and panel area beneath from becoming transparent to the desktop when a menu item in the popup menu is clicked. Veriied to work on gtk3.19.5 --- cpufreq/src/cpufreq-popup.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'cpufreq') diff --git a/cpufreq/src/cpufreq-popup.c b/cpufreq/src/cpufreq-popup.c index 82dc756a..278ebaf4 100644 --- a/cpufreq/src/cpufreq-popup.c +++ b/cpufreq/src/cpufreq-popup.c @@ -16,7 +16,7 @@ * License along with this library; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * - * Authors : Carlos García Campos + * Authors : Carlos García Campos */ #include @@ -198,8 +198,10 @@ cpufreq_popup_frequencies_menu_activate (GtkAction *action, cpu = cpufreq_monitor_get_cpu (popup->priv->monitor); name = gtk_action_get_name (action); freq = (guint) atoi (name + strlen ("Frequency")); + /*stop applet from turning transparent when menu clicked in gtk3.16 or later */ +#if !GTK_CHECK_VERSION (3, 0, 0) parent = GDK_WINDOW_XID (gtk_widget_get_window (popup->priv->parent)); - +#endif cpufreq_selector_set_frequency_async (selector, cpu, freq, parent); } @@ -222,8 +224,10 @@ cpufreq_popup_governors_menu_activate (GtkAction *action, cpu = cpufreq_monitor_get_cpu (popup->priv->monitor); name = gtk_action_get_name (action); governor = name + strlen ("Governor"); + /*stop applet from turning transparent when menu clicked in gtk3.16 or later */ +#if !GTK_CHECK_VERSION (3, 0, 0) parent = GDK_WINDOW_XID (gtk_widget_get_window (popup->priv->parent)); - +#endif cpufreq_selector_set_governor_async (selector, cpu, governor, parent); } -- cgit v1.2.1