Commit graph

25264 commits

Author SHA1 Message Date
Vlad Zahorodnii
c29238f51a Don't save old screen sizes in Workspace::initializeX11()
It's done when initializing Workspace::outputs().
2023-09-22 11:17:39 +00:00
Vlad Zahorodnii
d6e94163f5 backends/fakeinput: Implement fake input protocol in backend
The interface is redundant now since there's an abstract input backend
abstraction.
2023-09-22 11:08:26 +03:00
Vlad Zahorodnii
0d2a66f054 Don't call setShowingDesktop() in Workspace::initializeX11()
No idea why it's called there, but we don't want to break showing
desktop mode if Xwayland starts for some reason.
2023-09-22 05:29:41 +00:00
l10n daemon script
5d707a11ba GIT_SILENT Sync po/docbooks with svn 2023-09-22 02:16:30 +00:00
Vlad Zahorodnii
6d8cdef33e x11: Drop support for private colormaps
According to 4b686a204250b4416fce79fa55b8a89c5193de38 in kde-workspace,
the support for private colormaps was mainly useful to 8bit displays,
which are relic of time now.
2023-09-21 11:58:41 +00:00
l10n daemon script
425f0a40e0 GIT_SILENT Sync po/docbooks with svn 2023-09-21 02:19:45 +00:00
Vlad Zahorodnii
8d70b1cbe1 Drop X11Compositor::isOverlayWindowVisible()
It's used once and OverlayWindow::isVisible() can be used instead.
2023-09-20 17:18:30 +03:00
Vlad Zahorodnii
9a5e51eb32 Move "Suspend Compositing" shortcut to X11 compositor
Toggling compositing is specific only to X11 so move the corresponding
shortcut to the X11 compositor implementation.
2023-09-20 16:13:08 +03:00
Vlad Zahorodnii
15ed4f393e wayland: Simplify startup of compositor
At the moment, the wayland compositor has to handle the case of having
no workspace. This should be unnecessary and it creates a pesky cycling
dependency between Workspace and Compositor.

Given that the Workspace acts more like a container and kwin starts
accepting client connections after starting compositing, it's possible
to create the Workspace earlier and simplify the start() function a bit.
2023-09-20 12:50:15 +00:00
Vlad Zahorodnii
de905d09f4 Remove unused atoms.h include 2023-09-20 12:15:08 +00:00
Vlad Zahorodnii
2a0d5f5e1d Drop compositing suspension dbus api
The main motivation behind this change is to encapsulate X11 compositor
implementation to the point that it can be moved from libkwin to
kwin_x11.

There are two options: either get rid of suspend and resume requests, or
add suspend and resume virtual functions in the Compositor. The apps
must definitely not rely on the dbus api, they must use the X11 api.
Compositing suspension api works only on X11 and it's quite obscure,
it's not used by any other KDE component.

So this patch goes for the most simplest option: dropping the requests.
2023-09-20 12:15:08 +00:00
Vlad Zahorodnii
b7f55534bc Simplify Window::setReadyForPainting()
The windowShown() signal can be emitted regardless of compositing
status. Not sure why this if statement exists, perhaps a premature
optimization.
2023-09-20 11:56:02 +00:00
Vlad Zahorodnii
a702bba88c Remove X11 leftover in wayland compositor
Amends 72aad0881d

This connect() was overlooked in 72aad.
2023-09-20 10:34:20 +03:00
Vlad Zahorodnii
0880fec9c7 Make Window::updateShadow() agnostic about compositing status
The Shadow no longer owns the texture, so it can be loaded while
compositing is off.

This changes removes the compositing status check to simplify code.
2023-09-20 05:23:05 +00:00
l10n daemon script
5f4124360b GIT_SILENT Sync po/docbooks with svn 2023-09-20 02:16:03 +00:00
Vlad Zahorodnii
f633bd1ff4 Create X11Compositor in main_x11.cpp
This makes X11Compositor initialization similar to the initialization of
the wayland compositor.
2023-09-19 15:28:09 +00:00
Vlad Zahorodnii
dba29ece4b Add X11 composite window property in Application
This allows checking if the given override redirect is the composite
overlay window without resorting to platform specific implementation of
Compositor.
2023-09-19 15:28:09 +00:00
Vlad Zahorodnii
c9547071ea Rework blocking compositing on X11
Currently, the Workspace is responsible for rerouting
X11Window::blockingCompositingChanged to
X11Compositor::updateClientCompositingBlocking(). It has a few issues:
if the client is initially blocking compositing, it's not going to work
as expected. The second issue is that it creates a coupling between
platform specific compositor implementation and generic Workspace. It's
a blocker for moving X11Compositor to kwin_x11 executable, etc.
2023-09-19 15:28:09 +00:00
Vlad Zahorodnii
24a88b035c Don't reconfigure effects in Compositor::reinitialize()
If start() fails, the effects pointer will be null.
2023-09-19 15:16:01 +00:00
Vlad Zahorodnii
b555157e8d Don't reparse kwinrc in Compositor::reinitialize()
The compositing options are no longer loaded in Compositor::start(), but
when kwin starts or the Workspace is reconfigured.
2023-09-19 15:16:01 +00:00
Xaver Hugl
f43e45c984 backends/drm: work around llvmpipe implicit sync not working
implicit sync doesn't work properly with glFlush + KMS and llvmpipe doesn't support
EGL_ANDROID_native_fence_sync either, so we need to wait for rendering to complete
in a blocking fashion.
2023-09-19 15:07:45 +00:00
Vlad Zahorodnii
72aad0881d xwayland: Initialize X11 compositing in Xwayland
If somebody else claims the compositing selection, we definitely do not
want to stop compositing. It will also help with encapsulating
X11-specific code and splitting it out in the future.
2023-09-19 14:36:09 +00:00
Xaver Hugl
f223362ddf scene/cursordelegate_opengl: fix projection matrix with rotated screens 2023-09-19 13:41:00 +02:00
Xaver Hugl
90b2aa25e0 compositor: fix the hardware cursor with rotated screens 2023-09-19 11:01:48 +00:00
Xaver Hugl
9e65b12178 renderlayer: also schedule a repaint when hiding the layer 2023-09-19 11:01:48 +00:00
l10n daemon script
4223b6ca72 GIT_SILENT Sync po/docbooks with svn 2023-09-19 02:18:29 +00:00
l10n daemon script
6a1e86961a 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-09-19 02:14:27 +00:00
Vlad Zahorodnii
4d2c9f5d88 Refactor compositing config loading
Config loading is split in two groups: loading compositing config and
loading the rest. They are loaded separately at different times. Some
options are loaded in the Options constructor, some are loaded when compositing
starts, some are loaded when the Workspace is created. It's not easy to
keep track of what loads what and when.

This change simplifies option handling by loading all options in bulk
and decouples Options from OutputBackend and GLPlatform to ensure that
it can safely load options before kwin is fully operational.
2023-09-18 13:40:33 +00:00
Vlad Zahorodnii
ca0a2229cc Drop unused QHostInfo includes 2023-09-18 06:49:36 +00:00
l10n daemon script
a4f2f495b9 GIT_SILENT Sync po/docbooks with svn 2023-09-18 02:22:21 +00:00
l10n daemon script
046acfd939 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-09-18 02:17:51 +00:00
l10n daemon script
1c75183914 GIT_SILENT Sync po/docbooks with svn 2023-09-17 02:56:23 +00:00
Nicolas Fella
6c7ac8391a Use keyword signature for target_link_libraries call 2023-09-16 22:20:45 +02:00
Fushan Wen
4716f91b9a
plugins/startupfeedback: use inplace QImage::convertTo
to reuse internal buffers
2023-09-16 22:04:29 +08:00
l10n daemon script
a7b6093ca0 GIT_SILENT Sync po/docbooks with svn 2023-09-16 02:19:24 +00:00
Vlad Zahorodnii
de36fe82e8 wayland: Integrate KWaylandServer classes into KWin namespace 2023-09-15 16:31:15 +03:00
Vlad Zahorodnii
6ac4012827 wayland: FakeInputDevice -> FakeInputDeviceInterface
This is to avoid conflicting with KWin::FakeInputDevice
2023-09-15 16:31:15 +03:00
Vlad Zahorodnii
43eceba9ce wayland: Rename Cursor to PointerSurfaceCursor 2023-09-15 16:31:15 +03:00
Vlad Zahorodnii
541fd45a25 wayland: Add missing moc include 2023-09-15 13:13:43 +00:00
Vlad Zahorodnii
8bf2318800 wayland: Drop "_interface" from filenames
The cpp files in the wayland directory are named after protocol names.
"_interface" does not contribute anything new.
2023-09-15 13:13:43 +00:00
l10n daemon script
51e5cbe88b GIT_SILENT Sync po/docbooks with svn 2023-09-15 02:14:46 +00:00
David Redondo
eb9130ac64 Use QProcessEnvironment::InheritFromParent on X11
Before 885e9acb6e
Application::processStartupEnvironment() returned
QProcessEnvironment::systemEnvironment() which means the current
environment of KWin when this function was called. By setting
InheritFromParent we can replicate this behavior.
This fixes KWin starting processes on X11.
2023-09-14 12:30:45 +00:00
l10n daemon script
1739388b00 GIT_SILENT Sync po/docbooks with svn 2023-09-14 02:14:14 +00:00
David Redondo
216a268a43 Use qt prefix variant of toplevel drag protocol
As this is what Qt now implements
2023-09-13 15:30:17 +00:00
David Redondo
b336691b3e Implement xdg-toplevel-drag 2023-09-13 15:30:17 +00:00
David Redondo
01a1aaf99e Also send drop when it was not accepted
This enables applications to distinguish
- successful drop
- drop onto client that didn't accept
- cancelled drag
2023-09-13 15:30:17 +00:00
Marco Martin
3a95c20279 Fix touch on PointerHandlers
The events we forward to the offscreen QML view are with our own
QPointingDevice instance, which has a devicetype of touch but a null pointerType.

In Qt5 this was enough, but pointerhandlers in qt6 refuse events with an undefined
pointertype, so we have to explicitly set it to finger

BUG:473541
2023-09-13 13:25:57 +00:00
Xaver Hugl
36513123f3 backends/drm: always check for a test buffer before presentation
Otherwise atomic tests might fail unnecessarily
2023-09-13 13:57:30 +02:00
Xaver Hugl
87cee87aff backends/drm: fail presentation if there's no buffer for it yet
BUG: 474483
2023-09-13 13:37:53 +02:00
l10n daemon script
c7ddf987a1 GIT_SILENT Sync po/docbooks with svn 2023-09-13 02:24:54 +00:00