Commit graph

25446 commits

Author SHA1 Message Date
Fushan Wen
9ef65cbe03
WindowHeapDelegate: fix a binding loop warning
It doesn't make sense to use Math.min when the label is always placed at
the bottom center of the thumbnail item.
2023-09-29 19:41:27 +08:00
Fushan Wen
51c517f2b8
plugins/desktopchangeosd: hide osd when Overview effect is active 2023-09-29 18:37:48 +08:00
Fushan Wen
5fc009d64a
scripting: add isEffectActive to query effect active state 2023-09-29 18:37:48 +08:00
Fushan Wen
c974bf0b04
plugins/desktopchangeosd: make Loader become the root item
This saves another quick item.
2023-09-29 18:37:48 +08:00
David Edmundson
4b1a90b32a Implement axis relative direction
This is useful for the few cases where wheel events are not for
scrolling. For example adjusting the volume in the tray.

In this case having the metadata that the delta is backwards is
important. From a kwin POV it's just proxying the libinput
isNaturalScroll setting to clients.

Tested against "qtbase/examples/widgets/widgets/mousebuttons" with
modified Qt and changing the setting in the UI.

Not mergable until upstream lands.
Relevant link:
https://gitlab.freedesktop.org/whot/wayland/-/merge_requests/1 /
https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/183

CCBUG: 442789
2023-09-29 13:18:30 +03:00
l10n daemon script
eab335f686 GIT_SILENT Sync po/docbooks with svn 2023-09-29 02:13:18 +00:00
Xaver Hugl
ae09600481 platformsupport/scenes/opengl: add a factory function for EglSwapchainSlot
This makes it more obvious that creating slots can fail, and makes it simpler to add
checks for that
2023-09-28 23:27:37 +00:00
Aki Sakurai
0f1da589eb fix segfault in EglGbmBackend::textureForOutput 2023-09-28 23:52:52 +08:00
Xaver Hugl
d33c6b5409 backends/drm: don't crash if the surface is nullptr
CCBUG: 474987
2023-09-28 15:47:45 +02:00
Xaver Hugl
1e6f46eb0c scene/imageitem: don't crash if uploading a texture fails
BUG: 474952
2023-09-28 12:59:53 +02:00
Nicolas Fella
684595dab7 tabbox: Simplify loading switcher from KPackage
Let KPackage to the hard work
2023-09-28 08:15:54 +00:00
l10n daemon script
16aa09cd62 GIT_SILENT Sync po/docbooks with svn 2023-09-28 02:15:58 +00:00
Xaver Hugl
d6bc5d9b14 platformsupport/scenes/opengl: don't crash when importing a texture fails
CCBUG: 474933
2023-09-27 17:31:12 +00:00
Xaver Hugl
88ab958f4d backends/drm: fix surface destruction
With value semantics, the destructor can be called more often than actually
desired, so this commit ports the DrmEglLayerSurface to use unique pointers to
store surface data instead
2023-09-27 17:17:54 +00:00
Xaver Hugl
b266b08145 outputconfigurationstore: don't select generated modes as the default
They're not guaranteed to work, so choosing them as the default mode can
result in a display that doesn't light up or only shows garbage

BUG: 474915
2023-09-27 17:38:25 +02:00
Xaver Hugl
a4dedb64f6 backends/drm: handle multiple OpenGl contexts more correctly
In order to destroy resources from a context on the secondary GPU, that
context needs to be current. We also want to destroy the context once it's
no longer used, if the GPU is unplugged etc, so this commit uses shared
and weak pointers to manage the lifetime of the contexts
2023-09-27 14:42:13 +00:00
ivan tkachenko
ed0974b8cb
kcms/screenedges: Drop unused functions 2023-09-27 16:30:05 +03:00
l10n daemon script
8741d2df05 GIT_SILENT Sync po/docbooks with svn 2023-09-27 02:15:51 +00:00
Xaver Hugl
482a1f0fb5 backends/drm: don't wake displays up when outputs get temporarily removed
When some displays go to sleep, that can be wrongly detected as a temporary
hotunplug by the driver. In order to not wrongly wake up the system with
such a display, detect that scenario and set the 'new' output to dpms off
again.

BUG: 452553
BUG: 379474
2023-09-27 00:02:42 +02:00
Xaver Hugl
99244efa3b backends: move dpms input filter handling to Workspace 2023-09-26 16:39:28 +00:00
Xaver Hugl
66cef35c64 compositor_wayland: ignore placeholder outputs
Placeholder outputs don't have renderloops or output layers. If they're
not ignored, KWin crashes
2023-09-26 17:49:29 +02:00
l10n daemon script
0605054193 GIT_SILENT Sync po/docbooks with svn 2023-09-26 02:26:24 +00:00
Xaver Hugl
4b49ca7751 backends/drm: fix frame scheduling with pageflip timestamps in the future 2023-09-25 13:37:10 +02:00
Niccolò Venerandi
028dd552cf Merge desktop grid and overview together with a new three-state design
Merges the desktop grid and overview effects together in a new three-state one;
you can switch between them with a certain shortcut or gesture, and you can also
still access either the desktop grid or overview directly.

Default shortcuts are also updated to be Meta+G for Grid, Meta+W for Overview,
Meta+Tab to switch between the three states and Meta+Shift+Tab to cycle in the
opposite direction.

BUG: 474044
BUG: 460661
BUG: 460774
BUG: 456572
BUG: 449601
BUG: 450262
BUG: 449801
BUG: 461510
BUG: 463886
BUG: 459754
BUG: 459749
BUG: 459748
BUG: 459467
FIXED-IN: 6.0
2023-09-25 11:14:37 +00:00
Vlad Zahorodnii
1d6ac05a8c autotests: Make testServerSideDecoration test more robust
The test fails sometimes with "Tried to add event to destroyed queue".
It does so because the event queue is not destroyed last. See also
33827bbdbe for more details.
2023-09-25 10:46:32 +03:00
Vlad Zahorodnii
ff9a6cd3fa Port away from KWayland's server-decoration-palette implementation 2023-09-25 06:42:02 +00:00
Vlad Zahorodnii
dc6dba231d Port away from KWayland's server-decoration implementation 2023-09-25 06:42:02 +00:00
l10n daemon script
f24a0a5e17 GIT_SILENT Sync po/docbooks with svn 2023-09-25 02:19:51 +00:00
l10n daemon script
c7df7531cb GIT_SILENT Sync po/docbooks with svn 2023-09-23 02:13:22 +00:00
Vlad Zahorodnii
7c43f56665 Drop scene initialization functions
They are not needed anymore since the scenes are created when workspace
exists.
2023-09-22 14:06:24 +00:00
Vlad Zahorodnii
fc148cb668 Split X11 and Wayland specific compositor initialization code paths
With the current vision for how output backends work, the compositor
should take up more responsibilities. There are a few good reasons: some
things just don't make sense to be in backends, to allow sharing code
across backends easier, etc. On the other hand, we have X11, with its
own ways of doing things which are not always compatible with what we
want to do on Wayland.

The goal of this patch is to start splitting the compositor into
platform specific counterparts, with potentially moving X11 compositing
in kwin_x11. The main benefit of this is that we will be able to
push forward with wayland things more freely. Ideally it would be great
if we could make kwin_x11 have its own low level compositing code paths
that are nicely encapsulated in that executable and don't leak into
libkwin abstractions.

The biggest drawback of this approach is that there is going to be some
code duplication between x11 and wayland compositing code paths. But I
expect it to be the case only for a short term until we start landing
more abstractions in kwin_wayland, e.g. render devices, proper output
layer support, etc.
2023-09-22 14:06:24 +00:00
Vlad Zahorodnii
6029a68433 backends/fakeinput: Implement fake-input v5 2023-09-22 12:48:18 +00:00
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