Fwd: Konsole | Apply new window flags only when necessary (!16)

Mariusz Glebocki mglb at arccos-1.net
Sat Jul 13 18:19:08 BST 2019


https://invent.kde.org/kde/konsole/merge_requests/16

---------- Forwarded message ---------
From: Mariusz Glebocki <noreply at kde.org>
Date: Sat, Jul 13, 2019 at 7:16 PM
Subject: Konsole | Apply new window flags only when necessary (!16)
To: <mglb at arccos-1.net>

Project:Branches:
mglebocki/konsole:apply-new-configuration-options-only-when-necessary
→ kde/konsole:master

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.

---

Moved from Phabricator: https://phabricator.kde.org/D20744


More information about the konsole-devel mailing list