Commit graph

23186 commits

Author SHA1 Message Date
Nicolas Fella
938b8c87a1 Remove unused license file 2022-08-23 17:41:55 +02:00
Nicolas Fella
4fe4ed9041 Add missing license files 2022-08-23 17:40:23 +02:00
Nicolas Fella
f3c2223190 Fix SPDX identifier for CC0 license 2022-08-23 17:40:09 +02:00
ivan tkachenko
0f20e4b838
effects: Fix windows visibility during partial activation (realtime gesture)
Makes partial state account for both initial- and active-hidden status.

This fixes the case when activeHidden windows would show up during a
gesture even though they should disappear when the gesture completes.
2022-08-23 16:59:17 +03:00
ivan tkachenko
9e4926bf34
effects/private: Simplify "active-hidden" state by inheriting from "initial-hidden"
This does not fix anything per se, just strips some unnecessary lines
and extra ensures zero opacity to other items.
2022-08-23 16:59:17 +03:00
ivan tkachenko
3a406dd451
effects/private: Rename property 'hidden' to 'activeHidden'
This is done to better reflect its relation to the
complementary 'initialHidden' property.
2022-08-23 16:59:17 +03:00
ivan tkachenko
56530ce939
effects: Fix initial hidden state: also initially hide windows from other desktops
This fixes the case in Show All Windows (F10) and Show Windows of
Current App (F7): non-minimized windows from other desktops suddenly
pop-up at the start of these effects instead of remaining hidden.

Note: don't test this with full-screen/maximized windows open on current
desktop otherwise you probably won't see any difference.
2022-08-23 16:59:16 +03:00
ivan tkachenko
73fa0d124f
effects: Fix stacking order of windows relative to panels
Make windows thumbnails use their native stacking order as a 'z' value
for current desktop while lowering windows from other desktops.

By lowering others instead of raising current ones we get to use
stacking order compatible with desktop & dock/panel window types.

For now they are drawn separately, so this change doesn't do much on its
own, but it would become useful during refactoring when putting all
windows (regular and panel types) in a single parent with shared z stack.
2022-08-23 16:59:16 +03:00
Xaver Hugl
d54aaf5aaa workspace: restore cursor position after output changes 2022-08-23 12:15:33 +02:00
Vlad Zahorodnii
a32869594e Fix some -Wunused-variable warnings 2022-08-23 10:54:39 +03:00
Vlad Zahorodnii
b01cfb8514 wayland: Merge WaylandOutputDeviceV2 and OutputDeviceV2Interface 2022-08-23 07:18:39 +00:00
Kai Uwe Broulik
b0423c32ac window: Create palette only when needed
Creating a `DecorationPalete` (e.g. the `KColorScheme` inside) is
relatively expensive. Currently, this is done once a client is mapped,
regardless of whether it actually has a server-side decoration.

This change makes it create the palette only when it is actually used,
e.g. the window indeed has a server-side decoration or when the user
actions menu is invoked.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
2022-08-22 08:38:29 +02:00
l10n daemon script
8ca6170c91 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-08-22 01:46:04 +00:00
ivan tkachenko
fc757be20a
effects/desktopgrid: Fix grid's size and scale w.r.t. row/column spacing
This patch makes grid actually account for the spacing, so that when
fully shown it won't cut off bottom or right edge of desktops. It can
be easily seen with a wallpaper that has visible features on the edges
such as borders, or by settings rowSpacing & columnSpacing to an
absurdly high value.
2022-08-19 23:43:02 +03:00
ivan tkachenko
5af891ec8e
effects/desktopgrid: Replace PlasmaCore.Units.largeSpacing with gridUnit
It's broken and equal to a grid unit, all existing usages must ported
one way or another. Using `smallSpacing * 2` (the intended value of
largeSpacing) results in a gap that is too narrow to be consistent when
scaled down between multiple desktops.
2022-08-19 23:42:58 +03:00
Kai Uwe Broulik
c7e156165d inputmethod_v1_interface: Use RamFile for passing keymap to clients
This uses a sealed anonymous file (memfd) instead of a `QTemporaryFile`,
which is more efficient.

Ideally, this file was also reused if the keymap didn't change.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
2022-08-19 15:26:25 +02:00
Kai Uwe Broulik
7e33e85cde dmabuf: Use RamFile for passing dmabuf feedback table to clients
This uses a sealed anonymous file (memfd) instead of a `QTemporaryFile`,
which is more efficient.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
2022-08-19 15:26:25 +02:00
Kai Uwe Broulik
50ae65809e keyboard_interface: Re-use the same keymap fd for supported clients
This makes use of the new RamFile class to create a sealed anonymous
file to pass the keymap information to clients.

Since wl_seat version 7 [1] it is specified that clients must map the
received fd as `MAP_PRIVATE`. This means we can use `SEAL_WRITE`
on the file to prevent clients from tampering with it and subsequently
reuse the same file for all clients using wl_seat version 7 or above.

[1] 905c0a341d

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
2022-08-19 15:26:25 +02:00
Kai Uwe Broulik
3646620430 utils: Introduce RamFile class for memfd
This class can be used to create an anonymous file, for instance
to pass data between compositor and clients, through means of a
file descriptor, as is done in various Wayland protocols, notably
the keymap exchange.

It also implements sealing the file, so that it can be shared
between multiple clients without them being able to modify it.

If supported, memfd_create is used, otherwise a `QTemporaryFile`
is used.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
2022-08-19 15:26:22 +02:00
David Redondo
e5aeb674c0 Floor coordinates to check if a point is inside a region
More correct since QRegion models half open intervals (like QRect) and toPoint
rounds the coordinates. Fixes an issue where one could escape a pointer
confinement by just moving the mouse.
2022-08-19 06:52:55 +00:00
Ismael Asensio
6bf53c8797 kcm/kwinrules: Keep sheet open when adding properties via button
Keep properties sheet open when clicking on the button to add
a new property. This allows to add several properties in a row.
Clicking on the full row will keep the previous behavior for the
simple case, closing the sheet so the new property can be edited
right away

Also make the button on each delegate always visible (not only
on hover) to be more consistent with current status everywhere else.

Previously the sheet would remain open only after detecting some
window properties, which was a very hidden and confusing pattern.

BUG: 431228
FIXED-IN: 5.26
2022-08-18 21:00:54 +00:00
Kai Uwe Broulik
405469aa19 options: Set placement default in kcfg
This ensures the value can still be overridden explicitly in kwinrc.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
2022-08-18 13:34:47 +00:00
Kai Uwe Broulik
3ca49ee64e kwinglplatform: Use qInfo instead of writing to stdout directly
Ensures the output passes through Qt's message handler infrastructure.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
2022-08-18 11:43:32 +00:00
Vlad Zahorodnii
26752058d6 backends/x11: Remove initial position logic
Let kwin decide the output position. This makes the behavior of the
x11 backend consistent with the drm backend.
2022-08-18 10:20:53 +00:00
Vlad Zahorodnii
97e196df54 backends/wayland: Remove initial position logic
Let kwin decide the output position. This makes the behavior of the
wayland backend consistent with the drm backend.
2022-08-18 10:20:53 +00:00
Vlad Zahorodnii
b5a4c08231 Move kscreen integration in Workspace
The main motivation behind moving kscreen integration to the
Workspace is to make output configuration work the same way
regardless of the backend and simplify the drm backend.
2022-08-18 10:20:53 +00:00
Xaver Hugl
cdf777663d autotests/integration: use std::unique_ptr for wayland surfaces 2022-08-18 11:54:30 +02:00
Vlad Zahorodnii
65a2f88d24 wayland: Clean up current mode handling in kde-output-device-v2
Compare OutputModeV2 handles to find the current mode, this is more
robust than testing mode properties such as size or refresh rate.
2022-08-18 11:03:24 +03:00
Vlad Zahorodnii
71dcb2738d wayland: Remove OutputChangeSetV2
This allows us to properly map modes with same resolution and refresh
rate but different flags.
2022-08-18 06:47:45 +00:00
l10n daemon script
d78379da62 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-08-18 01:47:34 +00:00
Vlad Zahorodnii
59907c12ff Remove own copies of drm_fourcc.h
libdrm is a mandatory dependency so we don't need to keep own copies of
drm_fourcc.h anymore.
2022-08-17 14:08:05 +00:00
Arjen Hiemstra
a8e6184d3c outputlocator: Return "Unknown" as screen name when we can't determine it
This slightly refactors the name generation in outputlocator to ensure
we don't add spaces when there's nothing to add a space to. It also
ensures that if we can't determine a proper name because all parts are
empty we return "Unknown" as name.
2022-08-17 11:45:37 +00:00
Arjen Hiemstra
5aa7a48f93 Replace "Show FPS" effect with a QML version
This removes a bunch of custom rendering, replacing it with a simple QML
file that makes use of KQuickCharts for chart rendering. Functionally,
it should be mostly the same except that I removed all configuration
options as I don't see why we have those.
2022-08-17 11:12:39 +00:00
Vlad Zahorodnii
fa5be54a6d Remove Platform::repaint()
It doesn't belong in Platform.
2022-08-17 10:39:46 +00:00
Arjen Hiemstra
7951940761 Don't use release() on a unique_ptr if we don't intend to release ownership
There is nothing indicating that `OffscreenQuickScene::rootItem()`
releases ownership. Additionally, calling it multiple times currently
means we get a nullptr the second time we call it which crashes the
outputlocator effect.
2022-08-17 10:11:01 +00:00
Vlad Zahorodnii
cf5205439c backend/wayland: Fix computing output pixel size in xdg_toplevel.configure handler
Currently, we pass the logical size but setGeometry() expects the size
in device pixels. It fixes "kwin_wayland --scale 2" shrinking on every
configure event.
2022-08-17 09:48:38 +00:00
Vlad Zahorodnii
facef8d301 Remove irrelevant comment 2022-08-17 07:51:44 +00:00
Arjen Hiemstra
6831f25125 Remove the lookingglass effect
It has been broken for a while (at least as long as 5.25) with no
bugreports about it. It also doesn't look all that great from the video.
2022-08-17 07:14:56 +00:00
Volker Krause
28210372a4 Remove unused surface property
This helps with the Qt6 build, as  KWaylandServer::SurfaceInterface is a
QObject subclass used in a property here, while we are only able to
forward declare it here as it comes from a library we don't link against.
And that's no longer supported in Qt6.
2022-08-17 06:30:19 +00:00
Laurent Montel
c22aa8092a Remove no longer needed ifdefs 2022-08-17 07:59:46 +02:00
Vlad Zahorodnii
811084503f Remove test_wayland_outputdevice.cpp
It's unused and tests v1, which has been dropped long time ago.
2022-08-16 17:46:36 +03:00
Vlad Zahorodnii
3381441167 Remove unused "q" field 2022-08-16 14:06:39 +00:00
Vlad Zahorodnii
42743a7826 Merge contents of outputconfiguration_v2_interface.cpp and outputmanagement_v2_interface.cpp
The established pattern is to try to keep the implementation of a
wayland protocol in one file.
2022-08-16 14:06:39 +00:00
Janet Blackquill
506e2d6f9f drm_gpu: don't bother trying to assign a crtc to a connector that isn't connected
BUG: 457002
2022-08-16 13:04:31 +00:00
Vlad Zahorodnii
f2e594358c Remove Platform::supportsOutputChanges()
If the platform does not support configuring outputs, applying a config
must fail. However, almost all output backends support output
configuring except, perhaps, the x11 backend, but that case doesn't
matter.
2022-08-16 12:31:28 +00:00
Xaver Hugl
02f9978489 autotests/pointer_input: add test for moving fullscreen windows 2022-08-16 14:05:20 +02:00
Xaver Hugl
8a154d3af1 fix fullscreen move 2022-08-16 14:05:20 +02:00
Vlad Zahorodnii
42bb455b06 wayland: Remove parent arg in OutputChangeSetV2 constructor 2022-08-16 13:13:40 +03:00
Vlad Zahorodnii
9208fb9926 Remove unused include 2022-08-16 12:18:04 +03:00
Vlad Zahorodnii
da41985051 wayland: Use already_applied error in kde-output-management-v2 2022-08-16 12:18:04 +03:00