Konsole: Fix invisible detached view content
Needs ReviewPublic

Authored by jnoack on Mar 3 2018, 1:04 AM.

Details

Reviewers
None
Group Reviewers
Konsole
Summary

I noticed this issue while working on another feature. When there are multiple tabs inside Konsole and one is dragged outside to create a detached view
the content of the new Konsole window is initially empty until a resize or click happens.


(Notice how there should be the prompt)

I couldn't figure out the the exact cause, but passing a different
size in Application.cpp:

void Application::detachView(Session *session)
{
    ...
    // When detaching a view, the size of the new window should equal the
    // size of the source window
    Session *newsession = window->viewManager()->activeViewController()->session();
    newsession->setSize(session->size()); //<---- e.g QSize(400, 400)

fixes the issue at first glance. Then I looked further into what setSize does and eventually landed inside TerminalDisplay. After some playing around it worked by calling updateImage instead of updateGeometry.

Test Plan
  1. Detach a tab
  2. Now Visible

Diff Detail

Repository
R319 Konsole
Lint
Lint Skipped
Unit
Unit Tests Skipped
jnoack requested review of this revision.Mar 3 2018, 1:04 AM
jnoack created this revision.

What version are you using? It works here showing the prompt.

jnoack added a comment.Mar 4 2018, 9:03 AM

What version are you using? It works here showing the prompt.

I just checked it with the latest gitunstable Neon-20180304. It doesn't happen with the default configuration.
You need to enable "Show Tab Bar When Needed" (this is what I always enable first, should have mentioned it):

OK thanks - confirmed - I'll look at the code although change the update* could cause a mess