[geany/geany] 7863c2: Manually realize the VTE widget on startup

Enrico Tröger git-noreply at geany.org
Sun Apr 10 10:40:37 UTC 2022


Branch:      refs/heads/master
Author:      Enrico Tröger <enrico.troeger at uvena.de>
Committer:   Enrico Tröger <enrico.troeger at uvena.de>
Date:        Sun, 10 Apr 2022 10:40:37 UTC
Commit:      7863c2abcfe4a235d60a2fffba173b9166012c12
             https://github.com/geany/geany/commit/7863c2abcfe4a235d60a2fffba173b9166012c12

Log Message:
-----------
Manually realize the VTE widget on startup

This should fix crashes when pasting text into the widget before it has
been fully realized (e.g. when it was never shown before).

Fixes #2813.


Modified Paths:
--------------
    src/vte.c

Modified: src/vte.c
4 lines changed, 4 insertions(+), 0 deletions(-)
===================================================================
@@ -240,6 +240,10 @@ static void on_startup_complete(G_GNUC_UNUSED GObject *dummy)
 {
 	GeanyDocument *doc = document_get_current();
 
+	/* ensure the widget is mapped and fully initialized, so actions like pasting text work
+	 * (see https://github.com/geany/geany/issues/2813 for details) */
+	gtk_widget_realize(vc->vte);
+
 	if (doc)
 		vte_cwd((doc->real_path != NULL) ? doc->real_path : doc->file_name, FALSE);
 }



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Commits mailing list