[vte/vte-0-58] pty: Set size on creation



commit d5f459577a7a2943bf13995aa00a29fc1b086ceb
Author: Christian Persch <chpe src gnome org>
Date:   Sun Nov 3 22:38:24 2019 +0100

    pty: Set size on creation
    
    The size needs to be set before spawning the child process, so that
    the child process has the correct size from the start, instead of
    starting with a default size and then shortly afterwards receiving a
    SIGWINCH signal.
    
    https://gitlab.gnome.org/GNOME/vte/issues/188#note_635057
    (cherry picked from commit 07aad3e0d5e75bead37f94964907aee59dc9b12c)

 src/vtegtk.cc | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/vtegtk.cc b/src/vtegtk.cc
index c18a178a..c1ceb217 100644
--- a/src/vtegtk.cc
+++ b/src/vtegtk.cc
@@ -2559,8 +2559,9 @@ vte_terminal_get_cursor_position(VteTerminal *terminal,
  * @cancellable: (allow-none): a #GCancellable, or %NULL
  * @error: (allow-none): return location for a #GError, or %NULL
  *
- * Creates a new #VtePty, and sets the emulation property
- * from #VteTerminal:emulation.
+ * Creates a new #VtePty, sets the emulation property
+ * from #VteTerminal:emulation, and sets the size using
+ * @terminal's size.
  *
  * See vte_pty_new() for more information.
  *
@@ -2578,6 +2579,8 @@ vte_terminal_pty_new_sync(VteTerminal *terminal,
         if (pty == NULL)
                 return NULL;
 
+        vte_pty_set_size(pty, IMPL(terminal)->m_row_count, IMPL(terminal)->m_column_count, NULL);
+
         return pty;
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]