Summary:
When detecting the properties of a window, now it shows and lets the user select the window complete class.
If this property is selected in the overlay, `Window class` takes the whole class value, and the option `Match window whole class` is set.
This adds back a feature the old kcm was offering.
BUG: 421542
FIXED-IN: 5.20
Test Plan:
- `Detect window properties` and pick a firefox window
- The property selector shows: `Window class: navigator` and `Whole window class: navigator firefox`
- Selecting the latter set the properties as per summary
{F8334118}
Reviewers: ngraham, #kwin, #plasma, meven
Reviewed By: ngraham, #kwin, #plasma, meven
Subscribers: broulik, davidedmundson, meven, anthonyfieroni, zzag, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D29791
Summary: Alt + Left Click to move windows has a tendency to conflict with creative workflow apps. While Alt can be changed to Meta in KWin's settings, Alt + Left Click shortcuts often cannot be customized in apps. Rather than making every user who runs into this problem change their settings, we should change our default settings to improve KWin's default usability. The fact that Alt + Left Click to move windows is older does not matter. We are trying to use Meta for global/shell shortcuts anyway.
BUG: 399375
Test Plan: The relevant parts of the relevant tests pass. kwin-testInternalWindow fails, but for unrelated reasons that have something to do with XWayland.
Currently, the spinners used to edit position and size rules have an upper
limit of 4098, which may be not enough for wide/hdpi/mutiple screens.
The property itself has no such limit in the `.kcfg` schema
This is just an issue with the editor.
BUG: 421892
FIXED-IN: 5.19
The list of virtual desktops is retrieved using a DBus method, instead of
`KWindowSystem`, to make it work both in Wayland (as well as X11).
FIXED-IN: 5.20
BUG: 416165
Summary:
Since the port to KConfigXT, the setting "placement" is stored using the enum value, instead of a string equivalent.
This updates the kcm model to be able to communicate this property with the config schema.
BUG: 421586
FIXED-IN: 5.19.0
Test Plan:
- In a rule set the "Initial Placement" property
- The value is stored in `~/.config/kwinrulesrc`
- Close/reopen the kcm. The placement value is correctly loaded.
Reviewers: #kwin, #plasma, zzag
Reviewed By: #kwin, #plasma, zzag
Subscribers: zzag, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D29790
Summary:
Use `QSize`/`QPoint` to handle and store coordinate values (size and position)
Previously, the rules model stored the "coordinate" type properties as a
`QString` with format `x, y`.
This fails when setting the properties to the config schema, as it requires
a proper `QPoint` or `QSize` value, specially the latter which can't be
convert from such a string.
BUG: 421055
FIXED-IN: 5.19.0
Test Plan:
- Add a new rule and set its position and size properties
- Hitting apply stores the right values in `~\.config\kwinrulesrc`
- Close the kcm and reopen, the values are loaded
- Property detection still works for size and position
Please note that there is a pre-existing bug of some position/sizes not being
applied to the windows in some cases, when using `Apply Initially`.
Better try using the `Force` policy.
Reviewers: ngraham, #kwin, #plasma, zzag
Reviewed By: #kwin, #plasma, zzag
Subscribers: zzag, ltoscano, yurchor, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D29764
Summary:
e.g. "Vertically maximize" is more natural and expressive than "Maximize (vertical only)"
See D29671#inline-169882.
Test Plan: New strings appear in the KCM
Reviewers: zzag, #vdg, #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D29729
Summary:
Currently, we use icons to display possible maximize button actions. The
problem with those icons is that they are confusing even for me, a person
who knows kwin in and out. The size_all icon implies that if you click the
maximize button, you'll be able to move the window around. Same goes with
the size_ver and size_hor icons, they indicate that user will start
resizing the window in the vertical and horizontal direction, respectively.
Test Plan:
Before
{F8312394}
After
{F8312395}
Reviewers: #kwin, #vdg, ndavis
Reviewed By: #vdg, ndavis
Subscribers: ngraham, ndavis, broulik, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D29671
Summary:
Remove anchors within `Kirigami.AbstractListItem` delegates.
They were causing random misalignment of items in the main and the overlay `ListView`s
Test Plan:
Before {F8284332}
After {F8284333}
Reviewers: broulik, #vdg, #kwin, ngraham
Reviewed By: #vdg, ngraham
Subscribers: ahiemstra, ngraham, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D29423
Summary:
Small UX improvements when exporting rules
Add a `Select All` button
Disable `Save` if no rules are selected
In export mode set button text to `Cancel Export`
Test Plan: {F8276279}
Reviewers: #kwin, #vdg, filipf
Reviewed By: #vdg, filipf
Subscribers: filipf, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D29341
Summary:
Currently this string is marked as untranslatable for the unknown reason
Patch by Victor Ryzhykh
Test Plan: Translate, run.
Reviewers: #kwin, zzag
Reviewed By: #kwin, zzag
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D29271
Summary:
Use the properties `valueRole` and `currentValue`, introduced in Qt5.14 for `QQC2.ComboBox`
This didn't work before due to QQC2 version being mis-detected at build time, so the code mocked an internal `currentValue` property.
After D28859, it is now required to fix:
"file:///home/nate/kde/usr/share/kpackage/kcms/kcm_kwinrules/contents/ui/RulesEditor.qml"
"Error loading QML file.\n42: Type RuleItemDelegate unavailable\n68: Type OptionsComboBox unavailable\n35: Cannot override FINAL property\n"
QCoreApplication::postEvent: Unexpected null receiver
Test Plan:
Try to edit a rule or add a new one.
The rule editor page shows.
Reviewers: ngraham, #kwin, zzag
Reviewed By: ngraham, #kwin, zzag
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D29145
Summary:
Replacement KCM to configure kwin rules, using a QML-based UI.
After some work on the task T12729, it is almost feature-par with the previous module, and adapted to the recent move to KConfigXT.
Test Plan:
{F8208046}
{F8208047}
Reviewers: #plasma, #kwin, #vdg, ngraham, davidedmundson, zzag
Reviewed By: #plasma, #kwin, #vdg, ngraham, davidedmundson, zzag
Subscribers: ngraham, davidedmundson, hchain, broulik, zzag, kwin
Tags: #kwin, #vdg
Differential Revision: https://phabricator.kde.org/D28152
Summary:
Same as D28507
Disable screen edge modification, but allow the user to open an edge context menu and see the settings.
To set an edge immutable, just add `[$i]` right after the entry in `ElectricBorders` group, although the edges settings are shared between some `[Effect-something]` group under the key `BorderActivateSomething`.
Since one entry like `BorderActivateSomething` lists all edges that use this effect, it doesn't make sense to set it immutable.
Test Plan:
In `kwinrc`, set the `ElectricBorders` and/or `Windows` group immutable or any entry.
```
[ElectricBorders]
BottomLeft[$i]=None
Left=None
Right=None
Top[$i]=None
[Windows][$i]
ElectricBorderCornerRatio=0.29
ElectricBorderDelay=300
ElectricBorderMaximize=false
ElectricBorderTiling=true
ElectricBorders=2
```
Reviewers: ervin, bport, meven, zzag, #kwin, mart
Reviewed By: ervin, zzag, #kwin, mart
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D28508
Summary:
Disable touch screen edge modification, but allow the user to open an edge context menu and see the settings.
To set an edge immutable, just add `[$i]` right after the entry in `TouchEdges` group, although the edges settings are shared between some `[Effect-something]` group under the key `TouchBorderActivateSomething`.
Since one entry like `TouchBorderActivateSomething` lists all edges that use this effect, it doesn't make sense to set it immutable.
Test Plan:
In `kwinrc`, set the `TouchEdges` group immutable or any entry.
```
[TouchEdges]
Bottom=None
Left=None
Right=None
Top[$i]=None
```
Reviewers: ervin, bport, meven, zzag, #kwin, mart
Reviewed By: ervin, zzag, #kwin, mart
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D28507
Summary:
Also manage KCModule states (isSaveNeeded and isDefaults)
BUG: 405573
Test Plan:
* exec kcmshell5 kwintouchscreen
* In an edge, select action Present windows - All desktops, then apply
* close and reopen
* Should display action Present windows - All desktops in the previously selected edge.
* Do same test with Present windows - current desktop
Reviewers: #kwin, ervin, bport, meven, zzag
Reviewed By: #kwin, ervin, meven, zzag
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D27862
Summary:
Some widget cannot be managed by KCModule, so we have to disable the widget if the property is immutable.
Remove unused parameter in `createConnections()`
Test Plan: Add [$i] right after the key or group in kwinrc, the widget should be disabled.
Reviewers: #kwin, ervin, bport, meven, zzag
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D28484
Summary:
It's invoked from QML.
Nested event loops invoked directly from QML is asking for crashes.
BUG: 419118
Test Plan:
Opened KCM
Opened dialog for some settings
Window was still modal as before
Settings were saved
(though they didn't seem to be applied..maybe another bug?)
Reviewers: #kwin, apol
Reviewed By: apol
Subscribers: zzag, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D28293
Summary: Recent changes prevented it to build on KDE Neon.
Test Plan: Built it on Neon
Reviewers: #kwin, bshah, davidedmundson
Reviewed By: #kwin, bshah, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D28511
Summary:
We build some objects several times which makes it uncomfortable to develop KWin
since every time we modify something a lot of things get rebuilt. This should
help a bit although it doesn't solve all the problems.
Test Plan: Builds, tests pass
Reviewers: #kwin, zzag
Reviewed By: #kwin, zzag
Subscribers: davidedmundson, zzag, anthonyfieroni, iasensio, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D28445
Summary:
We don't need a lambda because QDialog::accepted can be connected
directly to KCModule::save.
Test Plan: Compiles.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D28443
Summary:
It's invoked from QML.
Nested event loops invoked directly from QML is asking for crashes.
BUG: 419118
Test Plan:
Opened KCM
Opened dialog for some settings
Window was still modal as before
Settings were saved
(though they didn't seem to be applied..maybe another bug?)
Reviewers: #kwin, apol
Reviewed By: apol
Subscribers: zzag, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D28293