[konsole] [Bug 432077] Konsole flashes when it's closed by pressing Ctrl-D

Ahmad Samir bugzilla_noreply at kde.org
Fri Aug 13 14:08:16 BST 2021


https://bugs.kde.org/show_bug.cgi?id=432077

Ahmad Samir <a.samirh78 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Latest Commit|https://invent.kde.org/util |https://invent.kde.org/util
                   |ities/konsole/commit/c8d609 |ities/konsole/commit/302c16
                   |23728fb7b16eca613a44ee47e90 |791935cc3cf262aee355afce13d
                   |ab86c72                     |694b00f

--- Comment #7 from Ahmad Samir <a.samirh78 at gmail.com> ---
Git commit 302c16791935cc3cf262aee355afce13d694b00f by Ahmad Samir.
Committed on 13/08/2021 at 13:06.
Pushed by ahmadsamir into branch 'release/21.04'.

Prevent window "flashing" when closing the last session

There are two scenarios when closing a window:
A) clicking the close button on the title bar (or Ctrl+Shift+Q):
~MainWindow()
~ViewManager()
~TabbedViewContainer()
~TerminalDisplay()
~Session()

B) closing the last session/tab in a window:
SessionController::sessionFinished()
~Session()
~TerminalDisplay()
~TabbedViewContainer()
~MainWindow()
~ViewManager()

the issue with the second case is that the TerminalDisplay is torn down
first, which exposes the TabbedViewContainer widget, the latter has the same
Qt::Window colour as the system colour scheme window background colour, if
you're using a dark terminal colour scheme and a light-coloured system colour
scheme, you could see some "flashing" when you close the last session with
e.g. Ctrl+D.

To fix this, in sessionFinished() check if TabbedViewContainer::count() is
1 (i.e. closing last tab/session), and emit the empty() signal in that case,
which is connected to MainwWindow::close(), then the order of tear down
becomes:
SessionController::sessionFinished()
~Session()
~MainWindow()
~ViewManager()
~TabbedViewContainer()
~TerminalDisplay()
FIXED-IN: 21.12
(cherry picked from commit bbec72250d080ce286a6762fb9beee4b6e7981c9)

M  +1    -1    src/MainWindow.cpp
M  +7    -0    src/ViewManager.cpp

https://invent.kde.org/utilities/konsole/commit/302c16791935cc3cf262aee355afce13d694b00f

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the konsole-devel mailing list