Commit graph

20183 commits

Author SHA1 Message Date
Columbariu s
150ebf0cf7 screencast/pipewire: announce format with modifier 2021-09-03 17:49:37 +00:00
Columbariu s
8a2475da63 screencast/pipewire: Add buildFormat method 2021-09-03 17:49:37 +00:00
Columbariu s
b05900e242 screencast/pipewire: Check for a modifier in the format negotiation via pipewire 2021-09-03 17:49:37 +00:00
David Edmundson
78439fd3e7 Avoid test commit whilst constructing DrmOutput
Otherwise we'll try to render a frame on an output before making the
output, which segfaults.
2021-09-03 16:43:48 +00:00
Xaver Hugl
c48ac020cd platforms/drm: correct cursor dirty handling 2021-09-03 18:26:23 +02:00
Vlad Zahorodnii
8891cdb74f effects/overview: Remove "wip" from description
Removing (WIP) will result in more work for translators. There are other
ways to indicate the effect is not ready for its prime time yet, e.g.
being disabled by default.
2021-09-03 13:00:05 +03:00
David Redondo
1c074d81e2 Add clipboard tab to debug console
Can be useful when investigating clipboard related problems, by checking
which source KWin thinks is the current clipboard. Displays clipboard and
primary selection.
2021-09-03 08:40:07 +00:00
Vlad Zahorodnii
c0bec3e27b effects/overview: Add missing desktop filters 2021-09-03 09:40:39 +03:00
Vlad Zahorodnii
43a50be325 effects/overview: Display window icon and caption
BUG: 441312
2021-09-03 06:38:54 +00:00
Vlad Zahorodnii
79a7cf1aec effects/overview: Allow setting ExpoCell margins 2021-09-03 06:38:54 +00:00
Ismael Asensio
9995f984c3 kwinrules: Use a list of desktop UUIDs to set and store the rules setting
Port the RuleSettings and KCM to store and use a list of virtual desktop
 UUIDs, instead of the previous x11 positional id, continuing the work on
This allows to set a rule with several desktops on Wayland.

On X11 it has no visible change for the user, but internally it uses the
more modern concept, helping to simplify the related code.

The relevant key on kwinrulesrc changes from `desktop` to `desktops`.
A kconf_update script handles the migration.
2021-09-02 22:11:46 +02:00
Xaver Hugl
5da8df39a5 AbstractWaylandOutput: make updateMode use uint32_t 2021-09-02 14:34:07 +02:00
Xaver Hugl
26ad8e194f platforms/drm: support Broadcast_RGB setting
This allows the user to switch between full and limited rgb.

BUG: 375666
BUG: 353689
2021-09-02 13:53:02 +02:00
Xaver Hugl
f096629f89 platforms/drm: refactor drm property enums 2021-09-02 13:48:58 +02:00
Vlad Zahorodnii
dc39745f14 effects/overview: Remove duplicate Qt.Key_Escape 2021-09-02 09:32:59 +00:00
Vlad Zahorodnii
717fae2af5 effects/overview: Improve search user experience
If the window has only one visible window and user presses Enter key,
activate that window.
2021-09-02 09:32:59 +00:00
Vlad Zahorodnii
9bd0eb1074 effects/overview: Add search field
The present windows allows the user to search windows by their caption
or window role. This change brings that functionality to this effect.

BUG: 441302
2021-09-02 09:32:59 +00:00
David Redondo
c562a5c04f DragWlToX: Do not send position before enter
According to the spec, enter has to be send before position.
Sending position first seems to confuse clients, before this
change X windows only seemed to get data when the pointer left and
entered them for a second time. Now it works straight away.
BUG:437406
2021-09-02 11:17:53 +02:00
Janet Blackquill
0042d2d8c1 effects/desktopgrid: port to realtime gestures
This ports the Desktop Grid effect to realtime gestures,
both to have the end-user result, and to demonstrate how
effects can have realtime gestures.
2021-09-01 19:49:21 -04:00
Janet Blackquill
6231699ac1 Lay some groundwork for realtime gestures in Wayland
This lays down some groundwork for realtime gestures in Wayland,
so that gestures that are 1:1 with user motion on a touchpad are
now possible to implement.

Due to earlier commits, this is mostly just glue code to make a
convenient API.

Gestures implemented with this API are four-finger gestures, to
avoid conflicting with apps that may use two or three-finger
gestures.
2021-09-01 19:48:41 -04:00
Tatsuyuki Ishi
81389a6e17 blur: pass projection matrix by const reference
Passing QMatrix4x4 by value can result in copying a non-trivial amount (16)
of floats, so avoid that.
2021-09-01 21:42:56 +00:00
Tatsuyuki Ishi
c193efc962 blur: add noise in perceptual space
The previous implementation added noise in linear space, which resulted in
the effect becoming more pronounced on black backgrounds. This patch
changes the process to be applied in perceptual space, by making the noise
addition pass a separate draw call and disabling GL_FRAMEBUFFER_SRGB during
that.

After this change, noise will look much more suppressed and almost never
grainy. This change also changes the range of the noise from
[-strength..strength) to [0..strength), as blending can only be either
additive or subtractive. As a result, users might need to ramp up their
noise parameter after this change.

v2: Add more explanation around the draw call.
v3: Fix noise not fading out with the fade out effect.
v4: Restore an accidentally removed comment.
v5: Add CCBUG.
v6: Rebase.
v7: Fix a formatting issue.

CCBUG: 409620
2021-09-01 21:42:56 +00:00
Méven Car
0a2c511489 Wayland: Add support for protocol kde-output-device_v2, allow to detect drm mode changes
CCBUG: 407058
2021-09-01 13:37:43 +00:00
Vlad Zahorodnii
03b64331f2 wayland: Remove special input method case in XdgToplevelClient
Input method surfaces have input_panel_surface role, so the special case
for input method windows can be dropped.
2021-09-01 10:26:16 +00:00
Vlad Zahorodnii
99e208e30f wayland: Always setup window management for xdg-shell clients
kscreenlocker uses the layer-shell protocol, so the special lock screen
case can be removed.
2021-09-01 10:26:16 +00:00
Vlad Zahorodnii
1717de8a59 Port XdgToplevelClient::updateShowOnScreenEdge() to AbstractOutput 2021-09-01 10:10:24 +00:00
Vlad Zahorodnii
cdd3f96fe1 Port X11Client::fullscreenMonitorsArea() to AbstractOutput 2021-09-01 10:10:24 +00:00
Vlad Zahorodnii
26e470b7ff Port screenContainsPos() to AbstractOutput 2021-09-01 10:10:24 +00:00
Vlad Zahorodnii
25a6515e05 Port AbstractClient::checkQuickTilingMaximizationZones() to AbstractOutput 2021-09-01 10:10:24 +00:00
Vlad Zahorodnii
8b85fdcedf wayland: Setup window management integration on initial commit
Originally, there was ShellClient class that was the predecessor to
WaylandClient subclasses. If the main surface is unmapped, the
corresponding instance of ShellClient would be kept around. That had
been changed with the introduction of XdgToplevelClient and
XdgPopupClient.

Since ShellClient had been kept alive even if the corresponding surface
were unmapped, it did make sense to setup window management integration
when the surface is mapped.

However, this also means that plasma will not know about initially
minimized windows.

Since unmapped windows are handled differently now, we can setup window
management after the client performs the initial commit. If the main
surface is unmapped, the XdgToplevelClient object will be destroyed and
with it, the window management integration.
2021-08-31 23:42:07 +00:00
Carson Black
63b16cdf9d Increased edge margins 2021-09-01 01:33:51 +02:00
Jan Blackquill
f6005a28cd doc: modernise HACKING -> CONTRIBUTING guidelines and information 2021-08-31 22:10:58 +00:00
Aleix Pol
0b74aa62c9 Support PlasmaWindowInterface::sendToOutput 2021-08-31 21:25:18 +00:00
Xaver Hugl
a3cbaf48dc platforms/drm: fix modifier env variable
Like the name suggests, modifiers were meant to be enabled by default
2021-08-31 16:30:03 +00:00
Vlad Zahorodnii
d70cfadf96 platforms/drm: Fix outputDisabled signal
The outputDisabled() signal must be emitted **after** removing the
output from a list of enabled outputs.
2021-08-31 16:02:19 +00:00
Vlad Zahorodnii
b0c26cc424 effects/overview: Layout window thumbnails in updatePolish()
Currently, ExpoLayout delays layout updates by using a singleshot timer
(primarily due to the author of the effect not being aware of
QQuickItem::polish() and QQuickItem::updatePolish()).

This change makes ExpoLayout schedule layout updates using QtQuick's
native item polish machinery, which gets triggered before rendering and
thus we can batch more geometry updates.

In addition to that, this change simplifies the initialization code in
ScreenView by making the fact that ExpoLayout is arranged right before
rendering internal to the WindowHeap type.
2021-08-31 12:51:29 +00:00
Vlad Zahorodnii
683bf20168 Port ScreenEdges away from Screens 2021-08-31 11:17:46 +03:00
Vlad Zahorodnii
543145e76f autotests: Port common screen check preamble to AbstractOutput 2021-08-31 08:16:27 +00:00
Vlad Zahorodnii
cbaf39e270 Port the remaining usages of Screens::geometry(i) in Workspace to AbstractOutput 2021-08-31 09:45:20 +03:00
Vlad Zahorodnii
9bf6e2bd68 Port Workspace::supportInformation() to AbstractOutput 2021-08-31 09:41:22 +03:00
Vlad Zahorodnii
1b2e8437ac Use precomputed workspace geometry in Workspace::initializeX11()
When initializeX11() is called, the workspace geometry is known, so it
doesn't need to be computed again.
2021-08-31 09:35:27 +03:00
Vlad Zahorodnii
e198727e15 Drop Toplevel::isOnScreen()
It's unused. Its replacement is Toplevel::isOnOutput().
2021-08-31 05:45:55 +00:00
Xaver Hugl
93ec5d8ea9 tests: fix GestureTest 2021-08-31 01:45:27 +00:00
Xaver Hugl
5b87c24568 tests: fix TestBuiltInEffectLoader 2021-08-31 01:45:27 +00:00
Xaver Hugl
36f01ba7fe tests: fix TestVirtualDesktops 2021-08-31 01:45:27 +00:00
l10n daemon script
96c6f964e6 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"
2021-08-31 01:29:11 +00:00
Xaver Hugl
85a6dc3cad platforms/drm: correct multi-gpu mistake
As all outputs from secondary GPUs are in the same map as the ones from
the primary GPU, EglMultiBackend::findBackend always returned the
primary backend. To fix that, search in secondary backends first
2021-08-30 23:00:19 +02:00
Vlad Zahorodnii
89d49b4d5d platforms/virtual: Add new outputs before removing old outputs
This is to prevent hitting the case where there are no any outputs.
Ideally, it shouldn't matter in which order outputs are added or
removed, but the Workspace and AbstractClient subclasses don't work
with true headless mode. If there are no outputs, kwin can crash.
2021-08-30 15:08:52 +00:00
Vlad Zahorodnii
f8ad513648 Unvirtualize property getters in Screens
MockScreens is gone so property getters in Screens can be regular
methods now.
2021-08-30 14:46:00 +00:00
Vlad Zahorodnii
8fd1914f83 Port Edge to Platform::outputAt() 2021-08-30 14:46:00 +00:00