Hi,<br><br><br>I'm struggling with an issue: GTK focus lost when last document closed.<br><br>To grab the focus by a plugin (eg. filebrowser) on such case would be an easy task, but not right, because the user can open documents from many widgets, the focus should return there.<br>
<br>I tried for a while with gtk_container_set_focus_chain() but no luck. Maybe my bad, I have no experience with GTK.<br><br>Other, simple solution if Geany provides a new API call. eg.:<br> void ui_focus_history_push(GtkWidget *widget);<br>
and widgets/plugins can call it on focus-out-event, so Geany (or a plugin) can restore the focus if there is no better strategy.<br><br>Another solution to extend<br> document_open_file(const gchar *locale_filename, gboolean readonly, GeanyFiletype *ft, const gchar *forced_enc)<br>
with "GtkWidget *widget" or introduce a new function like<br> document_open_file_from_widget(const gchar *locale_filename, gboolean readonly, GeanyFiletype *ft, const gchar *forced_enc, GtkWidget *widget)<br>to store opening widget with the document, but I think this can cause weird behavior if the last closed document were opened from a dialog window.<br>
<br>How should I fix it?<br><br><br>--<br> Roland Pallai<br><br>