Commit graph

24624 commits

Author SHA1 Message Date
Vlad Zahorodnii
2d7bd94f16 Remove some unused includes 2023-04-11 12:47:41 +03:00
Vlad Zahorodnii
a08857cfd7 Drop OpenGLBackend::supportsSwapBuffersWithDamage()
It's unused.
2023-04-11 12:45:08 +03:00
Vlad Zahorodnii
17f4cde9af Drop kwineglext.h
EGL_WL_bind_wayland_display definitions are needed only in one cpp file,
so move them there instead.

We need to duplicate EGL_WL_bind_wayland_display definitions because
libepoxy doesn't define them for us.
2023-04-11 12:03:16 +03:00
Vlad Zahorodnii
43b7d2e457 Remove EGL_EXT_image_dma_buf_import and EGL_EXT_image_dma_buf_import_modifiers definitions
libepoxy provides them to us.
2023-04-11 11:59:09 +03:00
Vlad Zahorodnii
466868f5d4 wayland: Refactor linux-dmabuf buffer management
At the moment, the render backend provides its specific implementation
of LinuxDmaBufV1ClientBuffer. This has some of its limitations. For
example, due to the strong coupling, compositing restarts must be
handled carefully. It's hard to have a generic code path to import
dmabufs, which would be nice to have in order to unify graphics buffer
allocation across various backends; currently, it's all scattered.

To make the code simpler, this change drops the commented out YUV import
code path for now. Given that Mesa implicitly handles it, the need for
it is no longer so urgent.
2023-04-11 07:59:28 +00:00
l10n daemon script
5c7e53d635 GIT_SILENT Sync po/docbooks with svn 2023-04-11 03:16:13 +00:00
l10n daemon script
d1f718fe6a GIT_SILENT Sync po/docbooks with svn 2023-04-10 02:23:21 +00:00
l10n daemon script
2538243765 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-04-10 02:19:54 +00:00
Xaver Hugl
6f722954a0 backends/drm: set the scaling mode to none
Setting it to "Full Aspect" causes some problems with amdgpu, breaking switching
the refresh rate between modes

BUG: 468235
2023-04-09 10:26:38 +00:00
l10n daemon script
565356e7e3 GIT_SILENT Sync po/docbooks with svn 2023-04-09 02:29:30 +00:00
l10n daemon script
81f62b9d4f 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-04-09 02:25:33 +00:00
Vlad Zahorodnii
4691086389 wayland: Break xdg-foreign connection when window is closed
When a window is closed, we don't want to listen for the
WaylandServer::foreignTransientChanged signal anymore as it can lead to
a crash.
2023-04-08 07:56:05 +00:00
l10n daemon script
cd812fab0f GIT_SILENT Sync po/docbooks with svn 2023-04-08 02:39:39 +00:00
David Edmundson
023fc220a1 wayland: Update pointer state before ending the drag
ending a drag will update focus. Kwin explicitly resets it to whatever
is now under the mouse now that the implicit grab has ended.

This means no-one sends a pointer up.

Clients (xwayland) don't automatically make leave events count as a
mouse up, because typically you don't get a leave event whilst we have a
grab.

Xwayland also can't track the status of the wl_datasource as it didn't
use it.

This patch shouldn't affect any wayland clients as we don't send a frame event
until the focus changes which is after the dnd_finished events.

BUG: 465444

Testing done:
 - dragged firefox under xwayland tabs out from firefox to the desktop
 - confirmed a new window appeared
2023-04-07 22:14:27 +00:00
Ismael Asensio
78643b958f kcms/rules: Import kcmutils to provide ConfigModule attached property
On KF5 it was provided by the module `kcm`.
2023-04-07 21:01:09 +02:00
Aleix Pol
f35afcd7ae screencast: Still set the size to 0 for cursor-only frames
Otherwise OBS glitches (and so does KPipeWire-based software)
2023-04-07 17:15:28 +02:00
l10n daemon script
20e858b2fe GIT_SILENT Sync po/docbooks with svn 2023-04-07 02:24:57 +00:00
l10n daemon script
1cb5614fc1 GIT_SILENT Sync po/docbooks with svn 2023-04-06 02:22:09 +00:00
Aleix Pol Gonzalez
ef6612ff77 screencast: Improve how we communicate that a frame has just cursor info
Set the SPA_CHUNK_FLAG_CORRUPTED flag to tell clients to ignore the frame.

See https://github.com/obsproject/obs-studio/issues/8630
2023-04-05 16:36:19 +00:00
David Edmundson
f03af5eff5 libkwineffects: Set format on the main OffscreenQuickView
When showing the window RHI will realise the window has no underlying
platform window and create a temporary offscreen surface, different from
the offscreen surface we'll eventually be rendering into. This will use
the format of the main window.

If this offscreen surface format does not match the format of the
context we can fail in makeCurrent calls.
2023-04-05 14:36:33 +00:00
Jorge Barroso Barea
e68e92bcbd kcms: Move footer actions to headers
This yields a more modern appearance and consistency with other KCMs
that have already adopted this style.
2023-04-05 13:45:28 +00:00
l10n daemon script
575831a331 GIT_SILENT Sync po/docbooks with svn 2023-04-05 02:40:30 +00:00
Alexander Lohnau
38758172f3 plugins/kpackage: Refactor CMake code a bit 2023-04-04 18:16:24 +00:00
Alexander Lohnau
d32f9be5af plugins/kpackage: Rename metadata json files
Having them this long and the cpp file very short doesn't really make sense.

Also, we no longer install those files, but embed then in the C++ plugins
2023-04-04 18:16:24 +00:00
Alexander Lohnau
4ed3522e60 Remove author data, name and description from package metadata files
We do not display this data anywhere and do not use it internally either.

Task: https://phabricator.kde.org/T15452
2023-04-04 18:16:24 +00:00
Alexander Lohnau
3c2ac3c901 plugins/kpackage: Simplify CMake code
Just a simple wrapper that creates the plugin and links KPackage
2023-04-04 18:16:24 +00:00
Alexander Lohnau
f88b80e90e plugins/kpackage: Make plugin cpp file only, add missing Q_Object macro
The macro is not strictly needed, but it simplifies debugging due to us having
the classname from the staticMetaObject available
2023-04-04 18:16:24 +00:00
Alexander Lohnau
017da14444 plugins/kpackage: Modernize code using initializer list syntax 2023-04-04 18:16:24 +00:00
Alexander Lohnau
7e76525f6e plugins/kpackage: Call file/dir definitions without translations
Depends on https://invent.kde.org/frameworks/kpackage/-/merge_requests/74
2023-04-04 18:16:24 +00:00
l10n daemon script
6a93514220 GIT_SILENT Sync po/docbooks with svn 2023-04-04 02:43:10 +00:00
Vlad Zahorodnii
baac61b8e5 Fix calling virtual methods in Window destructor
When a window is removed from the deleted list, some effects can perform
cleanup. In its turn, it means that they can call some Window methods.

If those methods happen to be virtual, kwin can crash because calling
virtual methods in the destructor of a base class has undefined behavior.
2023-04-03 11:12:13 +03:00
Vlad Zahorodnii
8c87cd913e libkwineffects: Add interface include dirs
libkwineffects has been moved in a subdirectory to avoid including the
"toplevel" include dir in interface include dirs.
2023-04-03 07:07:43 +00:00
l10n daemon script
dacc9a65fd GIT_SILENT Sync po/docbooks with svn 2023-04-03 02:29:14 +00:00
Xaver Hugl
86a9796a5a kwinglutils: bind texture in GLTexture::render
... instead of doing it everywhere that the method is used
2023-04-02 12:32:10 +02:00
l10n daemon script
52361936e7 GIT_SILENT Sync po/docbooks with svn 2023-04-02 02:26:26 +00:00
l10n daemon script
8b812ecb7f GIT_SILENT Sync po/docbooks with svn 2023-04-01 02:29:59 +00:00
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