Commit graph

24792 commits

Author SHA1 Message Date
Vlad Zahorodnii
1e0141851e backends/wayland: Remove KWayland::Client::Buffer leftovers 2023-05-02 13:14:30 +00:00
Vlad Zahorodnii
ce2b4c0bee {core,backends/wayland}: Refactor shm buffer allocator 2023-05-02 13:14:30 +00:00
l10n daemon script
2288f39469 GIT_SILENT Sync po/docbooks with svn 2023-05-01 02:57:57 +00:00
Vlad Zahorodnii
0d2e361eca wayland: Drop ClientBuffer
The ClientBuffer type is empty now, most of the things have been
upstreamed to the GraphicsBuffer type. So let's drop it to simplify the
type hierarchy.
2023-04-30 15:39:31 +03:00
Vlad Zahorodnii
82c6538ee4 wayland: Refactor ClientBuffer
ClientBufferIntegration was introduced to work around the fact that some
client buffers are not created by us.

In addition to that, DisplayPrivate::registerClientBuffer() was
introduced to register client buffers created by us.

This change get rids of the ClientBufferIntegration type and further
simplifies the ClientBuffer type to make wayland-specific client buffer
code less messier.
2023-04-30 15:39:10 +03:00
l10n daemon script
043bf8deef GIT_SILENT Sync po/docbooks with svn 2023-04-30 03:59:14 +00:00
l10n daemon script
2e72d81c62 GIT_SILENT Sync po/docbooks with svn 2023-04-29 02:41:55 +00:00
Vlad Zahorodnii
f410819fff Remove "Default implementation ..." comments
These methods are not virtual anymore.
2023-04-28 14:51:01 +00:00
Vlad Zahorodnii
7b6eca612e Stop quick tile combine timer when activating a window
The quick tile test waits 1s to ensure that the quick tile combine timer
is not active. On the other hand, if the active window changes, it makes
sense to reset quick tile combine status. That also lets us get rid of
the QTest::qWait() in QuickTilingTest::testShortcut().
2023-04-28 14:30:49 +00:00
Aleix Pol
660ad887ee screencast: Disable screencasting when a window closes
There were still some cases where we might have queried the window,
leading to a crash.

BUG: 469055
2023-04-28 14:03:15 +00:00
Aleix Pol
cf8b2195bb screencast: Do not push frames when not in a streaming state
It seems to cause issues and there's no good reason to do that
2023-04-28 14:03:15 +00:00
Alexander Volkov
64ce247104 Use non-rotated physical size of an output when required
1. In wl_output and kde_output_device_v2 protocols.
This should fix dpi calculation in
KScreen::Generator::bestScaleForOutput() when panel_orientation
is set to rotate a screen by 90 or 270 degrees.

2. When comparing with physical size of libinput device.

3. In calculations with mode sizes which are not rotated.

This change makes Output::physicalSize() return the raw
physical size, which is used in most of cases. It should
be rotated manually if needed.
2023-04-28 13:41:00 +00:00
Vlad Zahorodnii
8bfb0b1ff7 ENABLE_GLX -> HAVE_GLX 2023-04-28 15:14:14 +03:00
Vlad Zahorodnii
a293c39105 Merge contents of effects/, scripts/ and plugins/
It's confusing to have three directories that refer to extensions. To
clear things up, let's move them in the same directory.
2023-04-28 10:46:22 +00:00
Vlad Zahorodnii
bbc7caaae7 scripts: Encapsulate cmake code 2023-04-28 10:46:22 +00:00
Vlad Zahorodnii
f4af66d167 scene: Don't touch texture sampling params in ItemRendererOpenGL
Items must be responsible for choosing texture sampling parameters.
Doing so in the ItemRendererOpenGL breaks the encapsulation.
2023-04-28 10:28:46 +00:00
Liu Jie
9241252c67 update keyboard focus when grabbing popup closed
For example, a wayland qt widget has an qlineedit with qcompleter.
    1. Input some words make qcompleter's popup window show. PopupInputFilter::keyEvent will set keyboard focus on the qcompleter's popup window.
    2. Continue to press a key which can make the qcompleter's popup window hidden and do not release it.
    3. Press the backspace key to make the qcompleter's popup window show again.
Result:
    Qcompleter's popup window will be created as an independent xdg_toplevel.This is because QT sets the surface of the focused window as the transient parent window of the popup window. If not found, QT will create a independent toplevel window.
After step 2, the focused window is the qcompleter's popup window which has be hidden. QT can not find the transient parent of the qcompleter's popup window, finally creat the popup window as a independent xdg_toplevel.

Signed-off-by: Liu Jie <liujie01@kylinos.cn>
2023-04-28 06:20:20 +00:00
l10n daemon script
d2aee0a1a2 GIT_SILENT Sync po/docbooks with svn 2023-04-28 02:27:47 +00:00
Xaver Hugl
4575234859 backends/drm: remove timer for updating outputs
It's not necessary anymore, as outputs will be updated once the GPU is active again
2023-04-27 19:49:02 +00:00
Xaver Hugl
46c8ca34b9 backends/drm: don't update outputs while the session isn't active
BUG: 468715
2023-04-27 19:49:02 +00:00
Xaver Hugl
8c412c229b backends/drm: track device active status per GPU 2023-04-27 19:49:02 +00:00
Andreas Cord-Landwehr
258e9d8426 Extend GLX switch to check if QtGui was being built with GLX plugin
Even though epoxy with GLX may be present, Qt's native interface only
exposes GLX API when it was being built with GLX support.
2023-04-27 18:29:51 +00:00
ivan tkachenko
d80120fe7e
effects/overview: Use standard naming for the main QML source
Makes it easier to navigate project, especially when filtering through
all files by partial name.
2023-04-27 15:53:53 +05:00
Mike Noe
38ad317f27 kcms: Port away from Kirigami.Action.iconName 2023-04-27 06:51:28 +00:00
l10n daemon script
182fcb1791 GIT_SILENT Sync po/docbooks with svn 2023-04-27 02:32:10 +00:00
Vlad Zahorodnii
00d404335e ci: Pass --repeat until-pass to ctest
Pass --repeat until-pass to make CI more robust to tests that randomly
fail.
2023-04-26 15:50:47 +03:00
l10n daemon script
34b651e526 GIT_SILENT Sync po/docbooks with svn 2023-04-26 02:34:56 +00:00
Vlad Zahorodnii
c2c229fb05 effects/screenshot: Fix potentially leaking screenshot fds to child processes
dup() doesn't copy flags such as FD_CLOEXEC.
2023-04-25 06:53:10 +00:00
Vlad Zahorodnii
60dc812b21 utils: Fix FileDescriptor duplicates potentially leaking to child processes
dup() doesn't duplicate flags such as FD_CLOEXEC.
2023-04-25 06:07:22 +00:00
l10n daemon script
8b4a0c35cc GIT_SILENT Sync po/docbooks with svn 2023-04-25 02:47:34 +00:00
Vlad Zahorodnii
5fb5f1c92b autotests: Stabilize testWaylandSeat
TestWaylandSeat::sync() ensures that events and requests can't be
reordered after it. That is, it guarantees that

- events sent from the compositor will be processed by the client
  before sync() finishes
- requests issued by the client will be processed by the compositor
  before sync() finishes

WaylandSyncPoint relies on the fact that wl_display_sync()'s callback
and other wayland events will be processed in the same event queue.

But, it's not the case right now. The wl_callback belongs to the default
event queue and KWayland::Client::Seat belongs to a different queue.

If the default event queue is dispatched first, the WaylandSyncPoint may
emit the done signal too early.

In order to fix sync(), this change ensures that WaylandSyncPoint's
wl_callback uses the correct event queue.
2023-04-24 11:40:24 +00:00
Nicolas Fella
2f1744b67b Disable quitLock
Otherwise a KJob finishing terminates the app
2023-04-24 10:49:15 +00:00
Vlad Zahorodnii
5a42d0ac0e autotests: Drop testDontCrashNoBorder
The test used to verify that kwin doesn't crash when ShellClient sets
new geometry. ShellClient used to access decoration borders without
checking whether decoration() is null.

On the other hand, we've added a bunch of new test cases in
testXdgShellWindow, so let's remove this one. If the bug is back, that
test will fail.
2023-04-24 10:13:58 +00:00
Vlad Zahorodnii
e9feaefa4b Handling failing to export GEM handle to prime fd
If gbm_bo_get_fd_for_plane() or gbm_bo_get_fd() fails, ensure that the
gbm buffer allocator properly handles it and doesn't return a
GraphicsBuffer object.
2023-04-24 11:08:04 +03:00
l10n daemon script
f4b20c00a5 GIT_SILENT Sync po/docbooks with svn 2023-04-24 03:00:58 +00:00
Vlad Zahorodnii
a89573224c Drop Qt6WaylandClientMacros.cmake fork 2023-04-23 18:18:34 +00:00
Xaver Hugl
e7c803b7e5 backends/drm: store drm properties directly in drm objects
This makes it possible to ensure type safety for enums, as each drm property
object can have its own type now, and it reduces the amount of typing needed
to access properties
2023-04-23 14:09:29 +02:00
Xaver Hugl
adc5104e2a autotests/drm: disable tests to work around FreeBSD CI issues
The tests don't do anything platform specific, so test only on Linux
until the cause of the problems is found
2023-04-23 14:09:29 +02:00
Xaver Hugl
2c86866876 backends/drm: drop some unused logging
We're using drm_info to get property values from users. If property logging
in KWin is needed, it will be different from what we had until now
2023-04-23 14:09:29 +02:00
Nicolas Fella
8a0a91fea1 Port to standalone kglobalacceld 2023-04-23 10:06:28 +02:00
l10n daemon script
6a54f76dc4 GIT_SILENT Sync po/docbooks with svn 2023-04-23 03:55:52 +00:00
Vlad Zahorodnii
111e98d24a autotests: Remove render node check in testPointerInput
The test doesn't require OpenGL anymore.
2023-04-22 20:28:59 +03:00
Vlad Zahorodnii
e3bc9e8ac6 autotests: Allow running lockscreen test with software rendering
The test needs OpenGL in order to ensure that the window view effect is
loaded and it registers a screen edge. On the other hand, we could
register a screen edge ourselves and thus allow running the test on
freebsd.
2023-04-22 16:45:40 +00:00
Vlad Zahorodnii
35efeddb48 wayland: Fix sending org_kde_plasma_virtual_desktop.removed
If a virtual desktop is removed, the client will receive two removed
events.
2023-04-22 15:45:25 +00:00
Vlad Zahorodnii
ac74de22c7 autotests: Fix testPlasmaVirtualDesktop
The test fails because it incorrectly handles the server-side and the
client-side virtual desktops being removed within one event loop cycle.

In order to fix the test, this change makes the removal of server-side
virtual desktop object take effect immediately.
2023-04-22 15:45:25 +00:00
Vlad Zahorodnii
959bb661af autotests: Drop testBufferSizeChange
testXdgShellWindow already tests intricate subsurface size changes. The
surface pixmaps are handled differently now too, so the test is not
useful as it used to be 4 or 5 years ago.
2023-04-22 15:03:19 +00:00
Vlad Zahorodnii
c54a324e99 autotests: Make PointerInputTest::testUnfocusedModifiers() less flaky
While 50ms is enough on dev machines, CI runners can be more loaded and
some events can arrive after more time.
2023-04-22 15:01:20 +00:00
Vlad Zahorodnii
e0da725533 autotests: Fix Test::waitForWindowDestroyed
Before Deleted merge, it used to be equivalent to waiting until the
window is closed.

This fixes tests waiting until the window closing animation completes
and the Window object is destroyed.
2023-04-22 13:55:29 +00:00
Vlad Zahorodnii
9852748a84 autotests: Use software rendering in testPointerInput
testPointerInput requires OpenGL compositing because it wants to test
cursor push back in the window view effect and the window view effect is
available only if OpenGL is supported.

On the other hand, ScreenEdgesTest::testPushBack() already tests similar
scenario, so let's drop relevant test in testPointerInput to allow
running it when using software rendering.
2023-04-22 13:10:11 +00:00
Vlad Zahorodnii
c693450976 backends/virtual: Port to gbm
The virtual backend uses the surfaceless platform. On the other hand, we
move in a direction where the graphics buffer type is explicit, which
creates issues for the virtual backend.

This change ports the virtual backend to gbm so we could manually
allocate dmabuf buffers in order to unify buffer handling in kwin.

Its main drawback is that you won't be able to use the virtual backend
on setups without render nodes. On the other hand, given that the
compositor is meaningless without clients being able to share buffers
with it, it's reasonable to require some way to create and export prime
buffers.
2023-04-22 15:09:59 +03:00