summaryrefslogtreecommitdiff
path: root/cpufreq/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpufreq/src')
-rw-r--r--cpufreq/src/cpufreq-popup.c10
1 files changed, 7 insertions, 3 deletions
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 <[email protected]>
+ * Authors : Carlos García Campos <[email protected]>
*/
#include <glib/gi18n.h>
@@ -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);
}