<p>Connecting to <code>map-event</code> instead of <code>show</code> seems to work-around the problem:</p>
<div class="highlight highlight-source-diff"><pre><span class="pl-c1">diff --git a/plugins/splitwindow.c b/plugins/splitwindow.c</span>
index 4f0dec3..c6b91e4 100644
<span class="pl-md">--- a/plugins/splitwindow.c</span>
<span class="pl-mi1">+++ b/plugins/splitwindow.c</span>
<span class="pl-mdr">@@ -247,13 +247,15 @@</span> static void on_doc_menu_item_clicked(gpointer item, GeanyDocument *doc)
}
<span class="pl-md">-static void on_doc_menu_show(GtkMenu *menu)</span>
<span class="pl-mi1">+static gboolean on_doc_menu_show(GtkMenu *menu, GdkEvent *event, gpointer unused)</span>
{
/* clear the old menu items */
gtk_container_foreach(GTK_CONTAINER(menu), (GtkCallback) gtk_widget_destroy, NULL);
ui_menu_add_document_items(menu, edit_window.editor->document,
G_CALLBACK(on_doc_menu_item_clicked));
<span class="pl-mi1">+</span>
<span class="pl-mi1">+ return FALSE;</span>
}
<span class="pl-mdr">@@ -275,7 +277,7 @@</span> static GtkWidget *create_toolbar(void)
item = gtk_menu_new();
gtk_menu_tool_button_set_menu(GTK_MENU_TOOL_BUTTON(tool_item), item);
<span class="pl-md">- g_signal_connect(item, "show", G_CALLBACK(on_doc_menu_show), NULL);</span>
<span class="pl-mi1">+ g_signal_connect(item, "map-event", G_CALLBACK(on_doc_menu_show), NULL);</span>
tool_item = gtk_tool_item_new();
gtk_tool_item_set_expand(tool_item, TRUE);</pre></div>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/issues/1149#issuecomment-234847390">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJ6FQipg36He8LqELulkfbwDOaHeEks5qZFFmgaJpZM4JTxOO">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ0CV-OTv1fRj3PS8H0305KsfaDu9ks5qZFFmgaJpZM4JTxOO.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
<link itemprop="url" href="https://github.com/geany/geany/issues/1149#issuecomment-234847390"></link>
<meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>