Applying settings in Configure Konsole dialog was causing every Konsole
window to be hidden and shown again. This was leading to information
related to window management (window state, desktop, position/display,
etc.) to be lost - windows were appearing on current display, current
desktop, at new positions.
The hide/show action is triggered by setting window flags. Only "remove
window titlebar and frame" option really changes the flags, so it is
pointless to set them again in other cases. Now, flags are not set when
they are the same as current ones.
Additionally, when "remove window titlebar and frame" option is changed
and new flags are different, windows' positions and displays are
restored. Other properties are still being lost.
Test cases
----------
* Open a few Konsole windows, put them on different desktops and
at different positions.
* Open Configure Konsole dialog, change any option different than
"remove window titlebar and frame".
* Apply
**Before**
Konsole windows have been moved to current display and current desktop.
Their positions have changed. The configuration window has been placed
under them.
**After**
The side effects mentioned above do not occur.
---
* Open a few Konsole windows, put them on different desktops and at
different positions.
* Open Configure Konsole dialog, change "remove window titlebar and
frame" option.
* Apply
**Before**
Konsole windows' titlebar and frame became visible/invisible.
The windows have been moved to current desktop. Both their positions
and display have changed. The configuration window has been placed
under them.
**After**
Like before, except windows' position and display - they are restored
now.
This currently only catches bookmarks in top-level (ie not sub-folders)
Original code by Tomaz Canabrava <tcanabrava@kde.org>
BUG: 408939
FIXED-IN: 19.12
https://invent.kde.org/kde/konsole/merge_requests/8
Add the home sigil "~" for short cwd (it was only present for long cwd
for some reason), and the Bourne prompt sigils "$" (for regular user)
and "#" for superuser as the variable %B.
https://invent.kde.org/kde/konsole/merge_requests/19
Summary:
_pluggedController disconnection happens when session is closed
by closeInNormalWay or closeInForceWay and calling
disconnectController leads to Konsole crash. Also a case when
closeInNormalWay is false was not considered.
BUG: 410607
FIXED-IN: 19.08.1
Test Plan:
1. Open Konsole
2. Open one more tab
3. Try to close Konsole
4. Pick option "Close Current Tab" (assuming you have not check
'Do not ask again')
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: hindenburg, konsole-devel, #konsole
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D23246
Summary:
Randomize colors using HSLuv color space instead of HSL. It has
perceptually uniform lightness, which means every color with the same
lightness value is perceived as equally bright by humans. Displays
quality and lack of calibration in most monitors lowers this uniformity,
but even on worst color display it should be better than standard HSL.
More information about HSLuv: http://www.hsluv.org/
Minor changes:
* Random seed takes PID into account to prevent repeated colors in
separate Konsole processes
* Key names in a config were changed
* Adapted "Black on random light" color scheme
Breeze with random ranges on default bg and fg: hue=360° saturation=100:
{F6754773}
To be done in future:
* Automatically convert color schemes which use old randomization
method.
Reviewers: #konsole, #vdg
Subscribers: hindenburg, #vdg, #konsole
Tags: #konsole, #vdg
Differential Revision: https://phabricator.kde.org/D20263
Summary:
In all the cases that were changed, the bounding rect is needed. A few
places were not ported, since they need more careful investigation.
This reduces deprecation warnings.
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: hindenburg, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D23144
Summary:
When there is only one tab and a process is running, remove the
'close current tab' option when attempting to close Konsole.
Test Plan:
1. Open Konsole (assuming you have not check 'Do not ask again')
2. Start any process (ie top)
3. Try to close Konsole
Should only be 2 options, 'Close window' and 'Cancel'
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: hindenburg, ngraham, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D23146
When XDG_CURRENT_DESKTOP ≠ kde, perssing and immediately releasing Alt
key makes focus get stuck in menu. Fix this by overriding QProxyStyle.
This does not influence menu accelerators (e.g. Alt+f to access "File" in
menu), which continue working according to user settings.
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
BUG: 410641
FIXED-IN: 19.08
Differential Revision: https://phabricator.kde.org/D22980
Fixes a problem detected by Coverity Scan.
Coverity Scan log (relevant part)
---------------------------------
```
(...)
*** CID 241675: (UNINTENDED_INTEGER_DIVISION)
/zpool/projects/Devel/KDE/src/konsole/src/TerminalDisplay.cpp: 728
in Konsole::TerminalDisplay::drawCursor(QPainter &, const QRect &,
const QColor &, const QColor &, bool &)()
722 painter.setPen(cursorColor);
723 724 if (_cursorShape == Enum::BlockCursor) {
725 // draw the cursor outline, adjusting the area so that
726 // it is draw entirely inside 'rect'
727 int penWidth = qMax(1, painter.pen().width());
CID 241675: (UNINTENDED_INTEGER_DIVISION)
Dividing integer expressions "penWidth" and "2", and then converting
the integer quotient to type "double". Any remainder, or fractional
part of the quotient, is ignored.
728 painter.drawRect(cursorRect.adjusted(penWidth / 2 + 0.5,
729 penWidth / 2 + 0.5,
730 - penWidth / 2 - penWidth % 2 + 0.5,
731 - penWidth / 2 - penWidth % 2 + 0.5));
732 733 // draw the cursor body only when the widget has focus
/zpool/projects/Devel/KDE/src/konsole/src/TerminalDisplay.cpp: 729
in Konsole::TerminalDisplay::drawCursor(QPainter &, const QRect &,
const QColor &, const QColor &, bool &)()
723 724 if (_cursorShape == Enum::BlockCursor) {
725 // draw the cursor outline, adjusting the area so that
726 // it is draw entirely inside 'rect'
727 int penWidth = qMax(1, painter.pen().width());
728 painter.drawRect(cursorRect.adjusted(penWidth / 2 + 0.5,
CID 241675: (UNINTENDED_INTEGER_DIVISION)
Dividing integer expressions "penWidth" and "2", and then converting
the integer quotient to type "double". Any remainder, or fractional
part of the quotient, is ignored.
729 penWidth / 2 + 0.5,
730 - penWidth / 2 - penWidth % 2 + 0.5,
731 - penWidth / 2 - penWidth % 2 + 0.5));
732 733 // draw the cursor body only when the widget has focus
734 if (hasFocus()) {
(...)
```