Commit graph

22953 commits

Author SHA1 Message Date
David Edmundson
2854d59da4 Avoid rounding on X11 configure events
As per the comment this is in kwin logical space not X11 space,
therefore results should be floating.
2022-08-09 06:59:13 +00:00
Vlad Zahorodnii
c214801a23 wayland: Simplify geometry setup code in InternalWindow
This weird setup code was needed to work around buggy geometry code a
while ago.

It fixes the debug console getting offscreen.
2022-08-08 16:43:53 +03:00
Volker Krause
b01b13353b Remove QDesktopWidget use in WorkspaceWrapper for Qt6
This is basically a continuation of 73973641.
2022-08-08 10:03:38 +00:00
Xaver Hugl
039dd96f8d xwaylandinterface: move global to Application 2022-08-08 09:16:22 +00:00
Xaver Hugl
53815e2b28 databridge: move global to Xwayland 2022-08-08 09:16:22 +00:00
Xaver Hugl
fde7d44941 tabletmodemanager: move global to Application 2022-08-08 09:16:22 +00:00
David Edmundson
49d80162c5 [effects/blend] Fix opacity value of old window
We animated from 1.0 to 0.0, however this does not take into account
that a previous effect may also have adjusted the opacity.

We should multiply accordingly.
2022-08-08 08:36:27 +00:00
David Edmundson
3b26936019 Ammend documentation for prePaintScreen wrt openGL context 2022-08-08 06:45:44 +00:00
l10n daemon script
fbec3a1f80 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-07 01:49:26 +00:00
Nicolas Fella
ed829eb5ad Remove unused includes 2022-08-06 19:51:13 +02:00
Xaver Hugl
41c23fa70e effects/windowview: always set the mode when activating with gestures
Otherwise the mode uses is defined by the last time the effect was used and
thus not very predictable
2022-08-06 16:01:56 +00:00
Nicolas Fella
7744a941ce Fix warning about lambda capture
C++20 doesn't like capturing 'this' via '='
2022-08-06 15:12:35 +00:00
Volker Krause
86abf8dbc3 Use a non-deprecated enum value for "no key" 2022-08-06 07:21:41 +00:00
Nicolas Fella
9a34ebbffc [x11] Refactor output updates
The current code has multiple index-based for loops iterating over items we get from XCB

Dealing with raw indices is error-prone and not pretty

By using std::span we can replace these loops with range-based for loops

Also remove some intermediate containers that aren't neccesary
2022-08-06 02:26:39 +00:00
Arjen Hiemstra
77af052f9d WindowView: Add "show windows from class on current desktop" mode
We currently have "windows from current desktop" and "windows from
class" but not one combining both. This adds that mode along with a
(default empty) shortcut and border activation.

BUG: 413342
2022-08-05 13:52:12 +00:00
Xaver Hugl
02f55e0e40 wayland: print warning about automatic backend selection
BUG: 457491
2022-08-05 00:58:37 +00:00
ivan tkachenko
aaa5e6fee3
effects/private: Fix ExpoLayout reflowing in Desktop Grid while dragging
This fixes makes ExpoLayout independent of its position on a screen,
which in turn stops it from randomly reflowing while dragging a virtual
desktop across desktop grid. It also removes an unwanted animation at
the end of activation of desktop grid: desktops move in place and then
windows proceed to adjust themselves resulting in a double animation.

FIXED-IN: 5.25.5 5.26
2022-08-04 21:04:09 +03:00
Xaver Hugl
97939ceae8 backends/drm: fix blob updating
Two things about the code were wrong:
1. m_current is used in updateBlob() but was only updated afterwards
2. the assumption that the property having the same ID means it has the
same blob contents is not always true

BUG: 449285
2022-08-04 15:48:32 +00:00
Xaver Hugl
8955a2420e replace all uses of QScopedPointer with std::unique_ptr 2022-08-04 12:30:09 +00:00
Kai Uwe Broulik
3e820f71c3 useractions: Don't offer opening KCMs if they weren't built
Otherwise this add a few "Configure" entries to the window menu
which do nothing.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
2022-08-04 10:57:38 +00:00
Kai Uwe Broulik
62008e7b62 plugin: Use kwin_export.h instead of kwinglobals.h
It only uses the `KWIN_EXPORT` macro in plugin.h.
kwinglobals.h comes from libkwineffects and not kwin core.

(`KWIN_PLUGIN_VERSION_STRING` comes from config-kwin.h)

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
2022-08-04 11:44:48 +02:00
ivan tkachenko
2fd4106588
effects/private: Prevent fading windows from moving downward in WindowView effect
Inheriting "active" state was meaningless, since "active" state binds
position to a ExpoCell which itself is in a disabled state.

FIXED-IN: 5.25.5 5.26
2022-08-03 23:55:06 +03:00
ivan tkachenko
b6f6e7f15a
effects/desktopgrid: Fix panel opacity animation during transition
It did fade back in, but at the beginning of animation it used to just
instantly disappear.

FIXED-IN: 5.25.5 5.26
2022-08-03 00:59:10 +03:00
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