Commit graph

24738 commits

Author SHA1 Message Date
Vlad Zahorodnii
7af928aae4 Drop Window::tabTo() 2023-03-31 21:58:54 +03:00
Vlad Zahorodnii
1041794e41 Adjust some comments in Window
Neither Window::frameMargins() nor Window::wantsShadowToBeRendered() are
virtual methods, so remove "Default implementation ..." comments.
2023-03-31 20:44:19 +03:00
Vlad Zahorodnii
70353d399d Drop Window::inputGeometry
It's been mostly superseded by Window::hitTest().
2023-03-31 20:44:19 +03:00
Vlad Zahorodnii
3763e4f84b wayland: Interpret input panel's input shape as the window geometry
maliit creates a fullscreen overlay window which doesn't go along well
with out geometry abstractions. For example, raw frame geometry can't be
used to displace normal windows otherwise they will be pushed offscreen.

Some of the maliit quirks are leaked in the InputMethod class. After
extending the lifetime of the InputPanelV1Window, they can cause
problems.

In order to make code in InputMethod more intuitive and encapsulate
maliit quirks, this change makes InputPanelV1Window interpret the
bounding rectangle of the input shape as the window geometry. This
lets us get rid of the hack in inputGeometry() too.

The size checks in Mode::VirtualKeyboard case have been removed because
they should be irrelevant. When reposition() is called, the wl_surface
is mapped, so its size cannot be 0x0.
2023-03-31 16:59:13 +00:00
Vlad Zahorodnii
4e8214e69e Drop custom inputGeometry and inputTransformation in x11 and xdg-shell windows
Effectively, X11Window and XdgSurfaceWindow use same stuff. Using the
buffer geometry should be fine in InternalWindow too.
2023-03-31 18:50:01 +03:00
Vlad Zahorodnii
2233190e67 Update pointer and tablet focus when focused window is closed
Prior to dropping Deleted, we implicitly relied on the fact that the
QPointer storing the focused window will be reset to null when the
window is closed so we didn't include any cleanup logic.

After dropping Deleted and extending the lifetime of the original
window, it's no longer the case and we have to explicitly handle closing
the window otherwise kwin can encounter unexpected cases.
2023-03-31 13:41:43 +00:00
Jan Grulich
75c7689f67 Screencast: fix renegotiation when client fails to use DMABuf modifiers
When client fails to import a DMABuf with a certain modifier, it will
remove it from offerings on his side and offer a new set of modifiers
for us to use. In case the list ends up being small enough that even we
won't be able to use any of the modifiers, we would still keep these
modifiers on our list and offering them to the client. With this we
would end up in a loop renegotiating and never actually fallback to use
MemFD buffers instead. We should also offer modifier-less DMABufs as
in the past. Using these we just need to avoid offering them as they
should be used as the last option.

BUG: 448839
2023-03-31 12:31:23 +00:00
Vlad Zahorodnii
4de69f2ef7 wayland: Close internal popups instead of hiding
Hiding the QWindow handle confuses QWidget, which results in user
actions menu not showing up on second launch. Might be a Qt bug.

On the other hand, it makes sense to close dismissed popups, so let's do
it.
2023-03-31 11:32:11 +00:00
Vlad Zahorodnii
4578cf352b Revert "Revert "wayland: Update shadow immediately""
This reverts commit 08e392f368.

It appears like with RHI, user code can't mess with its current opengl
context, so let's update shadows immediately.

Just to be sure, shadow cleanup logic in ShadowItem has been hardened to
avoid disturbing the current opengl context unnecessarily.

BUG: 467926
2023-03-31 10:37:30 +00:00
Vlad Zahorodnii
072d5ff045 scene: Avoid changing current opengl context if the shadow has no texture
If there's nothing to be destroyed, do nothing.
2023-03-31 10:37:30 +00:00
Vlad Zahorodnii
fd5807ecb7 backends/drm: Fix enabled state
"props->enabled" checks whether std::optional has a value, that's not
what we want.
2023-03-31 11:38:45 +03:00
Vlad Zahorodnii
a04609b46f wayland: Fix output order sanitization in kde-output-management-v2
We need to remove disabled outputs.
2023-03-31 10:46:26 +03:00
Xaver Hugl
4f48258269 kscreenintegration: don't access optionals that may be missing a value 2023-03-31 10:34:18 +03:00
Xaver Hugl
f70be829c6 backends/drm: don't access nullptr output configs 2023-03-31 10:34:18 +03:00
Vlad Zahorodnii
050336e421 Minor cosmetic improvements in Window
This change reorders some things in Window header so related things are
kept spatially close to make the code easier to navigate.
2023-03-31 06:56:47 +00:00
Alexander Lohnau
fe935c0dc8 Adjust to new KPackage namespace for structures
See https://invent.kde.org/frameworks/kpackage/-/merge_requests/73
2023-03-31 04:35:11 +00:00
l10n daemon script
fe5b9961cf GIT_SILENT Sync po/docbooks with svn 2023-03-31 02:37:25 +00:00
Aleix Pol
d0b87a900f screencasting: Add an autotest
Adds an autotest that makes sure a screencasting stream works as
expected.
Adds an optional dependency to KPipeWire only effective to run the test.
2023-03-31 00:19:59 +02:00
Aleix Pol
7a6c2ce36f screencasting: Support opaque drm video formats
Fixes a warning on the CI
2023-03-31 00:18:53 +02:00
Aleix Pol
aaae80a569 backends/virtual: Fix format
While we are using GL_RGB8, it seems to be using 32bit pixels.
2023-03-31 00:18:53 +02:00
Vlad Zahorodnii
abb9b0d2cd Reshuffle desktop and activity related code in Window
Keep virtual desktop and activity related code spatially close to
improve code readability.
2023-03-30 18:42:28 +00:00
Vlad Zahorodnii
712a23bd59 Move Window::desktop to X11Window
Window::desktop() is obsolete. On the other hand, X11 doesn't support
having a window on several virtual desktops, so we still need it. As a
compromise, this change moves it to X11Window instead.
2023-03-30 18:42:28 +00:00
Vlad Zahorodnii
0d11a09010 tabbox: Port away from Window::desktop 2023-03-30 18:42:28 +00:00
Vlad Zahorodnii
2c12a6a417 wayland: Avoid updating outputs of a closed window
BUG: 467954
2023-03-30 18:29:05 +00:00
Xaver Hugl
66495f9c79 wayland/outputmanagement: don't access nullptr changesets
Since 6b8e08dfa9, changesets can be nullptr
2023-03-30 18:17:16 +00:00
Vlad Zahorodnii
101e38527d kcms: Port away from org.kde.kcm.ConfigModule
org.kde.kcm.ConfigModule doesn't exist anymore. Its replacement lives in
org.kde.kcmutils module now.

Note that the replacement has no "quickHelp" property, so it's been
removed. While on this, also drop "ConfigModule.buttons". It still
exists in the new ConfigModule but the default buttons should be fine.
2023-03-30 17:21:14 +00:00
Vlad Zahorodnii
73c26baab4 scripting: Make WindowModel.desktop property return list of desktops
The X11 desktop id property is obsolete.
2023-03-30 16:55:42 +00:00
Vlad Zahorodnii
aebc361c45 Drop Window::isOnDesktop(int) 2023-03-30 15:42:31 +00:00
Vlad Zahorodnii
e306e1b287 tabbox: Port away from legacy desktop ids 2023-03-30 15:42:31 +00:00
Vlad Zahorodnii
222b23eaa3 Adjust to kdecoration api changes 2023-03-30 15:25:50 +00:00
Vlad Zahorodnii
d76527e7e6 Port window cascading from X11 desktop ids to VirtualDesktop 2023-03-30 12:21:05 +03:00
Vlad Zahorodnii
044e160a50 Cleanup includes in window.cpp 2023-03-30 11:44:30 +03:00
Vlad Zahorodnii
cd36bb82b2 Regroup methods and fields in Window
Group methods and fields together to make Window internals less chaotic.
2023-03-30 11:44:30 +03:00
Vlad Zahorodnii
ec31ab4980 Drop Window::resourceMatch()
Its body is trivial and it's used only once so it can be inlined.
2023-03-30 07:33:20 +00:00
Vlad Zahorodnii
25f284e68c Remove comments reminding to copy properties in copyToDeleted()
Window::copyToDeleted() is gone.
2023-03-30 07:12:10 +00:00
l10n daemon script
b0841fbe7d GIT_SILENT Sync po/docbooks with svn 2023-03-30 02:30:25 +00:00
Nate Graham
fec40b7163 Revert "backends/libinput: don't multiply v120 value by scroll speed"
This reverts commit 9cd52b4060.

This commit broke the adjustable scroll speed feature on Wayland. That
feature may not have been implemented in the most technically ideal way,
but simply breaking it and leaving the mouse KCM with UI control that
does nothing isn't great. Besides, there was always a simple way to
avoid any scroll-related regressions caused by this feature: reset the
scroll speed to its default value, which internally is a multiplier of 1
and exercises the same codepath that 9cd52b40 imposes on everyone.

We can come up with a better implementation for Plasma 6.

BUG: 464592
FIXED-IN: 5.27.4
2023-03-29 15:55:07 +00:00
Vlad Zahorodnii
c6035115f9 Drop ReleaseReason enum 2023-03-29 14:03:42 +00:00
Vlad Zahorodnii
3e766e8d5e Move Window::{frameId,window} to X11Window 2023-03-29 13:18:01 +03:00
Vlad Zahorodnii
1334b38ee1 Move X11-specific "skip close animation" handling to X11Window 2023-03-29 12:53:21 +03:00
Vlad Zahorodnii
d35f88adee Move Window::wmClientLeader to X11Window 2023-03-29 12:49:28 +03:00
Vlad Zahorodnii
e403c5bf63 Move Window::info to X11Window 2023-03-29 12:39:10 +03:00
Vlad Zahorodnii
bf19234df3 Move Window::detectShape to X11Window 2023-03-29 11:10:51 +03:00
Vlad Zahorodnii
fa8bd5c0d9 Move Window::{opaqueRegion,shapeRegion} to X11Window 2023-03-29 11:10:51 +03:00
Vlad Zahorodnii
46d0c04f91 Move Window::{depth,hasAlpha,visual} to X11Window 2023-03-29 11:10:51 +03:00
Vlad Zahorodnii
87bfdcf1d6 scene: Port WindowItemX11 to X11Window 2023-03-29 11:10:51 +03:00
Vlad Zahorodnii
551e4a8233 Move Window::propertyNotifyEvent to X11Window 2023-03-29 06:50:53 +00:00
Vlad Zahorodnii
005b098707 Move xwayland surface association logic to X11Window 2023-03-29 06:50:53 +00:00
Vlad Zahorodnii
2d275e16ec Merge XwaylandWindow with X11Window 2023-03-29 06:50:53 +00:00
Friedrich W. H. Kossebau
c395afde9b KIdleTime plugin: adapt to new name KAbstractIdleTimePoller 2023-03-29 02:51:46 +00:00