Commit graph

23130 commits

Author SHA1 Message Date
Xaver Hugl
76fbffb40b screenlockerwatcher: move singleton to Application 2022-08-02 21:37:41 +00:00
Xaver Hugl
497a78b7cf tabbox: move global to Workspace 2022-08-02 21:37:41 +00:00
Xaver Hugl
43b78e40d8 screens: move singleton to Workspace 2022-08-02 21:37:41 +00:00
Xaver Hugl
9439e7719d screenedge: move singleton to Workspace 2022-08-02 21:37:41 +00:00
Xaver Hugl
719147952d rulebook: move singleton to Workspace 2022-08-02 21:37:41 +00:00
Xaver Hugl
0d704b8913 placement: move singleton to Workspace 2022-08-02 21:37:41 +00:00
Xaver Hugl
3c56bd9723 refactor Outline and move its singleton into Workspace 2022-08-02 21:37:41 +00:00
Volker Krause
f8516c1b42 Port remaining QQC1 uses 2022-08-02 18:06:54 +02:00
Marco Martin
027ca22908 When an arrow key is not accepted look for adjacent views
When no qml items manage the arrow key event, the root item will manage it looking to give focus to a view in the given direction derived from the arrow key

BUG:455783
2022-08-02 15:59:26 +00:00
Xaver Hugl
369194ab72 effectshandler: ignore inputmethod on X11
BUG: 457402
2022-08-02 12:15:37 +02:00
l10n daemon script
5513291dbe 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"
2022-08-02 01:45:59 +00:00
l10n daemon script
84e5d92f67 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"
2022-07-31 01:49:29 +00:00
David Edmundson
63bf811200 Update QtQuick views at the start of the frame
Right now we update QtQuick views after a composition has rendered so
that we'll have them ready for our next frame.

One of my machines (With X11 + nvidia) was quite stuttery, profiling
shows we spend a huge amount of time with the CPU blocked waiting for
the vblank from the previous main compositing to finish swapping before
we could start processing the QtQuick rendering. Time when the CPU is
blocked is wasted time.

This patch does mean kwin's compositing cycle lasts longer but a recent
patch changes the rendering policy when we start a fullscreen effect anyway so
hopefully that should still give us enough time to render that first frame in time.
2022-07-29 15:27:40 +00:00
Aleix Pol
4384f9c5fd xkb: Use Ctrl+Mrys+Zenkaku_Hankaku to toggle the touchpad 2022-07-29 14:50:00 +00:00
Aleix Pol
aee8f5d648 xkb: Add a workaround to support Zenkaku_Hankaku keycode
It's not working otherwise and some hardware uses it for toggling the
touchpad.
2022-07-29 14:50:00 +00:00
Vlad Zahorodnii
c3d5c3db1d x11: Add a helper to get the default screen
Since the screen number is well-known, we can look up the default
screen on demand. Note that xcb_get_setup() is pretty cheap as it
simply returns a const pointer to pre-allocated data.
2022-07-29 14:15:12 +00:00
Aleix Pol
94ee33e9be wayland: Fix touch event delivery to subsurfaces
Use SurfaceInterface::inputSurfaceAt when deciding which surface are we
entering when sending a pointer event from a touch, in case it falls
onto a subsurface.

BUG: 452967
2022-07-29 11:39:12 +00:00
Aleix Pol
c73444dd12 wayland: Do not allocate a full list just to check if there's values 2022-07-29 11:39:12 +00:00
Vlad Zahorodnii
40044f21e1 effects: Honor transforms in OffscreenEffect
This ensures that transforms are honored with effects such as wobbly
windows.
2022-07-29 11:08:59 +00:00
Arjen Hiemstra
15fbddc3d6 Register KWin::SessionState with QMetaType
Otherwise it cannot be used in scripts - like the sessionquit effect
which uses it to check if we're actually shutting down.
2022-07-29 09:52:16 +00:00
Arjen Hiemstra
bb91c94855 Expose Workspace::showingDesktop and a setter as D-Bus api
This allows us to unify the X and Wayland codepaths that currently go
through window-system specific IPC. It also allows us to easily track
who called "setShowingDesktop" and cancel the effect when that client
disappears.

CCBUG: 449445
2022-07-29 09:52:16 +00:00
Nicolas Fella
e0a6d02984 [x11] Fix loading monitor edid
i is the counter for the crtc loop, not the monitor loop

This fixes loading the edid for all monitors and thus the output identifier effect
2022-07-29 01:41:06 +02:00
ivan tkachenko
54e74df57b
effects/private: Actually fade out minimized windows on exit
This is most likely just an oversight/omission from the times when the
component was actively developed. There are five states total, including
one for realtime interactions; four others need to be transitioned to.
2022-07-28 18:31:38 +03:00
ivan tkachenko
2bca18bc5f
effects/overview: Fix animation of windows scaling back from a desktop bar
Due to nondeterministic nature of signal propagation in QML, changing
both targetScale and state depending on dragHandler's activity could
result in targetScale wrongly updating before the state change(and thus
applied property changes and subsequent animated transition).

This fixes a bug when a window dragged to the top (but not onto another
desktop) would animate its position back to its original position on a
heap, but the scale would remain constant until the end of animation
and only then rapidly jump back to a normally scaled state.
2022-07-28 18:31:36 +03:00
Kai Uwe Broulik
4c6010b078 scenes/opengl: Check whether pixmap is valid before generating quads
Quad generation needs a valid surface pixmap. This did not surface
before as the pixmap was only accessed when looping the region which
typically was empty without a pixmap.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
2022-07-28 14:15:44 +00:00
Kai Uwe Broulik
1e3a81249c SurfaceItem: Use pixmap() for quad generation
This uses the previous pixmap if the current one is invalid,
which ensures the generated quads have sane coordinates.

The issue caused flickering while resizing Chrome after
2f4fa23e61

While at it, move `size` out of the loop as it doesn't change.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
2022-07-28 14:15:44 +00:00
David Edmundson
259f4d7838 Drop superfluous toPoint calls in input 2022-07-28 11:55:43 +00:00
David Edmundson
89be63f600 Port windowStepUserMovedResized to floating geometry 2022-07-28 11:55:43 +00:00
David Edmundson
97fe0613e6 Support QRectF in debug console 2022-07-28 11:55:43 +00:00
Vlad Zahorodnii
9177fd1835 kwineffects: Make clientArea() return a QRectF
Make EffectsHandler::clientArea() return same type as
Workspace::clientArea().
2022-07-28 10:58:59 +00:00
Xaver Hugl
34344c8dc4 input: don't forward gestures used by KWin to applications
If both compositor and applications were to use these gestures at the same
time, that would be quite confusing for the user. This also works around
a bug in Wine that makes applications crash.

BUG: 455952
2022-07-28 10:01:48 +00:00
Vlad Zahorodnii
e604b6852f backends/drm: Remove Compositor dependency
This breaks cyclic dependency between Compositor and DRM backend, there
are still indirect dependencies though. However, fewer cyclic
dependencies should make the architecture more cleaner and easier to
tweak.
2022-07-28 08:56:47 +00:00
ivan tkachenko
51326dfb85
effects/private: Group Repeater's alias properties together 2022-07-28 11:02:37 +03:00
ivan tkachenko
766d64c1e5
effects/private: Port potential misuse of a dragHandler to activeDragHandler
There are two drag handlers, and an `activeDragHandler` property to
switch between them. That's what other code is doing in this component.
2022-07-28 11:02:36 +03:00
ivan tkachenko
1c1cf61b1f
effects/private: Drop unused property dragHandler 2022-07-28 11:02:36 +03:00
ivan tkachenko
aa6200495c
effects/private: Make WindowHeapDelegate dragHandler less confusing
There were too much `dragHandler` identifiers per square meter of code.
2022-07-28 11:02:36 +03:00
ivan tkachenko
f48b306665
effects/private: Set required property for default WindowHeapDelegate
Otherwise this WindowHeap type is not usable without custom delegate.

    /usr/lib/qml/org/kde/kwin/private/effects/WindowHeap.qml:111:23:
        QML Component: Cannot create delegate
    /usr/lib/qml/org/kde/kwin/private/effects/WindowHeapDelegate.qml:21:5:
        Required property windowHeap was not initialized
2022-07-28 11:02:36 +03:00
ivan tkachenko
da3b731c1a
effects/overview: Clean up QML/JavaScript code 2022-07-28 11:02:35 +03:00
ivan tkachenko
94168cd7c1
effects/private: Drop unused properties 2022-07-28 11:02:34 +03:00
ivan tkachenko
12b72d614e
effects/private: Port ExpoLayout to using anchors 2022-07-28 10:45:43 +03:00
ivan tkachenko
22156777fb
effects/desktopgrid: Add explicit spacing for buttons layout 2022-07-28 10:45:41 +03:00
Aleix Pol
dcb1836c6e wayland/autotests: Make sure TestWaylandSurface deletes the surfaces it uses 2022-07-28 07:23:56 +00:00
Aleix Pol
a94f5c0d7f wayland/autotests: Make sure SeatInterface gets deleted 2022-07-28 07:23:56 +00:00
Aleix Pol
4af69643e1 wayland/autotests: Make sure we delete the seat
The parent is the second argument, it therefore was nullptr and it broke
the assumption from few lines below that it's owned by the display.
2022-07-28 07:23:56 +00:00
Aleix Pol
bbb4c20c8a libinput: Make sure config values get deleted
Switches to a shared pointer rather than a raw one. It would leak, which
in general is not a big problem but it would flood the output when
running tests with ASAN. Also it's the right thing to do.
2022-07-28 07:23:56 +00:00
Vlad Zahorodnii
a513b795ad backends/wayland: Fix a crash on shutdown
The wayland backend changes the dpms mode when the enabled state of the
output changes. This creates problems when destroying all outputs on
shut down. The wayland backend calls InputRedirection's methods, but
InputRedirection is already destroyed by that time.

While the crash can be fixed by guarding input() in createDpmsFilter()
with an if statement, changing dpms mode in updateEnablement() doesn't
seem like a good idea because Output changes unrelated states (enabled !=
dpms mode), so let's get rid of it.
2022-07-28 07:02:16 +00:00
ivan tkachenko
3da3489aaa
effects/private: Don't show another window's hover/highlight while dragging
This produced really weird impression that if you will drop a window it
will be actually dropped on another window??
2022-07-27 20:15:50 +03:00
ivan tkachenko
54917f038e
effects/private: Raise currently dragged window higher than anything
BUG: 456936
FIXED-IN: 5.25.4 5.26
2022-07-27 18:08:00 +03:00
ivan tkachenko
074fed313b
effects/desktopgrid: Fix dragging and swapping desktops on a grid
Amends 00ba4aedcc.
2022-07-27 16:34:39 +03:00
ivan tkachenko
f1a45b6509
effects/private: Drop opacity binding inside WindowHeapDelegate
This targetOpacity is nowhere to be found. This is a relic of past
development. Currently code that needs to alter opacity based on drag
state does so externally by setting opacity on a delegate as a whole.
2022-07-27 15:24:50 +03:00