Commit graph

21083 commits

Author SHA1 Message Date
Vlad Zahorodnii
3534b6afee Remove input processing functions in Platform
Input event flow has been refactored so all input events originate from
input devices.

The X11 backend uses InputRedirection so make it forward events to
relevant input device handlers.
2022-04-14 17:29:51 +03:00
Nils Fenner
d146a3d1dd Use Toplevel::isClient() to resolve AbstractClient type. 2022-04-14 13:50:12 +00:00
Vlad Zahorodnii
4790408423 Run clang-format again
Some people either don't have clang-format installed or disable the
commit hook.
2022-04-14 13:58:03 +03:00
Vlad Zahorodnii
2c1d36e8c5 kcms/rules: Remove unused cpp files from build dependencies 2022-04-14 09:53:05 +00:00
Vlad Zahorodnii
45dc423638 Make RuleBook::setUpdatesDisabled() work with AbstractClient 2022-04-14 09:53:05 +00:00
Fushan Wen
7f39bb1b33
scene: Check waylandServer() is nullptr in filterAcceptsWindow
This fixes compositing on X11.
2022-04-14 14:29:38 +08:00
l10n daemon script
16b7f5729a SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-04-14 01:45:53 +00:00
Xaver Hugl
432fb52788 backends/drm: refactor format choosing and prefer alpha formats
Prefering alpha is needed for some interactions with video underlays; more
directly choosing formats with an alpha channel will be needed for overlay
planes, too.
2022-04-13 20:48:28 +00:00
Marco Martin
5cf2e1e84d Rebase and adapt to changes in master 2022-04-13 19:06:11 +00:00
Vlad Zahorodnii
a0f456b7dc effects: Add Window View effect
The Window View effect is a companion effect for the task manager. It
provides the task manager a way to ask the user to pick a window among
windows identified by window ids passed to the activate() method.

The main motivation for adding this effect is to provide a QtQuick based
alternative for the present windows effect, which is needed to kill the
latter.

This change doesn't extend the overview effect to avoid repeating
mistakes of the past, i.e. adding too many (unrelated) features to the
present windows effect.

While the overview effect provides you a way to select windows, it's not
the only thing that it has. For example, it also allows changing virtual
desktops, etc.

On the other hand, the task manager doesn't need all of that. It only
needs to ask the user to pick a window among the specified windows, nothing
more.

As is, the window view effect is simply WindowHeap with a d-bus api slapped
on top of it.
2022-04-13 19:06:11 +00:00
Vlad Zahorodnii
2ac1f9b7d3 kwineffects: Expose internalId 2022-04-13 19:06:11 +00:00
Vlad Zahorodnii
6dffda920a effectkit: Allow disabling dnd in WindowHeap 2022-04-13 19:06:11 +00:00
Vlad Zahorodnii
2456344fae Allow disabling expo cells
This allows making specific windows in a WindowHeap static.
2022-04-13 19:06:11 +00:00
Vlad Zahorodnii
1589e2c918 effects: Re-introduce support for client filtering in WindowHeap 2022-04-13 19:06:11 +00:00
Vlad Zahorodnii
00c95afcc1 effects: Move WindowHeap in a qml module
The WindowHeap can be useful not only to the Overview effect, but also
other effects, e.g. a desktop grid replacement, etc.
2022-04-13 19:06:11 +00:00
Aleix Pol
e3fe69041f Centralise window filtering around a new SceneWindowFilter class
This way WaylandServer can implement its own filter with its own set of
rules without having Scene be too involved in it.
2022-04-13 11:17:34 +00:00
Aleix Pol
d3259fe945 Fix unlocking wayland sessions
We were never issuing a repaint which confused thoroughly the
compositor.

BUG: 447705
2022-04-13 11:17:34 +00:00
Vlad Zahorodnii
efd43f97e6 Drop Scene::qpainterRenderBuffer() 2022-04-13 10:16:16 +00:00
Vlad Zahorodnii
bd689ef76c Simplify software cursor implementation
With RenderTarget, CursorView and CursorDelegate can be merged.
2022-04-13 10:16:16 +00:00
Vlad Zahorodnii
bfb60e3610 Add RenderTarget type
The main motivation behind this change is to unify render target
representation across opengl and software renderers and avoid accessing
the render backend directory in order to get the render target.
2022-04-13 10:16:16 +00:00
Xaver Hugl
db3f27336f effects/kscreen: don't use xcb on Wayland
BUG: 450564
FIXED-IN: 5.24.5
2022-04-12 18:28:18 +00:00
Xaver Hugl
adb46cbfa3 backends/drm: disable added outputs if finding a working setup fails
If the non-working outputs stay enabled, that may cause problems.
2022-04-12 16:32:16 +00:00
Xaver Hugl
255e9882b6 backends/drm: add some warnings for failing atomic tests 2022-04-12 16:32:16 +00:00
Xaver Hugl
661fbec244 backends/drm: create surfaces for new pipelines before doing tests
It's more efficient and avoids code paths where KWin can crash if all
tests fail
2022-04-12 16:32:16 +00:00
Xaver Hugl
08324f0924 backends/drm: apply changes after setting initial mode
If the changed mode isn't applied, it might be reverted if an atomic commit
fails
2022-04-12 16:32:16 +00:00
Aleix Pol
4b9fc5f9ce readability: Do not close ifdef only to open it again 2022-04-12 13:14:52 +00:00
Aleix Pol
1ada1c0652 tabbox: Do not leak QKeyEvents
Allocate in the stack so it gets cleaned up after using
2022-04-12 13:14:52 +00:00
Vlad Zahorodnii
992753c24a Rename GLRenderTarget to GLFramebuffer
GLRenderTarget doesn't provide a generic abstraction for framebuffer
objects, so let's call GLRenderTarget what it is - a framebuffer.

Renaming the GLRenderTarget class allows us to use the term "render
target" which abstracts fbos or shm images without creating confusion.
2022-04-12 13:41:19 +03:00
Xaver Hugl
7358daa92c renderbackend: move render methods to OutputLayer
This is in preparation to using multiple outputlayers per output
2022-04-12 09:31:58 +00:00
Xaver Hugl
8e998a7cfa renderbackend: split presentation out of endFrame
With these two actions being separate, RenderLoop can record the time spent
in endFrame (for example for multi-gpu transfers) without risking also recording
blocking swapbuffer calls, and endFrame can later be moved to output layer
2022-04-12 09:31:58 +00:00
l10n daemon script
9dc5e5310e SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-04-12 01:44:17 +00:00
Kishore Gopalakrishnan
1e0b0c881e effects/desktopgrid: only swap windows on current activity
In the desktop grid effect, dragging an empty area of a desktop to
another desktop swaps all windows on the two desktops. This change makes
sure that this matches only windows in the current activity.

BUG: 386769
FIXED-IN: 5.24.5
2022-04-11 20:57:32 +00:00
Bharadwaj Raju
1d6aee85e2 plugins/nightcolor: Add a DBus method to preview a given color temperature for a short time
This is needed for a proposed live preview feature in the Night Color KCM in
https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1393.
2022-04-11 20:32:24 +00:00
Ismael Asensio
4c8711f121 AbstractClient: Fix the current VD being always added to the plasma interface
When setting-up the plasma window interface we need to call
`setOnAllDesktops()` after the actual virtual desktops have
been set.

Otherwise, the current desktop would be always added to the
interface (as if the user were unsetting the "onAllDesktops"
flag) and the plasma interface and KWin can get un-synced,
specially if there are specific window rules.

BUG: 452171
FIXED-IN: 5.24.5
2022-04-11 16:50:56 +00:00
Ismael Asensio
5fdf271c32 tests/rules: Port from X11 virtual desktop indexes
Improve and adapt the autotests to the use the new Wayland `desktops`
API instead of relaying on the X11 fallback methods.
2022-04-11 16:24:50 +00:00
Ismael Asensio
cb55532135 test/rules: Ensure we destroy the test window on cleanup
This avoids crashing when a test fails
2022-04-11 14:21:57 +00:00
Weng Xuetian
374e949182 Do not send overlay geometry to text input. 2022-04-11 13:40:22 +00:00
Marco Martin
8947ece98f Fix a crash on x11 on closing laptop lid
On x11 when multiscreen is enabled often kwin crashes on
laptop lid close, for two reasons:
* m_outputLayer going dangling in RenderLayer: fixed by using a QPointer
* m_activeOutput going dangling in Workspace

For the latter, the output disabling was done correctly, but x11client did set the old deleted output
again in X11Client::moveResizeInternal
This is fixed by moving desktopResized() at the bottom of
Workspace::slotOutputDisabled() after the reassign of outputs to
the toplevels
2022-04-11 11:18:30 +00:00
Ismael Asensio
cb877595b2 tests/rules: Rename member variables 2022-04-11 12:11:34 +02:00
Ismael Asensio
32b529a694 tests/rules: Reduce code duplication
Reduce the code duplication and boilerplate to create and destroy
the test clients by making the related variables class members.

Handle special cases using an extensible flag mechanism.
2022-04-11 12:11:34 +02:00
l10n daemon script
9b4fb802a9 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-04-11 01:45:29 +00:00
l10n daemon script
2de51770de SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-04-10 01:47:26 +00:00
Nicolas Fella
c1a895effa Pass resource name to Plasma window management protocol 2022-04-09 14:43:09 +00:00
l10n daemon script
35c0aca980 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-04-09 01:49:59 +00:00
Xaver Hugl
2ef6215a51 backends/drm: don't permanently disable VRR when the test commit fails
In 5.24, the same code path is used for testing direct scanout, so that
causes false negatives. Generally though, the user setting shouldn't be
touched, it's not really proper feedback for the driver or KWin having
problems.
2022-04-08 17:10:12 +00:00
Vlad Zahorodnii
b495faf98d backends/drm: Fix mode comparison
Some modes can have the exact frame timings but different flags.
Currently, the mode comparison function doesn't take that into account
which can result in the drm backend setting the current mode flag
incorrectly.
2022-04-08 16:21:12 +00:00
Xaver Hugl
52c1155b26 backends/drm: prevent calling frameFailed multiple times per present 2022-04-08 17:37:48 +02:00
Volker Krause
972534eb3c Adapt to changes in the Qt6 QPA API
As a pleasant surprise this turned out much easier than anticipated,
all the API is still there, just moved to Qt::GuiPrivate.
2022-04-08 14:19:56 +00:00
Marco Martin
170b0e9aa0 effects/overview: Support touchpad realtime activation
Now it follows your fingers when you do a four-finger swipe up to activate it.

CCBUG: 401479
2022-04-08 14:17:21 +00:00
Vlad Zahorodnii
08d18503e3 Use output property in Workspace::clientArea()
Since the Toplevel.output property is properly synchronized with the
frame geometry, Workspace::clientArea() can use the output property
instead of looking up the screen. It makes code intuitive and removes
unnecessary lookups.
2022-04-08 09:53:13 +00:00