Commit graph

23254 commits

Author SHA1 Message Date
Arjen Hiemstra
5aa7a48f93 Replace "Show FPS" effect with a QML version
This removes a bunch of custom rendering, replacing it with a simple QML
file that makes use of KQuickCharts for chart rendering. Functionally,
it should be mostly the same except that I removed all configuration
options as I don't see why we have those.
2022-08-17 11:12:39 +00:00
Vlad Zahorodnii
fa5be54a6d Remove Platform::repaint()
It doesn't belong in Platform.
2022-08-17 10:39:46 +00:00
Arjen Hiemstra
7951940761 Don't use release() on a unique_ptr if we don't intend to release ownership
There is nothing indicating that `OffscreenQuickScene::rootItem()`
releases ownership. Additionally, calling it multiple times currently
means we get a nullptr the second time we call it which crashes the
outputlocator effect.
2022-08-17 10:11:01 +00:00
Vlad Zahorodnii
cf5205439c backend/wayland: Fix computing output pixel size in xdg_toplevel.configure handler
Currently, we pass the logical size but setGeometry() expects the size
in device pixels. It fixes "kwin_wayland --scale 2" shrinking on every
configure event.
2022-08-17 09:48:38 +00:00
Vlad Zahorodnii
facef8d301 Remove irrelevant comment 2022-08-17 07:51:44 +00:00
Arjen Hiemstra
6831f25125 Remove the lookingglass effect
It has been broken for a while (at least as long as 5.25) with no
bugreports about it. It also doesn't look all that great from the video.
2022-08-17 07:14:56 +00:00
Volker Krause
28210372a4 Remove unused surface property
This helps with the Qt6 build, as  KWaylandServer::SurfaceInterface is a
QObject subclass used in a property here, while we are only able to
forward declare it here as it comes from a library we don't link against.
And that's no longer supported in Qt6.
2022-08-17 06:30:19 +00:00
Laurent Montel
c22aa8092a Remove no longer needed ifdefs 2022-08-17 07:59:46 +02:00
Vlad Zahorodnii
811084503f Remove test_wayland_outputdevice.cpp
It's unused and tests v1, which has been dropped long time ago.
2022-08-16 17:46:36 +03:00
Vlad Zahorodnii
3381441167 Remove unused "q" field 2022-08-16 14:06:39 +00:00
Vlad Zahorodnii
42743a7826 Merge contents of outputconfiguration_v2_interface.cpp and outputmanagement_v2_interface.cpp
The established pattern is to try to keep the implementation of a
wayland protocol in one file.
2022-08-16 14:06:39 +00:00
Janet Blackquill
506e2d6f9f drm_gpu: don't bother trying to assign a crtc to a connector that isn't connected
BUG: 457002
2022-08-16 13:04:31 +00:00
Vlad Zahorodnii
f2e594358c Remove Platform::supportsOutputChanges()
If the platform does not support configuring outputs, applying a config
must fail. However, almost all output backends support output
configuring except, perhaps, the x11 backend, but that case doesn't
matter.
2022-08-16 12:31:28 +00:00
Xaver Hugl
02f9978489 autotests/pointer_input: add test for moving fullscreen windows 2022-08-16 14:05:20 +02:00
Xaver Hugl
8a154d3af1 fix fullscreen move 2022-08-16 14:05:20 +02:00
Vlad Zahorodnii
42bb455b06 wayland: Remove parent arg in OutputChangeSetV2 constructor 2022-08-16 13:13:40 +03:00
Vlad Zahorodnii
9208fb9926 Remove unused include 2022-08-16 12:18:04 +03:00
Vlad Zahorodnii
da41985051 wayland: Use already_applied error in kde-output-management-v2 2022-08-16 12:18:04 +03:00
Vlad Zahorodnii
5f15f3b47c wayland: Move output-management-v2 implementation in wayland/
Since both output-management-v2 protocol implementation and the rest of
kwin live in the same place and the fact that kde-output-management-v2
is very plasma specific, we can move Platform::requestOutputsChange() to
the implementation of kde-output-management-v2 protocol, it simplifies
the code a bit and improve code encapsulation.

In order to further simplify kde-output-management-v2 protocol, this
change alters the behavior of the protocol so an output configuration
can be applied only once, which is a very reasonable behavior.
2022-08-16 12:18:04 +03:00
Vlad Zahorodnii
a9267bdcdc plugins/qpa: Assume there's current context when swapBuffers() is called
It can happen that the window is resized after makeCurrent() and before
swapBuffers(). In that case, context()->makeCurrent() will re-create the
fbo and qpa will present an uninitialize fbo.

Assume that there's current context when swapBuffers() is called. Other
QPA already do this, for example, QtWayland. This would make the
behavior of our qpa consistent with QtWayland and fix resizing the fbo
in swapBuffers().

In general, kwin should be able to handle size mismatch between the fbo
and QWindow, but as an extra hardening measure, we could forbid resizing
windows during rendering, this can be done later though.
2022-08-16 09:02:04 +00:00
Xaver Hugl
11ad5fea9a effects/slide: apply slide setting for docks to applet panels
Otherwise they detach from panels, which looks weird
2022-08-16 08:20:09 +00:00
Volker Krause
835dc7c818 Explicitly mark DrmObject as non-copyable
It implicitly already is not copyable, due to the unique_ptr member.
However, Qt6 moc code isn't realizing that and fails to compile the
DrmPlane Q_GADGET sub-class of this.
2022-08-15 18:03:46 +02:00
Xaver Hugl
6cdb1e6f64 backends/drm: add stricter checks for direct scanout
Buffers with implicit modifiers from another GPU must not be imported, as
the layouts may not be compatible.
For buffers with incompatible modifiers, direct scanout can also be rejected
early, saving some computational power.

BUG: 457851
2022-08-14 19:53:30 +02:00
Mathieu Jobin
3ac5116487 Update URL to theme-details on develop.kde.org 2022-08-14 12:34:41 +09:00
Xaver Hugl
f4e917f734 backends/drm: release buffers for disabled objects
BUG: 456686
2022-08-12 19:52:24 +00:00
ivan tkachenko
a6cc4b557b
debug console: Sort windows tree model
Now you can see properties like 'minimizable' and 'minimized' literally next
to each other, not on the other end of a view.
2022-08-12 15:16:14 +03:00
Xaver Hugl
ca7a2cdef6 plugins/nightcolor: use FileDescriptor class 2022-08-11 21:27:33 +02:00
Xaver Hugl
9c4f3d447f debug console: use FileDescriptor class 2022-08-11 21:27:33 +02:00
Xaver Hugl
1b1e0ab95f wayland/drmlease: use FileDescriptor class 2022-08-11 21:27:33 +02:00
Xaver Hugl
1464028934 backends/drm: use FileDescriptor class for drm buffer fds 2022-08-11 21:27:33 +02:00
Xaver Hugl
6cd4d69644 dmabuf: make use of FileDescriptor class 2022-08-11 21:27:33 +02:00
Xaver Hugl
cb8be232a1 utils: introduce helper class for file descriptors 2022-08-11 21:27:33 +02:00
Vlad Zahorodnii
ca6f84dad6 Rework how wl_output and kde-output-device are created
Create wl_outputs only for outputs in Workspace.
2022-08-11 17:17:47 +03:00
Vlad Zahorodnii
c7293d95e0 backends/{x11,virtual}: Allocate render data for all available outputs
This makes the behavior of virtual and x11 backend consistent
with the drm and the wayland backend and reduces the number of users of
the Platform::outputEnabled signal.
2022-08-11 12:39:51 +00:00
Mikhail Zolotukhin
f6054863e1
window: expose "output" property
This allows it to be used from QML KWin Script or via property() C++
call.

This is useful to be able to use client area function with pointers
API without falling back to VirtualDesktop X11 ids from scripts.
2022-08-11 14:42:06 +03:00
Vlad Zahorodnii
6982c506a5 wayland: Setup window management when starting to manage X11 window
We don't need to wait until the window is ready for painting in order to
create a plasma window, in fact, quite the opposite is desired. It's
better if the plasma window is created in manage() so the task manager
displays the corresponding item even if the window is not showing up for
whatever reason.
2022-08-11 07:21:12 +00:00
Natalie Clarius
979dddb4f1 Fix wrong center snap zone value
Snap to center was mistakenly using the zone size for snap to window.
2022-08-11 06:37:07 +00:00
Vlad Zahorodnii
4d1c82d111 Make ColorManager use outputs managed by Workspace
This removes one more dependency on Platform::enabledOutputs() and
Workspace knows better about what outputs are managed.
2022-08-10 10:17:30 +00:00
Vlad Zahorodnii
b9c00ba90d Create color manager after workspace 2022-08-10 10:17:30 +00:00
ivan tkachenko
3197c7892f
effects/{private,desktopgrid,overview}: Guard against function execution when component is being destroyed
Accept drop events correctly and use returned value (action) of
Drag.drop() to guard against the situation where the delegate is about
to be destroyed.

This does not fix any bugs per se, except suppressing a warning about
undefined targetScreen being printed to a console on every window dropped
onto a different virtual desktop.
2022-08-10 12:20:27 +03:00
Vlad Zahorodnii
c3f9aab329 plugins/screencast: Allow including cursor in window screencasts
BUG: 452960
2022-08-10 06:38:05 +00:00
Blake Sperling
1a475a73de effects: Improve animation durations and easing curves in Windowheap-based effects
This commit doubles the animation durations for WindowHeap-based effects
(Overview, Present Windows, and Desktop Grid) and uses the OutCubic easing
curve for their opening and closing animations. This makes them feel smoother
and more comfortable.

BUG: 455521
BUG: 448538
FIXED-IN: 5.26
2022-08-09 23:54:44 +00:00
Xaver Hugl
9f41620b77 backends/drm: don't crash if beginFrame fails
CCBUG: 455532
2022-08-09 22:18:58 +02:00
ivan tkachenko
8feaa8922a
effects/{private,desktopgrid,overview}: Clean up QML/JS code and bump imports 2022-08-09 22:02:38 +03:00
ivan tkachenko
f892c9510e
effects/colorpicker: Fix off-by-one error during coordinates conversion
Due to this bug color picker used to not only select one pixel higher
than it should (which is quite negligible), but also returned garbage
value for the topmost row of pixels (when you push the cursor against
the top edge of the screen).

FIXED-IN: 5.24.7, 5.25.5, 5.26
2022-08-09 20:23:26 +03:00
ivan tkachenko
2fa4a4c4e9
effects/colorpicker: Factor out effects->renderTargetRect() constant 2022-08-09 20:23:22 +03:00
Kai Uwe Broulik
90688b11f6 desktopbackgrounditem: Prefer desktop window with size matching output
Conky monitor's floating popup is of type desktop, too, and when it
gets picked over Plasma's desktop window, visual artifacts can be
observed behind e.g. the overview effect.
2022-08-09 15:00:51 +00:00
Vlad Zahorodnii
3934d1d0f2 wayland: Remove surface() check in Window::setupWindowManagement()
At the moment, an Xwayland window can be marked ready for painting even
though the corresponding wl_surface is missing. If that happens,
Window::setupWindowManagement() will fail to create a plasma window and
the task manager won't display the corresponding item.

As a short-term solution, remove the surface() check. It's not really
needed after all. For example, if it takes too long to start an app or
it doesn't show up at all, we still want to see a task manager item.

In long-term, kwin probably needs to take into account both xsync and
whether wl_surface has been associated, which is more complex.

BUG: 444325
2022-08-09 11:26:40 +00:00
Vlad Zahorodnii
e24ee60bb2 autotests: Remove Test::initWaylandWorkspace()
It reduces the amount of boilerplate code and makes startup sequence in
autotests similar to the one in kwin_wayland.
2022-08-09 08:17:18 +00:00
Kai Uwe Broulik
84bde36cc0 Make EGL a REQUIRED dependency
Target kwin links against EGL::EGL unconditionally.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
2022-08-09 07:21:07 +00:00