1502 Commits (d9f5d432bede5d87293104ba12ab437bf7c888e2)

Author SHA1 Message Date
Vlad Zahorodnii d9f5d432be Port to KF6 2 years ago
Vlad Zahorodnii 3809a2712b tabbox: Remove unused arg in DesktopChainManager::addDesktop() 2 years ago
Vlad Zahorodnii d79a4a1daa Make VirtualDesktopManager::currentChanged pass VirtualDesktop
It fixes the remaining usage of int desktop ids in Workspace, ignoring
Workspace::setInitialDesktop().
2 years ago
Vlad Zahorodnii ad330924e2 Rename Window::desktopChanged()
We have Window::desktops(), so rename the signal to match it.
2 years ago
Vlad Zahorodnii 282e2dfbde Ensure that the current virtual desktop cannot be null
VirtualDesktopManager::currentChanged() can be emitted with
previousDesktop being null/0. It can happen only on startup. After that,
it's always valid. In order to make the code that uses the
currentChanged signal less trickier, ensure that the current virtual
desktop is initialized when the virtual desktop config is loaded.
2 years ago
Vlad Zahorodnii 03e098204f Port Workspace::sendWindowToDesktop to VirtualDesktop 2 years ago
Vlad Zahorodnii 0dec5e3f20 Merge Window::client{Minimized,Unminimized} with Window::minimizedChanged
This merges Window::clientMinimized() and Window::clientUnminimized()
signals with the Window::minimizedChanged() signal to simplify some
code.

The avoid animation flag has been dropped because its main usage is to
avoid playing animation during window initialization. But it's not possible
to trigger minimize animation at that moment. API-wise it's better to avoid
having such flags too and rely on surface role to decide whether to play a
given animation.
2 years ago
Vlad Zahorodnii b53621136d Drop Window::desktopPresenceChanged()
This signal exists as a convenience helper, but it's not always emitted
as it's advertised to work. Instead of fixing it, let's drop the signal
to simplify virtual desktop code. Its effects can be accomplished by
monitoring Window::desktopChanged() and VirtualDesktopManager::currentChanged()
signals in effects and scripts where needed.
2 years ago
Vlad Zahorodnii a2062090eb Rename interactive move resize lifecycle signals
Add the "interactive" word to be consistent and put "started",
"stepped", and "finished" at the end of signal names where they are more
expected.
2 years ago
Vlad Zahorodnii 8bb2d52972 Rename Window::clientMaximizeStateChanged signal
Make it shorter to be more readable.
2 years ago
Vlad Zahorodnii 88c974835c Drop duplicate clientMaximizedStateChanged signal 2 years ago
Xaver Hugl 520fa3042a pointer input: always confine pointer to screens
Checking if the pointer needs to be confined before doing `std::clamp` on
the position is useless and causes problems. With this change, the pointer
will always be confined to exactly the screen, without any fractional offsets.

BUG: 461911
2 years ago
Vlad Zahorodnii e0062f675d Port away from QRectF::contains()
QRectF::contains() considers right and bottom edges inside the
rectangle, but the relevant code has the opposite expectations.
2 years ago
Xaver Hugl 4cd25cf571 cursor: make position, hotspot and size floating point
This allows all pixel positions to be used on high dpi screens,
and corrects damage tracking with Xwayland cursors

CCBUG: 466094
2 years ago
Vlad Zahorodnii 70a063a34c scripting: Rename ScreenEdgeItem to ScreenEdgeHandler
ScreenEdgeItem is not an item, so rename it to something else. "Handler"
is inspired by QtQuick, e.g. TapHandler.
2 years ago
Vlad Zahorodnii 72b7bda18e scripting: Drop Window.geometry property 2 years ago
Tomasz Paweł Gajc 88cf83554f add support for Lima, V3D, VC4 (based on https://github.com/OpenMandrivaAssociation/kwin/blob/master/kwin-5.21.4-add-support-for-panfrost-driver.patch made by Bernhard Rosenkraenzer) and update list of supported devices for Panfrost 2 years ago
Vlad Zahorodnii f71ee59a37 Port away from Cursor::setPos()
Use input device specific apis to change the position of the cursor. The
main reason to do so is to break the assumption that Cursor position is
the same as pointer position, which I would like to rely on later to
merge tablet and pointer cursors.
2 years ago
David Redondo cc4d99aea4 Fix button to Qt::MouseButton mapping
Even though the names seem to match, QtWayland maps button values
to enum values in ascendung order (as it does on X11). The wrong
mapping is usually not a problem because we send the native button
events to clients. However when the Qt names or values are used
for communication between KWin and a client this leads to
misunderstandings.
BUG:465463
FIXED-IN:5.27.1
2 years ago
Vlad Zahorodnii 20487c7cda effects: Drop legacy EffectsHandler::desktopChanged overloads 2 years ago
David Edmundson 2ca4627207 Autotests: Dont warp cursor before X is available kwin side 2 years ago
David Edmundson 466f2fe8ba Launch xwayland on demand
This installs a socket notifier onto our xwayland socket, when a user
connects we launch xwayland. The client then connections once kwin has
established itself as the compositor.

For a full desktop plasma session this patch effectively does nothing
too useful as we still start kcminit and make xrdb calls on startup
which in turn will launch X, but for the same reason this patch should
be harmless now as we're still processing the xrdb calls before any
clients will connect.
2 years ago
David Edmundson 29b456ff25 Autotests: Use a helper method to create X11 connection 2 years ago
Vlad Zahorodnii 271de0ccc6 scripts: Port some scripts to org.kde.kwin v3 qml api 2 years ago
Xaver Hugl 1746af4b02 gesture: use the global direction enums 2 years ago
Xaver Hugl a9334cb9c6 unify touchpad gesture APIs
There don't need to be separate functions for real time and not real time
2 years ago
Vlad Zahorodnii e5901070cc Drop support for _KDE_NET_WM_TEMPORARY_RULES
It's an obscure feature, which perhaps not worth putting an effort to
make it work on wayland and x11.
2 years ago
Xaver Hugl 58fdbbc444 autotests/integration: test restoration of window states on moveresize cancel 2 years ago
Xaver Hugl 3d1101d5ff autotests/integration: fix decoration input test 2 years ago
Aleix Pol a5aaa9e3c4 org.kde.KWin: Expose a window's UUID
Exposes a Window's UUID so that it can be used with other APIs like
window management or screencasting.
2 years ago
Vlad Zahorodnii 9b0758ea71 autotests: Remove weird qwait in pointer input test 2 years ago
Vlad Zahorodnii 7a8bb01323 autotests: Make testStruts quicker
As far as I can tell, there's no reason to add an artificial delay of
50ms, which repeated 100 times accumulates to 5 seconds.
2 years ago
Vlad Zahorodnii 1c3610413d autotests: Make testPlasmaWindow quicker
Before

    Executed in   10.79 secs    fish           external
       usr time    4.85 secs  918.00 micros    4.85 secs
       sys time    0.62 secs  119.00 micros    0.62 secs

After

    Executed in    1.45 secs      fish           external
       usr time  941.63 millis  486.00 micros  941.14 millis
       sys time  578.99 millis   62.00 micros  578.93 millis
2 years ago
Vlad Zahorodnii 9751aca548 autotests: Make testNoGlobalShortcuts quicker 2 years ago
Vlad Zahorodnii f04ad754ce autotests: Make testX11Window quicker
Before

    Executed in   17.39 secs      fish           external
       usr time  422.91 millis    1.92 millis  420.99 millis
       sys time  586.41 millis    0.22 millis  586.19 millis

After

    Executed in    1.23 secs      fish           external
       usr time  395.63 millis    0.00 millis  395.63 millis
       sys time  228.55 millis    2.13 millis  226.42 millis
2 years ago
Vlad Zahorodnii e689ab5ebd autotests: Make testSlidingPopups quicker
The test waits longer than needed to determine whether effects stopped
playing animations

Before

    Executed in   22.41 secs      fish           external
       usr time  997.42 millis  722.00 micros  996.70 millis
       sys time  744.81 millis   79.00 micros  744.73 millis

After

    Executed in    9.71 secs      fish           external
       usr time  894.42 millis    1.03 millis  893.38 millis
       sys time  689.80 millis    0.11 millis  689.69 millis
2 years ago
Vlad Zahorodnii 773d8c61b1 autotests: Reduce execution time of testLockScreen
testLockScreen uses !eventSpy.wait() expression to check whether the
given signal is emitted. QSignalSpy::wait()'s default timeout is 5s,
which is too much. We don't need to wait that much, in fact, even
wl_display_sync() would suffice. In either case, let's pass explicit
timeout of 10ms which should be good enough.

Before

    Executed in   60.49 secs    fish           external
       usr time    3.92 secs    1.03 millis    3.92 secs
       sys time    2.29 secs    0.16 millis    2.29 secs

After

    Executed in   19.38 secs    fish           external
       usr time    1.64 secs  347.00 micros    1.64 secs
       sys time    1.15 secs   54.00 micros    1.15 secs
2 years ago
Xaver Hugl 00c0f29f8e autotests/drm: add test that verifies extending output lifetimes works 2 years ago
Xaver Hugl f6b6d3051b use std::chrono::microseconds for time in input events 2 years ago
Vlad Zahorodnii 6c71bfd800 scene: Rename Scene to WorkspaceScene
Currently, the Scene class is used to represent the contents of the
Workspace so rename it to match its usage.
2 years ago
Vlad Zahorodnii f7a8635b10 Move scene related bits into src/scene/ directory
We've got quite a few scene related files, move them in a directory to
group related code together.
2 years ago
David Edmundson c4b134da8d Implement wp-fractional-scale-v1
This allows clients to provide buffers at native resolutions when
fractional scaling is used.

Virtual backend is adjusted to support scales as floats
2 years ago
Natalie Clarius 0053c782a1 quick tiling: find target output by direction 2 years ago
Natalie Clarius b6412454c2 placement: remove cascaded placement policy
becomes redundant with cascade-if-covering for zero-cornered placement
2 years ago
Marco Martin e4507861f7 Custom quick tiling with configuration ui
* Allow to do quick tiling to custom tile geometries, windows will be snapped to tiles when dragged with the shift modifier pressed.
* Tile geometries are screen specific.
* The global shortcut Meta+T will trigger a fullscreen configuration ui as a QML effect for the tiles which allows to add, remove and resize tiles
* UI and behavior is a bit similar to the Windows Fancy Zones addon: https://docs.microsoft.com/en-us/windows/powertoys/fancyzones
* Its main scope is to help the workflow with very big monitors, especially ultra wide ones, where most application don't make sense maximized to the full screen (eventually also support games to be full screened to a given tile instead of the whole screen)
* it should get also some bindings for scripting, as its ain goal is not to replicate other popular tiling window managers, but should give the popular kwin tiling scripts to have a more robust infrastructure
* it will eventually get support for a set of predefined layouts, but this is for a second phase

BUG: 438788
2 years ago
Xaver Hugl a054093580 qAbs -> std::abs 2 years ago
Xaver Hugl 681368d4cc VirtualDesktopManager: clean up API a bit
Using templates brings nothing except complexity here
2 years ago
Vlad Zahorodnii 64a6a70b3e autotests: Use fewer Window::clientPos() 2 years ago
Vlad Zahorodnii 12acd9bb78 autotests: Port away from OutputBackend::setInitialWindowSize() 2 years ago
Xaver Hugl 34aa734c7b plugins: use more std::unique_ptr 2 years ago