Commit graph

22334 commits

Author SHA1 Message Date
l10n daemon script
2de51770de 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-04-10 01:47:26 +00:00
Nicolas Fella
bb28c84ec4 Add resourceName to plasma windowmanagement
This allows to get the resource name for XWayland windows, which is useful in the task manager
2022-04-09 14:44:19 +00:00
Nicolas Fella
c1a895effa Pass resource name to Plasma window management protocol 2022-04-09 14:43:09 +00:00
l10n daemon script
35c0aca980 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-04-09 01:49:59 +00:00
Xaver Hugl
2ef6215a51 backends/drm: don't permanently disable VRR when the test commit fails
In 5.24, the same code path is used for testing direct scanout, so that
causes false negatives. Generally though, the user setting shouldn't be
touched, it's not really proper feedback for the driver or KWin having
problems.
2022-04-08 17:10:12 +00:00
Vlad Zahorodnii
b495faf98d backends/drm: Fix mode comparison
Some modes can have the exact frame timings but different flags.
Currently, the mode comparison function doesn't take that into account
which can result in the drm backend setting the current mode flag
incorrectly.
2022-04-08 16:21:12 +00:00
Xaver Hugl
52c1155b26 backends/drm: prevent calling frameFailed multiple times per present 2022-04-08 17:37:48 +02:00
Volker Krause
972534eb3c Adapt to changes in the Qt6 QPA API
As a pleasant surprise this turned out much easier than anticipated,
all the API is still there, just moved to Qt::GuiPrivate.
2022-04-08 14:19:56 +00:00
Marco Martin
170b0e9aa0 effects/overview: Support touchpad realtime activation
Now it follows your fingers when you do a four-finger swipe up to activate it.

CCBUG: 401479
2022-04-08 14:17:21 +00:00
Vlad Zahorodnii
91f883f5ca Simplify code that announces available modes and current mode
If no mode has the current flag set, the first mode object will be
announced twice.

There's also no benefit from sending the current mode as last. If the
current mode changes, the compositor will send the current_mode event,
not the mode event.

BUG: 452318
2022-04-08 15:56:17 +03:00
Vlad Zahorodnii
08d18503e3 Use output property in Workspace::clientArea()
Since the Toplevel.output property is properly synchronized with the
frame geometry, Workspace::clientArea() can use the output property
instead of looking up the screen. It makes code intuitive and removes
unnecessary lookups.
2022-04-08 09:53:13 +00:00
Vlad Zahorodnii
510a41eeb8 Ensure that Toplevel::output() stays always in sync with geometry
Currently, if geometry updates are blocked, the Toplevel.output property
won't be updated. On the other hand, it's reasonable to use the output
property instead of manually looking up the output in window management
code, e.g. Workspace::clientArea().

In other words, using the Toplevel.output property is like walking on a
mine field, things can blow up. You can't use Toplevel.output even if it
makes perfect sense.

This change ensures that Toplevel.output property is always kept in sync
with the frame geometry. Unfortunately, this means that the output
property no longer can be updated when the frameGeometryChanged() signal
is emitted. It has to be done in moveResizeInternal() method.
2022-04-08 09:53:13 +00:00
Vlad Zahorodnii
8f36b431e7 Add Q_ASSERT in OutputDeviceV2Interface::setCurrentMode()
CCBUG: 452318
2022-04-08 11:32:21 +03:00
l10n daemon script
6d56fa9820 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-04-08 01:46:46 +00:00
Martin Seher
3521631bbb Add activeOutputName to DBus interface
Provide the name of the active output via the DBus interface, so it can
be used by other components, like KRunner (see bug 427069).

CCBUG: 427069
2022-04-07 21:26:47 +00:00
Kai Uwe Broulik
121004ebfd debug_console: Swap KTitleWidget for a bold QLabel
It's the only user of KWidgetsAddons API outside of effects and kcms.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
2022-04-07 15:57:26 +02:00
Xaver Hugl
34616520c2 backends/drm: fetch immutable blobs in DrmProperty
If the blob is fetched while there is no kernel-visible reference to it,
the driver may re-use the blob ID. When DrmProperty is created or updated,
KWin holds a reference on the blob via drmModeObjectProperties, so this
should prevent any possible issues.

CCBUG: 449285
2022-04-07 12:53:34 +00:00
Vlad Zahorodnii
d6af43763c Add convenience AbstractOutput::rect() function
Foobar::rect() is a common Qt API convention which is very handy when
you need a rect that looks like rect(0, 0, w, h).
2022-04-07 09:38:16 +00:00
Vlad Zahorodnii
809f383d44 Take layer-local damage regions
Using the global coordinate system when specifying output layer damage
regions would be very confusing. In order to make the coordinate system
comprehensible, use the layer-local coordinate system.

The infinite region is used to tell the Compositor when it needs to
repaint the entire layer.
2022-04-07 09:38:16 +00:00
l10n daemon script
1cf3804f60 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-04-07 01:44:22 +00:00
Volker Krause
5eef3cde22 Adapt to QKeySequence changes in Qt6 2022-04-06 15:13:20 +00:00
Aleix Pol
52035f43b9 xdgactivation: Demand attention when a process fails to resolve its token
In xdg_activation_v1, if a process fails to negotiate activation, at
least decorate it as demanding attention.
This will give apps ways to indicate attention is required. It can can also
help detect clients doing weird things.
2022-04-06 13:56:57 +00:00
l10n daemon script
1762a59fb4 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-04-06 01:45:45 +00:00
David Edmundson
c05e2fea45 Guard subsurface parent access.
Whilst a subsurface must have a parent at the time of creation, the
lifespan is not guaranteed afterwards.

It's a weird thing for a client to do, but we need to not crash
afterwards.

If the parent surface is destroyed we should consider the surface
unmapped.

BUG: 452044
2022-04-05 15:33:52 +00:00
David Edmundson
d73bdf2ee2 Fix layer shell reset
In the current form any client committing multiple times without
attaching a buffer would unset the cached state and trigger an error.

It's legal (though weird) to commit multiple times before attaching a
buffer.

We should only reset the state if we commit an empty buffer after having
committed an existing buffer. This brings us in line with XdgShell.
2022-04-05 13:59:12 +01:00
David Edmundson
abec252042 Rename member variables to convention 2022-04-05 09:37:53 +00:00
David Edmundson
6d33612967 Move session management to SessionManagement class
Right now Workspace and SessionManagement were entangled with
SessionManager being a dumb class that just signalled to Workspace to do
the work.

The code, however, lived in sm.cpp despite being part of workspace.

This commit is an initial cleanup to strip some X11 specific features
from Workspace and move towards having the right code in the right
files. It should hopefully help get us in the right direction we get
some wayland session management.

Behaviour should be unchanged.
2022-04-05 09:37:53 +00:00
l10n daemon script
9de79c62c7 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-04-05 01:49:22 +00:00
Gustavo Silvera
41526bd8dd effects/showfps: add new options
- added option to remove the frametime graph
- added option to remove the "this is a benchmark" message
- location of the fps counter is now on the "active" monitor by default
- removed the hard-limit of 100 for the FPS counter
- added option to color the text based off the FPS value
2022-04-04 16:05:56 +00:00
David Edmundson
9de9b93325 Add new blend effect
When changing global settings like switching between light and dark
themes the result is currently quite messy. Apps update in a scattered
order and a jarring change.

The solution is heavily inspired from Gnome, we cache the window for X
milliseconds, then perform a crossfade between the cache and current
contents.

It does mean any video is paused for half a second, but pragmatically
it's not really bothersome.

On receipt of an explicit DBus method call we create a cache and start
animating. The explicit method call is needed so that we can guarantee
kwin has a fully copy before a client might change.

Use of an offscreen texture is used so that we include any window
decorations. The DeformEffect effect is repurposed as it has most the
relevnat logic if we remove the live updating.
2022-04-04 13:40:41 +00:00
Xaver Hugl
a23d23593b backends/drm: check egl config before creating gbm surface 2022-04-03 15:25:54 +00:00
l10n daemon script
9d3f77f6f4 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-04-03 01:56:40 +00:00
Xaver Hugl
a4919786c6 gestures: prevent deciding on a direction too eary
Doing that breaks when the input device has a very high resolution, which
is the case with touchscreens for example. The minimum delta of 5 is an
arbitrarily chosen value that can be changed if needed
2022-04-02 15:59:02 +02:00
l10n daemon script
cba443dbe3 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-04-01 02:01:13 +00:00
Xaver Hugl
63c7f523b0 overview: register touchscreen gestures
This was meant to be done in 8914a6c50e,
a mistake must've sneaked in while rebasing
2022-03-30 16:31:10 +00:00
Xaver Hugl
c16a8e09d7 waylandserver: only signal lockScreenShown once it has actually been shown
When the system goes to suspend and screen locking for suspend is enabled,
suspend is inhibited until ScreenLocker::KSldApp::self()->lockScreenShown()
gets called, in order to make sure that the lockscreen is shown before the
system goes to standby, and thus also when the system wakes (instead of
potentially sensitive user information).
However, signalling that when the lockscreen gets mapped can't work reliably,
as it's then a matter of timing whether or not KWin actually presents an
image with the lockscreen before suspending. To fix that, this commit replaces
that logic with only calling lockScreenShown once every output actually got a
lockscreen presented.
2022-03-30 15:57:29 +02:00
Andreas Sturmlechner
2aaa9ed5c2 Add missing KF5Auth dependency
Used in src/helpers/killer

Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
2022-03-30 09:40:44 +00:00
Marco Martin
8e77cc497c Touch friendly changes for the Overview effect
* Makes the close button on thumbnails always visible: besides making it usable on touch, makes it more usable with mouse as well
* add a drag down gesture to close windows, moving opacity to zero while dragigng down to signal the window will be destroyed
* restore behavior animations: animate changes in thumbnails size or positions when not in drag mode or drag gesture to not make jarring sudden changes after closing a window or at end of drag mode
2022-03-30 08:33:30 +00:00
Vlad Zahorodnii
cc1bd42f16 Drop Screens::number() 2022-03-29 17:34:41 +00:00
Vlad Zahorodnii
66850e62a0 scripting: Provide clientArea() overloads that take VirtualDesktop objects 2022-03-29 17:34:41 +00:00
Vlad Zahorodnii
601ef328df Drop more legacy Workspace.clientArea() overloads
With this change, the Workspace would provide clientArea() overloads
that take only AbstractOutput and VirtualDesktop. integer ids are
obsolete as they are unstable.
2022-03-29 17:34:41 +00:00
Vlad Zahorodnii
3ebe480976 scene: Simplify optimized screen prepare pass 2022-03-29 14:38:18 +00:00
Vlad Zahorodnii
1dd6575d76 Compute valid opaque region at surface commit time
This allows us to simplify rendering code in the compositor.
2022-03-29 16:27:17 +03:00
Xaver Hugl
658457df5f backends/drm: attempt a modeset on output disabling
When modesets are necessary, they are attempted when an output on the given
GPU gets presented. With multi-gpu setups however, the situation can arise
where there is only one disabled output on a GPU; in that case KWin eternally
waits and never properly turns off the display.
In order to work around this, explicitly call DrmGpu::maybeModeset when
an output gets disabled.

BUG: 449878
FIXED-IN: 5.24.4
2022-03-29 09:19:57 +00:00
Fushan Wen
5427b4d4da tabbox: Don't play "Show Desktop Animation" when activating from tabbox
We already show the desktop preview when the "Show Desktop" item is focused,
so the animation should be considered redundant.
2022-03-29 03:46:31 +00:00
Fushan Wen
0ded63c464 effects: Don't emit showingDesktopChanged when animated is false 2022-03-29 03:46:31 +00:00
Fushan Wen
c85bb35c98 workspace: Add animated in setShowingDesktop
When `animated` is false, "Show Desktop Animation" should not be played.
2022-03-29 03:46:31 +00:00
l10n daemon script
1a6ebab865 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-03-29 02:16:07 +00:00
Volker Krause
95505eb044 Adapt to OpenGL related Qt6 QQuickWindow API changes 2022-03-28 14:57:27 +00:00
Aleix Pol
4009345e10 Remove unnecessary Scene::addRepaint(QRect)
We can implicitly convert QRect into QRegion.
2022-03-28 12:52:09 +00:00