D10983: Konsole: Fix invisible detached view content

Joshua Noack noreply at phabricator.kde.org
Sat Mar 3 01:04:41 UTC 2018


jnoack created this revision.
jnoack added a reviewer: Konsole.
jnoack added a project: Konsole.
jnoack requested review of this revision.

REVISION 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.
  
  F5737102: Screenshot_20180303_013645.png <https://phabricator.kde.org/F5737102>
  
  F5737103: Screenshot_20180303_013718.png <https://phabricator.kde.org/F5737103>
  (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

REPOSITORY
  R319 Konsole

REVISION DETAIL
  https://phabricator.kde.org/D10983

AFFECTED FILES
  src/TerminalDisplay.cpp

To: jnoack, #konsole
Cc: ngraham, hindenburg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/konsole-devel/attachments/20180303/c149c02b/attachment.html>


More information about the konsole-devel mailing list