Commit graph

22533 commits

Author SHA1 Message Date
Vlad Zahorodnii
f3b291bce0 Make TimeLine API ergonomic with presentation timestamps
Currently, if you want to use TimeLine, you need to track the last
presentation timestamp which boils down to carrying some boilerplate
code.

The current situation can be improved by making TimeLine work with
presentation timestamps.

Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2473>
2022-05-26 17:10:07 +00:00
Vlad Zahorodnii
6a5173b6c4 effects/zoom: Use GL_LINEAR filter
The magnification filter was changed to GL_NEAREST with the reasoning
that "pixel granularity" would be more correct. Perhaps that was not a
bright idea. Change it back to GL_LINEAR.

BUG: 454408
Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2471>
2022-05-26 10:11:01 +00:00
Kai Uwe Broulik
b6001d12cc backends/x11/windowed: Don't create cursor pixmap from null image
There's no point and it results in a "QImage::scaled: Image is
a null image" warning.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2469>
2022-05-26 06:51:46 +00:00
Kai Uwe Broulik
b062d09fdc backends/x11: Support resizing the windowed output
In response to a XCB_CONFIGURE_NOTIFY on the output window, the new size
is set as mode and the output layer buffer is recreated.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2459>
2022-05-26 06:38:32 +00:00
Vlad Zahorodnii
486d229cae effects/desktopgrid: Fix config group name
The config group is formed as "Effect-" + plugin id, i.e. "desktopgrid"

Config migration from DesktopGrid to desktopgrid is already handled by
a kconf_update script.

BUG: 454102
Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2464>
2022-05-25 18:11:57 +00:00
Kai Uwe Broulik
b018dd3204 qpa: Provide a QPlatformNativeInterface
Under Gnome/Unity/XFCE, but not Plasma(!), QFontconfigDatabase queries
the platform native interface for certain font settings
(e.g. antialiasingEnabled). Without a QPNI this would crash KWin
as soon as it tried to query for fonts.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2468>
2022-05-25 16:37:32 +00:00
Vlad Zahorodnii
f2be602266 kcms/touch: Fix crash
"effects" is a typo, we need to populate "m_scripts"

BUG: 454360
Tested-by: Merge Service <https://invent.kde.org/plasma/kwin/-/merge_requests/2465>
Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2465>
2022-05-25 10:26:03 +00:00
Vlad Zahorodnii
e57be93108 backends/drm: Specify clear color for cursor plane
Otherwise the results are undefined.

BUG: 454068
Tested-by: Merge Service <https://invent.kde.org/plasma/kwin/-/merge_requests/2466>
Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2466>
2022-05-25 09:45:18 +00:00
Vlad Zahorodnii
572a0904d8 autotests: Register ElectricBorder type
QSignalSpy yells about it.

Tested-by: Merge Service <https://invent.kde.org/plasma/kwin/-/merge_requests/2460>
Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2460>
2022-05-25 08:40:24 +00:00
Vlad Zahorodnii
7c849ee05a Use font metrics to compute corner offset
The problem with the current approach is that it doesn't work reliably
on wayland. Outputs can have different pixel density, etc.

Tested-by: Merge Service <https://invent.kde.org/plasma/kwin/-/merge_requests/2461>
Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2461>
2022-05-25 06:29:28 +00:00
l10n daemon script
68f6734d5c 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-05-25 01:46:45 +00:00
Kai Uwe Broulik
f013dc410e Don't block screen edge for fullscreen effects
Otherwise in overview effect you cannot go back out the way you came.

Tested-by: Merge Service <https://invent.kde.org/plasma/kwin/-/merge_requests/2416>
Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2416>
2022-05-24 23:58:33 +00:00
Kai Uwe Broulik
d143f6e3c4 backends/x11: Arm vsync monitor in EglX11Backend
This was originally on `EglX11Backend::endFrame` and got lost
as part of refactoring in 7358daa9, breaking nested `kwin_wayland`
rendering with GL.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
Tested-by: Merge Service <https://invent.kde.org/plasma/kwin/-/merge_requests/2458>
Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2458>
2022-05-24 14:44:59 +00:00
Aleix Pol
cad5ddbab3 xdg_activation_v1: Do not bounce icon if the desktop file was not found
It's annoying and doesn't buy us much.
Additionally, take X-KDE-StartupNotify into account as we are meant to.

BUG: 453940
Tested-by: Merge Service <https://invent.kde.org/plasma/kwin/-/merge_requests/2415>
Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2415>
2022-05-24 13:14:43 +00:00
Vlad Zahorodnii
221f114d80 effects/zoom: Render scene in an offscreen texture
This fixes integration of the zoom effect with the blur effect and qtquick
effects such as overview or window view.

The main con of the proposed solution is that offscreen rendering can be
a bit overkill. But on the other hand, it's the most robust way to
ensure that fullscreen effects integrate correctly with the zoom effect.
For example, without it, the quick scene effect would need to figure out
what screen views to paint for the given screen. There are also more
finicky cases, e.g. the screen transform effect.

BUG: 447002
BUG: 447670
BUG: 453467
Tested-by: Merge Service <https://invent.kde.org/plasma/kwin/-/merge_requests/2451>
Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2451>
2022-05-24 12:29:11 +00:00
Vlad Zahorodnii
cc487d4292 effects/zoom: Specify effect chain position
Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2451>
2022-05-24 12:29:11 +00:00
Vlad Zahorodnii
80b9617bad effects/fallapart: Fix glitch
The WindowItem visibility reference must be dropped after, not before
starting painting. It also makes the fall apart effect code consistent
with other effects.

BUG: 454243
Tested-by: Merge Service <https://invent.kde.org/plasma/kwin/-/merge_requests/2455>
Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2455>
2022-05-24 12:06:09 +00:00
Kai Uwe Broulik
cfd3676e96 backends/x11: Restore dedicated XRenderUtils::init function
Under kwin_wayland `kwinApp()->connection()` is for communicating with
XWayland, but in X11Windowed backend we need to talk to the host XServer.

Restore `XRenderUtils::init` and set it accordingly based on
whether we're running standalone or windowed, so that `kwin_wayland`
works running nested in an X session again.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
Tested-by: Merge Service <https://invent.kde.org/plasma/kwin/-/merge_requests/2457>
Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2457>
2022-05-24 11:45:52 +00:00
Vlad Zahorodnii
8b644fee58 backends/x11: Ensure that Output::geometryChanged is emitted when modes change
BUG: 453696
Tested-by: Merge Service <https://invent.kde.org/plasma/kwin/-/merge_requests/2454>
Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2454>
2022-05-24 09:51:44 +00:00
Alexander Lohnau
38eef5e2b7 Adjust name of KCM desktop files
The name should match the KCM plugin id, otherwise the entry can not be fond when the KCM should get pinned in the task manager
2022-05-23 19:40:26 +02:00
Vlad Zahorodnii
e6a2cbc345 wayland: Simplify keystate protocol implementation
Access input machinery directly to monitor modifiers.

Tested-by: Merge Service <https://invent.kde.org/plasma/kwin/-/merge_requests/2447>
Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2447>
2022-05-23 07:06:29 +00:00
Volker Krause
f64214e8b3 Add missing include
This is no longer indirectly included with KF deprecation level 5.94.
2022-05-22 15:13:40 +02:00
Vlad Zahorodnii
d91bdee3c7 Allow fullscreen effects to override latency policy
With some effects, latency policy doesn't matter and it's preferred if
kwin uses the smoothest animation latency policy in order to minimize
the number of frame drops, e.g. slide.
2022-05-21 17:21:20 +00:00
Vlad Zahorodnii
773384b59f Remove unused includes in scene.cpp
QQuickWindow and QVector2D are unused.
2022-05-21 15:27:42 +03:00
Vlad Zahorodnii
e3da5fc76e Remove EffectFrame leftovers in Scene 2022-05-21 14:20:33 +03:00
Méven Car
9cc73a5bc6 Bump KF5_MIN_VERSION after b069aad160e514ec2f933f654ddcbbc6aca59ed5
GIT_SILENT
NO_CHANGELOG
2022-05-21 12:14:14 +02:00
Ismael Asensio
329ddf5789 kcm/rules: Use the new KCM namespace for standalone launch
After commit c1d0aa18, the namespace where the KCM is installed
changed to `plasma/kcms/systemsettings/`.

We need to point to this new plugin location when the KCM is
launched via Alt-F3 > "Window Specific Properties"

Also let's set the full plugin location from CMake instead of
harcoded in C++ so it is easier to keep it in sync.

BUG: 454066
FIXED-IN: 5.25.0
2022-05-21 04:31:10 +00:00
Aleix Pol
14aefcb373 xkb: Explain mystery constant
While looking at xkb code I found what this + 8 meant, figured we better
include it in our code so it feels less magical.
2022-05-20 23:10:57 +00:00
Aleix Pol
da8ad3201b xdg_activation_v1: Improve internal API
Be explicit about how we only request privileged tokens internally in
KWin.
2022-05-20 16:36:55 +00:00
Xaver Hugl
13dd31d98a effects/windowview: allow closing windows with touch 2022-05-20 12:50:15 +00:00
David Edmundson
e23c3a69d9 [Effects/blend] Let fullscreen effects take priority
The Blendchanges effect works by showing a snapshot of the current
screen for a few ms. Any other active full screen effect will look
broken, so it should take priority.

This is pre-empting an issue with a new Plasma feature that syncs
colours to wallpapers. Once we animate activity switches / have per
desktop wallpapers it'll glitch out.
2022-05-20 08:15:22 +00:00
David Edmundson
c36ecacf1c Wait for lockscreen to actually be started before running lock tests
Firstly we weren't waiting for a signal at all, we are relying on events
being processed externally which is wrong.

Secondly ScreenLocker::KSldApp::self()->lockState() is tri-state;
unlocked, acquiring, locked. This gets compressed to a boolean where
acquiring and locked are the same.

If we run the tests whilst we're still acquiring the lock screen we can
call unlocked before we've finished locking. The greeter might then be
shown afterwards triggering a re-lock. It's a confused state.
2022-05-19 19:26:28 +00:00
Alexander Lohnau
af18335a0d Add missing NoDisplay=true to KCM desktop files
We want those to be shown when they are explicitly pinned, but
not in the normal app search/overview.

Fixes https://invent.kde.org/teams/plasma-mobile/issues/-/issues/154#note_452861
2022-05-19 18:23:06 +02:00
Vlad Zahorodnii
efece0a300 effects/windowview: Add ability to deactivate the effect by hitting the same screen edge
In present windows, you could hit the same screen edge that you use to
activate the effect in order to deactivate it.
2022-05-19 15:14:28 +00:00
Vlad Zahorodnii
843b3cfb2a effects/screenedge: Move it forward in the effect chain
Move the screen edge effect earlier in the effect chain so QML effects
can render their contents first, then draw screen edge glow.
2022-05-19 14:11:05 +00:00
Kai Uwe Broulik
a2c91f9434 backends/x11: Cleanup KWinXRenderUtils and move it to eglx11common
The XRender backend has been removed, leaving most of KWinXRenderUtils unused.

The few features that are still used, notable `XRenderPicture` and pict format
are moved into the x11/common directory.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
2022-05-19 12:10:18 +00:00
Vlad Zahorodnii
3b46067fc1 autotests: Force OpenGL compositing in testPointerInput
Window View effect requires OpenGL compositing.
2022-05-19 11:28:47 +00:00
Jonathan Esk-Riddell
e08cd40e8e Update version number for 5.25.80
GIT_SILENT
2022-05-19 12:25:51 +01:00
Xaver Hugl
0bbd4445f2 backends/drm: fix offset cursor
For some reason with legacy the cursor gets an offset when changing the
image. In order to work around this, directly issue a cursor move with the
corrected position when changing the buffer
2022-05-19 09:43:27 +00:00
Jonathan Esk-Riddell
8f009c2db1 Update version number for 5.24.90
GIT_SILENT
2022-05-19 10:41:30 +01:00
Xaver Hugl
23c68fd9da effects/desktopgrid,overivew: set touchpad gestures to match 5.24
As we don't provide any ability for the user to configure the gestures yet,
the gesture for the desktop grid should stay as it was in the last release.
This commit swaps the gestures for desktopgrid and overview to achieve that.
2022-05-19 07:37:29 +00:00
Vlad Zahorodnii
1ee00bc6f9 wayland: Fix drag-and-drop issues in Firefox
At the moment, the data offer initializes supported and preferred action
to "none". But if the target doesn't accept anything the source
provides, the compositor may still need to send action events with "none"

This change makes data offer and data source provide dnd actions wrapped
in std::optional in order to indicate if they have been set explicitly.
2022-05-19 07:00:43 +00:00
David Redondo
20a94d7157 xwayland: Keep source/Xvisit alive for longer
SeatInterface emits dragEnded when the drag is dropped. The target may want
to interact with the data source after the drop happened, for example only
fetching data after the drop and not during the drag.
(Note that the Wayland protocol has the same
Xvisits are now not deleted prematurely but only when they are really finished.
(Note that the Wayland protocol has the same distinction between dropped and
finished so it maps nicely).
For storing  previous visits the same code pattern as in the rest of the XWayland
DND code is used.
The SelectionSource is reset when the next Drag/Drop operation involving a X window
is started (see startDrag and doHandleXfixesNotify) or when the Wayland source is
about to be deleted.

BUG:450460
FIXED-in:5.25.0
2022-05-19 06:45:00 +00:00
Guenther Grau
f6f4a296f2 Fix argument order for clientMaximizedStateChanged
Arguments for clientMaximizedStateChanged were incorrect in window.cpp.
They are correct in xdgshellclient.cpp and window.h

BUG: 380836
2022-05-19 09:33:05 +03:00
Xaver Hugl
a262f2b28a Revert "wayland/outputdevice: use OutputMode directly"
This reverts commits 67181d5db7 and
d03e352dbf.

BUG: 454014
2022-05-19 00:59:54 +02:00
Vlad Zahorodnii
bcbbbc561b Rename Workspace::removeAbstractClient() to Workspace::removeWindow() 2022-05-18 17:14:09 +00:00
Vlad Zahorodnii
06a9c686f1 Move popup cleanup from Workspace::removeX11Window() to Workspace::removeAbstractClient()
This popup cleanup code can be useful also on wayland.
2022-05-18 17:14:09 +00:00
Xaver Hugl
62e1130846 gestures: limit progress range for pinch gestures
If progress goes out of the [0, 1] range, effects misbehave
2022-05-18 16:55:27 +02:00
Xaver Hugl
2238e608d6 gestures: rename weirdly named methods 2022-05-18 16:54:24 +02:00
Xaver Hugl
103d6b9e92 globalshortcuts: fix warning 2022-05-18 16:53:13 +02:00