Commit graph

24350 commits

Author SHA1 Message Date
l10n daemon script
86508b25c0 GIT_SILENT Sync po/docbooks with svn 2023-03-17 03:02:04 +00:00
Alexander Lohnau
1f7ec93954 Adjust to new KCM classes
Depends on https://invent.kde.org/frameworks/kcmutils/-/merge_requests/121
2023-03-16 13:50:16 +00:00
David Redondo
d5679ee82c Port some connections to Qt::SingleShotConnection 2023-03-16 11:03:07 +01:00
Vlad Zahorodnii
3704c0a945 backends/drm: Remove some gbm_surface,gbm_device forward declarations 2023-03-16 09:49:06 +02:00
l10n daemon script
b7834edefe GIT_SILENT Sync po/docbooks with svn 2023-03-16 02:37:01 +00:00
Vlad Zahorodnii
7dbb06d80c Fix picking drag target
The normal stacking order contains managed and unmanaged windows now.
This kind of breaks dragging from X11 to Wayland clients.

When an X11 client is the drag source, it's going to create an override
redirect window for the drag icon, which is beneath the pointer.

findManagedToplevel() will return the drag icon instead of the window
beneath the drag icon.

The root problem is that normal event processing has different needs. It
doesn't care about window type except when the screen is locked, while
dnd does. Perhaps it also makes sense to check whether the window accepts
focus.

This change introduces a specialized helper to pick the drag target.
Unfortunately, it amounts to some code duplication. On the other hand,
not sure that other options (such as adding flags to findToplevel()) are
better.
2023-03-15 15:45:33 +00:00
Vlad Zahorodnii
bcc299c3fe Drop unused Workspace::deletedList()
It's unused, and there should not be any usecases for it outside the
Workspace.
2023-03-15 14:10:44 +02:00
Vlad Zahorodnii
8f21d444c6 Make Workspace::allClientList() return all windows
Currently windows are scattered in a few separate lists. If you need to
go through the windows, you have to do it piece by piece. On the other
hand, with the overhaul of window types, we've started converging
towards one universal type: Window. Keeping windows in the separate
buckets goes against this design.

Workspace::stackingOrder() already contains all windows. This change
repurposes Workspace::allClientList() from a list of "normal" windows to
all windows, i.e. Workspace::windows(), to be consistent.

There's one API change though. Scripting API will expose other window
types too. This is an intentional change so scripted effects could
operate with all windows. It also matches the current behavior observed
in libkwineffects, which exposes all windows as well.
2023-03-15 11:52:01 +00:00
Vlad Zahorodnii
392fb4eb01 Add explicit Window::isClient() checks
This is needed to prepare for introducing Workspace::windows().
2023-03-15 11:52:01 +00:00
Xaver Hugl
f433213bd6 backends/drm: simplify how atomic commits are done
Instead of having every DrmProperty store pending values, store the data
for the next commit in a separate and temporary type. This simplifies the
code and makes it possible to do commits in a separate thread
2023-03-15 12:09:12 +01:00
l10n daemon script
f71e322ead GIT_SILENT Sync po/docbooks with svn 2023-03-15 02:35:20 +00:00
Jan Grulich
3807b41c66 Screencast: avoid using DMABufs exclusively to allow renegotiation
Using DMABufs only will not allow clients to fallback to MemFD buffers
in case they fail to import DMABufs for whatever reason and completely
break screen sharing in such case.
2023-03-14 19:50:07 +00:00
Alexander Lohnau
4e9303a6cc Adapt to KPackage API changes for install/uninstall
This simplifies the code, because we can access the package after installing it.

Depends on https://invent.kde.org/frameworks/kpackage/-/merge_requests/68
2023-03-14 20:18:39 +01:00
Xaver Hugl
d9077e36c5 backends/drm: use a common base class for property blobs
This simplifies the code a bit and makes more generic handling of blobs
possible
2023-03-14 19:23:17 +01:00
Vlad Zahorodnii
f3dc057c71 x11: Disable NETWinInfo in X11Window
This piece of logic belongs in X11Window rather than Deleted as the
latter is merely a representation of a closed window.
2023-03-14 17:52:50 +00:00
Nate Graham
a42f7f4807 kcms/effects: Add "tile"-related keywords
Ultimately the best solution would be to implement
https://bugs.kde.org/show_bug.cgi?id=462722, but that hasn't been done
yet, so for now let's use the existing approach of adding the names of
effects into the keywords list for this KCM to surface those effects at
the system level so e.g. people can find them with KRunner.

BUG: 467279
FIXED-IN: 6.0
2023-03-14 11:03:09 -06:00
Vlad Zahorodnii
88db280f2a Fix -Wdeprecated-enum-enum-conversion
Even though zwp_text_input_v2_content_hint and
QtWaylandServer::zwp_text_input_v2::content_hint represent the same
values, they are not the same from the compiler perspective.
2023-03-14 16:29:36 +00:00
Vlad Zahorodnii
7aa89944d7 Fix -Wambiguous-reversed-operator
`this` must be const to match the const-ness of the other mode.
2023-03-14 17:46:57 +02:00
Vlad Zahorodnii
af4397581a Fix warning about comparing different enums
QEventPoint::state() returns a QEventPoint::State value, not
a Qt::TouchPointState value.
2023-03-14 14:32:27 +00:00
Friedrich W. H. Kossebau
b2a50cffd8 Adapt to Qt6 name of QAccessibilityClient 2023-03-14 13:33:16 +00:00
Vlad Zahorodnii
b9daa38da1 Drop Application::setupTranslator()
KI18n already does the same for us in its Q_COREAPP_STARTUP_FUNCTION
hook and setupTranslator() produces a compiler warning.
2023-03-14 12:55:31 +02:00
Vlad Zahorodnii
8eaebe5b7d Get rid of compiler warnings about unused getEglErrorString() 2023-03-14 10:21:11 +00:00
Vlad Zahorodnii
d6309eb605 Fix -Wformat
QVector::count()'s return type is qsizetype. On a 64 bit platform, it's
equivalent to qint64, so "%d" does not suffice.

There are two ways to fix it: use PRIdQSIZETYPE or switch to the stream
operator. Since the warning format is not complex, this takes the latter
approach.
2023-03-14 09:19:41 +00:00
Vlad Zahorodnii
328cf606d4 Fix compiler warning about unused captured variable 2023-03-14 11:04:30 +02:00
Vlad Zahorodnii
1dde9a7b22 Remove unused X11WindowedEglLayerSwapchain::m_backend field 2023-03-14 10:42:20 +02:00
Vlad Zahorodnii
301d749e74 Remove unused RenderTarget::m_texture field 2023-03-14 10:42:20 +02:00
Vlad Zahorodnii
c8ed324a3d Remove unused functions 2023-03-14 09:57:18 +02:00
Vlad Zahorodnii
c91b90c58a Tidy Window::windowClosed() signal
"window" is redundant, so remove it. Also remove the original window
argument to improve the API consistency.
2023-03-14 07:15:56 +00:00
l10n daemon script
01cfa5e484 GIT_SILENT Sync po/docbooks with svn 2023-03-14 02:39:54 +00:00
Vlad Zahorodnii
b4413f4b8b scene: Rework window elevation
The order in which windows are painted is computed dynamically every
frame. On the other hand, with the introduction of items, it's desired
to avoid doing that so repaints can be scheduled as needed. The
unification also opens the possibilities for more rendering related
refactors to make the code nicer and more reusable.
2023-03-13 17:27:15 +00:00
Aleix Pol
1cbc9185fb screencast: Properly detect the fallback
Do not check an it that is the container's end()
2023-03-13 16:49:06 +00:00
Vlad Zahorodnii
bacc35c236 backends/virtual: Provide vertically mirrored layer buffers
This makes the behavior of the virtual backend more consistent with
wayland, x11, and drm backends. However, the main advantage is that it's
more nicer to memfd fallback code path in screencasting plugin.
2023-03-13 15:34:36 +00:00
Vlad Zahorodnii
2f56cdc3fe Replace Deleted with Window where possible
With this, Window and Deleted can be interchanged, which makes merging
the two easier.
2023-03-13 14:41:44 +02:00
Vlad Zahorodnii
149db99c6a Make Window ref'able 2023-03-13 14:41:44 +02:00
Vlad Zahorodnii
995d509e45 Allow destroying Deleted immediately
Currently Deleted are destroyed with a delay to avoid dangling pointers
within the middle of painting.

On the other hand, it's reasonable to require not to delete windows when
kwin starts painting the screen.

Over the years, we refactored how deleted windows. They are always
unreferenced after finishing the current frame. So it should be fine to
destroy Deleted immediately now.
2023-03-13 14:41:41 +02:00
Vlad Zahorodnii
cdd18cd393 effects/slidingpopups: Prevent potential use-after-free 2023-03-13 12:15:23 +00:00
Vlad Zahorodnii
58ac7888e9 backends/x11: Split EglOnXBackend
The differences between windowed and host flavors of the X11 backend
have become too big, so let's split EglOnXBackend to avoid abstracting
something that makes little sense.
2023-03-13 11:36:06 +00:00
Vlad Zahorodnii
3bec3abb3f Use "window" instead of "toplevel" in Workspace 2023-03-13 10:37:01 +00:00
Vlad Zahorodnii
5b18cba3a0 Drop Workspace::{findAbstractClient,forEachAbstractClient} 2023-03-13 10:37:01 +00:00
Vlad Zahorodnii
497ba4a62a Stop including deleted windows in Workspace::forEachToplevel 2023-03-13 10:37:01 +00:00
Xaver Hugl
7f619e7770 colordevice: default the simple transformations to 1 2023-03-13 07:30:51 +00:00
Xaver Hugl
96b625f7d7 backends/drm: fail commits if nonexistent properties would be set 2023-03-13 07:30:51 +00:00
l10n daemon script
fa814d0b68 GIT_SILENT Sync po/docbooks with svn 2023-03-13 02:53:41 +00:00
l10n daemon script
a92a4a9f20 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"
2023-03-13 02:48:29 +00:00
Xaver Hugl
4df1b3a219 backends/drm: ignore opaque formats for the cursor plane
The kernel may expose an opaque format that we normally prefer, so to
prevent picking an opaque format for the cursor, filter those out.
2023-03-12 18:18:50 +00:00
Vlad Zahorodnii
166b5f96fc effects/screenshot: Use more FileDescriptor
It helps to express the ownership of the pipe fd in ScreenShotSinkPipe2
better.

ScreenShotSinkPipe2 is not made to take a FileDescriptor too because
it's complicated by CaptureInteractive().
2023-03-12 14:52:18 +00:00
Vlad Zahorodnii
4148be0d27 Port to versionless QML module imports
It's more convenient and Qt upstream seems to encourage to use it too,
e.g. example import statements have no version.
2023-03-12 14:18:34 +00:00
Vlad Zahorodnii
18a9b3b25a Adjust to KDecoration API changes 2023-03-12 13:29:36 +00:00
l10n daemon script
c2b4526791 GIT_SILENT Sync po/docbooks with svn 2023-03-12 04:33:16 +00:00
l10n daemon script
62fafd4b5d GIT_SILENT Sync po/docbooks with svn 2023-03-11 03:08:09 +00:00