29 lines
960 B
Diff
29 lines
960 B
Diff
|
From 7863c2abcfe4a235d60a2fffba173b9166012c12 Mon Sep 17 00:00:00 2001
|
||
|
From: =?UTF-8?q?Enrico=20Tr=C3=B6ger?= <enrico.troeger@uvena.de>
|
||
|
Date: Sun, 9 Jan 2022 12:35:27 +0100
|
||
|
Subject: [PATCH] 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.
|
||
|
---
|
||
|
src/vte.c | 4 ++++
|
||
|
1 file changed, 4 insertions(+)
|
||
|
|
||
|
diff --git a/src/vte.c b/src/vte.c
|
||
|
index 916e2c264e..5878966ccd 100644
|
||
|
--- a/src/vte.c
|
||
|
+++ b/src/vte.c
|
||
|
@@ -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);
|
||
|
}
|