--- a/gntmain.c Fri May 10 01:43:44 2019 -0400
+++ b/gntmain.c Fri May 10 01:44:45 2019 -0400
@@ -709,10 +709,11 @@
void gnt_window_present(GntWidget *window)
+ if (gnt_wm_get_event_stack(wm)) { gnt_wm_raise_window(wm, window);
gnt_widget_set_urgent(window);
void gnt_screen_occupy(GntWidget *widget)
--- a/gntwm.c Fri May 10 01:43:44 2019 -0400
+++ b/gntwm.c Fri May 10 01:44:45 2019 -0400
@@ -85,6 +85,12 @@
GntListWindow *actions; /* Action-list window */
GList *acts; /* List of actions */
+ /* Will be set to %TRUE when a user-event, ie. a mouse-click or a + * key-press is being processed. This variable will be used to + * determine whether to give focus to a new window. @@ -419,7 +425,6 @@
priv->cws = priv->workspaces->data;
- wm->event_stack = FALSE;
wm->nodes = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, free_node);
wm->positions = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free);
if (gnt_style_get_bool(GNT_STYLE_REMPOS, TRUE))
@@ -1946,7 +1951,7 @@
gnt_ws_append_widget(ws, widget);
- if (wm->event_stack || gnt_wm_is_list_window(wm, node->me) ||
+ if (priv->event_stack || gnt_wm_is_list_window(wm, node->me) || gnt_ws_is_top_widget(ws, node->me)) {
gnt_wm_raise_window(wm, node->me);
@@ -2412,8 +2417,25 @@
+gnt_wm_get_event_stack(GntWM *wm) + GntWMPrivate *priv = NULL; + g_return_val_if_fail(GNT_IS_WM(wm), FALSE); + priv = gnt_wm_get_instance_private(wm); + return priv->event_stack; gnt_wm_set_event_stack(GntWM *wm, gboolean set)
+ GntWMPrivate *priv = NULL; + g_return_if_fail(GNT_IS_WM(wm)); + priv = gnt_wm_get_instance_private(wm); + priv->event_stack = set; --- a/gntwm.h Fri May 10 01:43:44 2019 -0400
+++ b/gntwm.h Fri May 10 01:44:45 2019 -0400
@@ -89,9 +89,6 @@
* screen. If there is a menu being displayed, then all the keystrokes
* will be sent to the menu until it is closed, either when the user
* activates a menuitem, or presses Escape to cancel the menu.
- * @event_stack: Will be set to %TRUE when a user-event, ie. a mouse-click or a
- * key-press is being processed. This variable will be used to
- * determine whether to give focus to a new window.
* Access to any fields is deprecated. See inline comments for replacements.
@@ -109,8 +106,6 @@
- gboolean GNTSEAL(event_stack);
GntKeyPressMode GNTSEAL(mode);
GHashTable *GNTSEAL(positions);
--- a/gntwmprivate.h Fri May 10 01:43:44 2019 -0400
+++ b/gntwmprivate.h Fri May 10 01:44:45 2019 -0400
@@ -44,6 +44,7 @@
void gnt_wm_add_action(GntWM *wm, GntAction *action);
+gboolean gnt_wm_get_event_stack(GntWM *wm); void gnt_wm_set_event_stack(GntWM *wm, gboolean set);