[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 03/18: Fix menu flashing when button is pressed rapidly.

noreply at xfce.org noreply at xfce.org
Sat Aug 20 18:34:47 CEST 2016


This is an automated email from the git hooks/post-receive script.

gottcode pushed a commit to annotated tag v1.3.2
in repository panel-plugins/xfce4-whiskermenu-plugin.

commit bcf209bfac6f980bc00abd0635efb24ed0f1d8d5
Author: Graeme Gott <graeme at gottcode.org>
Date:   Fri Feb 28 07:15:21 2014 -0500

    Fix menu flashing when button is pressed rapidly.
---
 panel-plugin/plugin.cpp | 13 ++++++++-----
 panel-plugin/plugin.h   |  4 ++--
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/panel-plugin/plugin.cpp b/panel-plugin/plugin.cpp
index fca2892..9c0cf65 100644
--- a/panel-plugin/plugin.cpp
+++ b/panel-plugin/plugin.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013 Graeme Gott <graeme at gottcode.org>
+ * Copyright (C) 2013, 2014 Graeme Gott <graeme at gottcode.org>
  *
  * This library is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -257,7 +257,7 @@ gboolean Plugin::button_clicked(GtkWidget*, GdkEvent* event)
 	}
 	else
 	{
-		popup_menu(false);
+		popup_menu(false, false);
 	}
 
 	return true;
@@ -311,7 +311,7 @@ gboolean Plugin::remote_event(XfcePanelPlugin*, gchar* name, GValue* value)
 	}
 	else
 	{
-		popup_menu(value && G_VALUE_HOLDS_BOOLEAN(value) && g_value_get_boolean(value));
+		popup_menu(value && G_VALUE_HOLDS_BOOLEAN(value) && g_value_get_boolean(value), true);
 	}
 
 	return true;
@@ -392,12 +392,15 @@ gboolean Plugin::size_changed(XfcePanelPlugin*, gint size)
 
 //-----------------------------------------------------------------------------
 
-void Plugin::popup_menu(bool at_cursor)
+void Plugin::popup_menu(bool at_cursor, bool activate_button)
 {
 	if (!at_cursor)
 	{
 		xfce_panel_plugin_block_autohide(m_plugin, true);
-		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(m_button), true);
+		if (activate_button)
+		{
+			gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(m_button), true);
+		}
 		m_window->show(m_button, xfce_panel_plugin_get_orientation(m_plugin) == GTK_ORIENTATION_HORIZONTAL);
 	}
 	else
diff --git a/panel-plugin/plugin.h b/panel-plugin/plugin.h
index c6b8227..28a033a 100644
--- a/panel-plugin/plugin.h
+++ b/panel-plugin/plugin.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013 Graeme Gott <graeme at gottcode.org>
+ * Copyright (C) 2013, 2014 Graeme Gott <graeme at gottcode.org>
  *
  * This library is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -69,7 +69,7 @@ private:
 	gboolean remote_event(XfcePanelPlugin*, gchar* name, GValue* value);
 	void save();
 	gboolean size_changed(XfcePanelPlugin*, gint size);
-	void popup_menu(bool at_cursor);
+	void popup_menu(bool at_cursor, bool activate_button);
 
 private:
 	XfcePanelPlugin* m_plugin;

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list