Commit 2a6e520a authored by Oswald Buddenhagen's avatar Oswald Buddenhagen
Browse files

ensure that window size is correct before starting session (again)

commit b84c0f49 replaced the previous hack, clearly failing to notice
that in-thread qobject conections are direct by default. we need to make
the competing connection queued instead.

this remains a hack; a proper solution would be avoiding the instant
resize by skipping the initialization to 80x25, but i'm not going to
touch any of that mess.

BUG: 412598
parent 5729e671
......@@ -182,10 +182,12 @@ void Session::openTeletype(int fd, bool runShell)
this, &Konsole::Session::done);
// emulator size
// Use a direct connection to ensure that the window size is set before it runs
connect(_emulation, &Konsole::Emulation::imageSizeChanged, this, &Konsole::Session::updateWindowSize, Qt::DirectConnection);
connect(_emulation, &Konsole::Emulation::imageSizeChanged, this, &Konsole::Session::updateWindowSize);
if (fd < 0 || runShell) {
connect(_emulation, &Konsole::Emulation::imageSizeInitialized, this, &Konsole::Session::run);
// Using a queued connection guarantees that starting the session
// is delayed until all (both) image size updates at startup have
// been processed. See #203185 and #412598.
connect(_emulation, &Konsole::Emulation::imageSizeInitialized, this, &Konsole::Session::run, Qt::QueuedConnection);
} else {
// run needs to be disconnected, as it may be already connected by the constructor
disconnect(_emulation, &Konsole::Emulation::imageSizeInitialized, this, &Konsole::Session::run);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment