D28781: Add 'Activate clicked window' toggle in Desktop Grid effect
Konstantinos Smanis
noreply at phabricator.kde.org
Sun Apr 12 19:22:16 BST 2020
ksmanis created this revision.
ksmanis added reviewers: KWin, VDG.
Herald added a project: KWin.
Herald added a subscriber: kwin.
ksmanis requested review of this revision.
REVISION SUMMARY
Currently, the clicked window is unconditionally elevated and activated in the Desktop Grid effect. This patch adds a configuration toggle that controls this behavior, allowing the user to select a virtual desktop without worrying about disrupting the previously active window.
When the toggle is on (default), no change in the current behavior is observed, except that windows are not immediately elevated when clicked, but rather after maintaining the click for `QApplication::startDragTime()` [1]. This change was introduced for the sake of consistency, since a timeout is required for the scenario that the toggle is off, in order to avoid window flickering caused by unnecessarily elevating a non-activated window. In other words, with the previous behavior, the clicked window would be immediately elevated, since it would end up being activated anyway. With this patch, the clicked window might not end up being activated, so we postpone elevating it until we are sure that it will also be activated.
When the toggle is off, the clicked window is not activated. Therefore, the user returns to an unchanged virtual desktop irrespectively of where he/she clicked in it.
[1] Dragging windows always results in them being activated.
TEST PLAN
Screencast of current behavior (starts with default configuration for Desktop Grid effect):
F8232947: desktopgrid-2020-04-12_15.54.59_before.mp4 <https://phabricator.kde.org/F8232947>
Screencast of patched behavior (starts with default configuration for Desktop Grid effect, i.e., the toggle is turned on, i.e., backwards compatible behavior):
F8232955: desktopgrid-2020-04-12_16.16.16_after.mp4 <https://phabricator.kde.org/F8232955>
REPOSITORY
R108 KWin
REVISION DETAIL
https://phabricator.kde.org/D28781
AFFECTED FILES
effects/desktopgrid/desktopgrid.cpp
effects/desktopgrid/desktopgrid.h
effects/desktopgrid/desktopgrid.kcfg
effects/desktopgrid/desktopgrid_config.ui
To: ksmanis, #kwin, #vdg
Cc: kwin, Orage, cacarry, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, mkulinski, ragreen, jackyalcine, iodelay, crozbo, bwowk, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, hardening, romangg, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwin/attachments/20200412/bfdc34d1/attachment.html>
More information about the kwin
mailing list