Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull KWin patches (2024-01-10 - 2024-05-23) #25

Merged
merged 27 commits into from
Jun 19, 2024
Merged

Conversation

romangg
Copy link
Member

@romangg romangg commented Jun 19, 2024

According to listings in #24.

romangg and others added 27 commits May 23, 2024 17:55
Accidentally pressing any shortcut shouldn't take down the whole session.
If a compositor isn't reponsive but can still process shortcuts for some
reason, you can still switch to a different virtual terminal to explicitly
kill it from there.
The current implementation of the `<N>` suffix is still buggy and its
benefits are doubtful. One could argue that visual aids such as window
thumbnails or highlighting the windows are better. On its own, these
numbers don't have strong connections to the windows and can change on
a whim.

Co-authored-by: Roman Gilg <subdiff@gmail.com>
The documentation of NETRootInfo::activate() says that it should be
called after creating the NETRootInfo object to read properties.

However, it's called in two places: VirtualDesktopManager::setRows()
and Workspace::initializeX11(). At quick glance, there's no justifying
reason to call activate() in setRows(), it doesn't fit the purpose
of setRows().

This change re-arranges NETRootInfo initialization code so it makes
more sense.
Explicitly discard the return value. This is an error otherwise with GCC.
Needs to be further investigated. Only fails with release builds.
It improves the visuals of the switcher when there are no entries to display.
The KF6::ConfigWidget dependency can be replaced with smaller ones.
Replace old "closest" and "natural" layout algorithms with new layout
algorithm. The new layout algorithm tries to
- use screen space efficiently, given diverse geometries of windows
- be aesthetically pleasing
- and minimize movement of windows from initial positions.

More concretely, find a layered layout, where each layer, or strip, is a
row or column. Ensure that different strips have similar widths, and use
binary search to find a packing with similar aspect ratio to the layout
area. Within each strip, minimize horizontal movement (for rows) or
vertical movement (for columns) of windows.

Run time is O(n) (up to log factors), where n is the number of windows.

CCBUG: 453749
BUG: 450263
BUG: 477833
BUG: 478097
BUG: 477830
Signed-off-by: Falko Becker <falko.becker@mbition.io>
Currently desktop grid view is missing the selection rectangle when hovered over a
desktop.
This adds the selection rectangle on hover, since it used to be there before
three-state design.

Currently selected desktop has thinner and different colored border.

![image](/uploads/ad1f2f7acbe602fb7b9479ce859026b7/image.png)

![image](/uploads/9fa50bac4b81958da0b8926f8d2518ba/image.png)

![image](/uploads/3e46c1f5a740c40bbf18a5d887f31d39/image.png)

BUG:481812
The autohidden panels "blink" because this effect animates their opacity.

The dock windows are animated because, as the comment says, the old effect
animated almost every window.

Conceptually, animating docks doesn't align with the purpose of this effect.
QuickEffect::setDelegate is exposed QML API.

The lifespan of assigned objects is therefore managed by the QML engine,
and we should be watching for deletion not actually deleting it.
By design, these categories of content can run arbitrary code on the
system. This makes them security-sensitive and risky, so we need to
inform the user about it.

Depends on https://invent.kde.org/frameworks/knewstuff/-/merge_requests/309
Now that we have Kirigami.Units.cornerRadius, there's a central source
of truth for corner radius so don't have to use random numbers for
these anymore.

Part of https://invent.kde.org/teams/vdg/issues/-/issues/45.
This is a hidden destructive action[1] in a context where users are not
primed to expect it. It's also largely unnecessary since the delegates
already show a delete button on hover, and deleting virtual desktops
isn't such a common task that it benefits from an accelerator. Let's
remove it for safety.

[1] It's destructive because user-created state on the deleted virtual
desktop is lost--with no confirmation or undo, to boot.

BUG: 484999
FIXED-IN: 6.1
To clarify that the toggle action merely temporarily disables the blue light
filter, rather than turning the schedule off permanently like the "Disbaled"
setting in the KCM does, use "suspend/resume" terminology instead of "off/on"
in the keyboard shortcut and OSD.

Follow-up on plasma-workspace!4262

CCBUG: 486647
After porting to KConfigXT settings some time ago, there was still an
inefficient and error-prone codepath between the `RuleBook` (which keeps
the runtime list of `Rules`) and the `RuleBookSettings` (responsible for
config reads and saves), in the form of the `setRules()` method.

We can eliminate the `setRules()` codepath, reducing unnecessary
runtime process and file access operations, and instead:
- Keep track of the config `id` in the `Rules` objects
- Keep a single `RuleBookSettings` object as a member
- Modify or delete the discarded rules settings directly
- Save when necessary

This also fixes two bugs/pitfalls of the previous solution:
- the config group id for each rule is now preserved instead of creating
  new ones
- no leftovers on the config file for the discarded groups and entries

Setting custom configs for the integration tests still works unchanged.

BUG: 446381
FIXED-IN: 6.1

Co-authored-by: Roman Gilg <subdiff@gmail.com>
Copy link

codecov bot commented Jun 19, 2024

Codecov Report

Attention: Patch coverage is 26.43392% with 295 lines in your changes missing coverage. Please review.

Project coverage is 50.66%. Comparing base (d66b1d4) to head (bb085c7).

Files Patch % Lines
plugins/effects/private/expolayout.cpp 0.00% 249 Missing ⚠️
plugins/effects/overview/overvieweffect.cpp 0.00% 16 Missing ⚠️
plugins/kpackage/effect/effect.cpp 0.00% 11 Missing and 1 partial ⚠️
como/render/effect/interface/quick_scene.cpp 0.00% 4 Missing ⚠️
como/win/rules/book_edit.h 57.14% 3 Missing ⚠️
como/win/wayland/internal_window.h 25.00% 2 Missing and 1 partial ⚠️
como/render/post/night_color_manager.h 0.00% 2 Missing ⚠️
como/win/rules/book_settings.cpp 75.00% 1 Missing and 1 partial ⚠️
como/win/rules/book.cpp 85.71% 0 Missing and 1 partial ⚠️
como/win/rules/ruling.cpp 0.00% 1 Missing ⚠️
... and 2 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #25      +/-   ##
==========================================
+ Coverage   50.55%   50.66%   +0.10%     
==========================================
  Files         941      939       -2     
  Lines       87404    87348      -56     
  Branches    45754    45411     -343     
==========================================
+ Hits        44190    44257      +67     
+ Misses      39697    39322     -375     
- Partials     3517     3769     +252     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@romangg romangg merged commit 1105f71 into winft:master Jun 19, 2024
14 of 15 checks passed
@romangg romangg deleted the pick-kwin branch June 19, 2024 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.