[Github-comments] [geany/geany] Split window file selector does not work (#1149)

Matthew Brush notifications at xxxxx
Mon Jul 25 06:02:14 UTC 2016


Connecting to `map-event` instead of `show` seems to work-around the problem:

```diff
diff --git a/plugins/splitwindow.c b/plugins/splitwindow.c
index 4f0dec3..c6b91e4 100644
--- a/plugins/splitwindow.c
+++ b/plugins/splitwindow.c
@@ -247,13 +247,15 @@ static void on_doc_menu_item_clicked(gpointer item, GeanyDocument *doc)
 }
 
 
-static void on_doc_menu_show(GtkMenu *menu)
+static gboolean on_doc_menu_show(GtkMenu *menu, GdkEvent *event, gpointer unused)
 {
 	/* 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));
+
+	return FALSE;
 }
 
 
@@ -275,7 +277,7 @@ static GtkWidget *create_toolbar(void)
 
 	item = gtk_menu_new();
 	gtk_menu_tool_button_set_menu(GTK_MENU_TOOL_BUTTON(tool_item), item);
-	g_signal_connect(item, "show", G_CALLBACK(on_doc_menu_show), NULL);
+	g_signal_connect(item, "map-event", G_CALLBACK(on_doc_menu_show), NULL);
 
 	tool_item = gtk_tool_item_new();
 	gtk_tool_item_set_expand(tool_item, TRUE);
```

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1149#issuecomment-234847390
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20160724/2c462282/attachment.html>


More information about the Github-comments mailing list