Bug 417923 - Rules list should be immediately updated after we create a rule while "Window rules" kcm is open
Summary: Rules list should be immediately updated after we create a rule while "Window...
Status: ASSIGNED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_kwinrules (show other bugs)
Version: 5.18.1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-20 12:06 UTC by Patrick Silva
Modified: 2021-05-02 00:53 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2020-02-20 12:06:39 UTC
STEPS TO REPRODUCE
1.  open Window Rules kcm
2. set a rule to any window/application
3. observe the rules list in Window Rules kcm

OBSERVED RESULT
Window Rules kcm does not list the rule created in step 2.
The rule is listed after we restart the kcm.

EXPECTED RESULT
rule created while Window Rule kcm is open should be immediately listed.
Restart kcm should not be necessary.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.18.1
KDE Frameworks Version: 5.67.0
Qt Version: 5.14.1
Comment 1 Patrick Silva 2020-02-20 12:19:13 UTC
better step 2:
right click on the window decoration of any app, hover over "More actions", choose "Configure special window/application settings...", set any rule and click on "Ok" button
Comment 2 Bug Janitor Service 2020-07-22 18:20:11 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/134
Comment 3 Bug Janitor Service 2020-12-26 15:48:08 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/566
Comment 4 Ismael Asensio 2021-03-19 04:01:28 UTC
Git commit a82be242ea207fb5c7384d2be7703456b368a414 by Ismael Asensio.
Committed on 19/03/2021 at 03:16.
Pushed by iasensio into branch 'master'.

[kwinrules] Launch full KCM when editing from window menu

When rules configuration is invoked from window `Alt+F3` menu,
we call a custom binary `kwin_rules_dialog` which currently provides
only the rule edition dialog by embedding `RulesEditor.qml` within a
QQuickView.

This MR changes that behavior to call the full KCM from the menu.
The code to match previous rules, or compose a new one based on window
properties has been ported to the KCM from the dialog, so the overall
interaction is similar.

It has several advantages:
 - uses only one entry-point to the code
 - adds discoverability to the full KCM (I guess many users know how to
   create a rule, but not where to delete it later)

And a drawback:
 - only one instance of the KCM can be called at a time, so it will show an
   error when calling it from two different windows, or if the KCM is open
   in System Settings

This drawback can be solved after adding argument passing via dBus in KCM
infraestructure.
Related: bug 433837

M  +4    -2    src/kcmkwin/kwinrules/CMakeLists.txt
M  +162  -3    src/kcmkwin/kwinrules/kcmrules.cpp
M  +7    -0    src/kcmkwin/kwinrules/kcmrules.h
M  +29   -211  src/kcmkwin/kwinrules/main.cpp
M  +7    -9    src/kcmkwin/kwinrules/package/contents/ui/RulesEditor.qml
M  +86   -0    src/kcmkwin/kwinrules/rulebookmodel.cpp
M  +2    -0    src/kcmkwin/kwinrules/rulebookmodel.h
D  +0    -74   src/kcmkwin/kwinrules/rulesdialog.cpp
D  +0    -41   src/kcmkwin/kwinrules/rulesdialog.h

https://invent.kde.org/plasma/kwin/commit/a82be242ea207fb5c7384d2be7703456b368a414
Comment 5 Bug Janitor Service 2021-05-02 00:53:47 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/928