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

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

commit b10ca9622461f78af55f76c672cbdd3c23855f29
Author: Graeme Gott <gra...@gottcode.org>
Date:   Mon Apr 2 16:50:29 2018 -0400

    Fix losing search focus. (bug #14209)
---
 panel-plugin/window.cpp | 14 ++++++++++++++
 panel-plugin/window.h   |  3 ++-
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/panel-plugin/window.cpp b/panel-plugin/window.cpp
index c62f4c3..2d6f39f 100644
--- a/panel-plugin/window.cpp
+++ b/panel-plugin/window.cpp
@@ -114,6 +114,7 @@ WhiskerMenu::Window::Window() :
        g_signal_connect_slot(m_window, "key-press-event", 
&Window::on_key_press_event, this);
        g_signal_connect_slot(m_window, "key-press-event", 
&Window::on_key_press_event_after, this, true);
        g_signal_connect_slot(m_window, "map-event", &Window::on_map_event, 
this);
+       g_signal_connect_slot(m_window, "state-flags-changed", 
&Window::on_state_flags_changed_event, this);
        g_signal_connect_slot(m_window, "configure-event", 
&Window::on_configure_event, this);
        g_signal_connect(m_window, "delete_event", 
G_CALLBACK(gtk_widget_hide_on_delete), NULL);
 
@@ -835,6 +836,19 @@ gboolean WhiskerMenu::Window::on_map_event(GtkWidget*, 
GdkEvent*)
 
 //-----------------------------------------------------------------------------
 
+gboolean WhiskerMenu::Window::on_state_flags_changed_event(GtkWidget* widget, 
GtkStateFlags)
+{
+       // Refocus and raise window if visible
+       if (gtk_widget_get_visible(widget))
+       {
+               gtk_window_present(m_window);
+       }
+
+       return false;
+}
+
+//-----------------------------------------------------------------------------
+
 gboolean WhiskerMenu::Window::on_configure_event(GtkWidget*, GdkEvent* event)
 {
        GdkEventConfigure* configure_event = 
reinterpret_cast<GdkEventConfigure*>(event);
diff --git a/panel-plugin/window.h b/panel-plugin/window.h
index 4cccee9..68c72a9 100644
--- a/panel-plugin/window.h
+++ b/panel-plugin/window.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013, 2014, 2015, 2016 Graeme Gott <gra...@gottcode.org>
+ * Copyright (C) 2013, 2014, 2015, 2016, 2018 Graeme Gott <gra...@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
@@ -80,6 +80,7 @@ private:
        gboolean on_key_press_event(GtkWidget* widget, GdkEvent* event);
        gboolean on_key_press_event_after(GtkWidget* widget, GdkEvent* event);
        gboolean on_map_event(GtkWidget*, GdkEvent*);
+       gboolean on_state_flags_changed_event(GtkWidget*widget, GtkStateFlags);
        gboolean on_configure_event(GtkWidget*, GdkEvent* event);
        void on_screen_changed_event(GtkWidget* widget, GdkScreen* old_screen);
        gboolean on_draw_event(GtkWidget* widget, cairo_t* cr);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits

Reply via email to