Commit graph

3263 commits

Author SHA1 Message Date
l10n daemon script
ef7d51f09e 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-22 01:47:15 +00:00
l10n daemon script
24e2883f24 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-21 01:43:47 +00:00
Xaver Hugl
de73dfae35 backends/drm: rename transformation variables to be more intuitive 2022-04-20 15:57:51 +02:00
Xaver Hugl
d2d0049213 backends/drm: fix some problems with rotation
source and buffer rotation / sizes were used wrongly in a few places
2022-04-20 15:46:05 +02:00
Xaver Hugl
c3954eab8f Port gamma ramp code to generic color transformations
Instead of creating a gammaramp object with a fixed size, make the color
device create a color transformation object that can be used to construct
arbitrary LUTs. This is needed in order to support tiled displays well
and is useful for further color management work.
2022-04-20 12:29:26 +02:00
Xaver Hugl
f6eee463ba Make lcms2 a hard dependency
When we do more color management stuff we'll need it in more places,
making it a hard requirement reduces the amount of needed ifdefs and
should make adding color management features a little simpler.
2022-04-20 12:21:38 +02:00
Marco Martin
871f8d0b91 Correctly map NaturalX/Y to scene coordinates
being naturalx something that needs to map to the actual geometry of the window which is in absolute coordinates but mapped to a view which geometry correspond to the one of one particular screen (plus the layout the thumbnail lives in has its own geometry in the scene)
2022-04-20 08:11:18 +00:00
Xaver Hugl
7aad5df7d9 backends/drm: fix rebase mistake 2022-04-19 20:00:45 +02:00
Vlad Zahorodnii
411679ea16 Implement wl_surface_offset()
See https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/123
2022-04-19 12:31:55 +00:00
Vlad Zahorodnii
219cb54d35 Add missing Display class forward declaration 2022-04-19 13:19:20 +03:00
Vlad Zahorodnii
227ab071be Run .clang-format 2022-04-19 13:14:26 +03:00
Xaver Hugl
cc6b549112 backends/drm: drop QPainterLayer class
It's unused
2022-04-18 17:35:28 +02:00
Xaver Hugl
c43eb6ec42 backends/drm: extract dmabuf feedback into its own class
This should reduce code duplication with overlay planes
2022-04-18 17:34:04 +02:00
Xaver Hugl
5df65e4be5 backends/drm: refactor egl/gbm render surface into its own class
This allows sharing most code with overlay plane layers
2022-04-18 17:34:04 +02:00
Xaver Hugl
c30339cc82 backends/drm: move texture creation for gbm buffers into GbmBuffer 2022-04-18 17:34:04 +02:00
Vlad Zahorodnii
3d038b715f Remove duplicate AbstractClient properties
Some Toplevel properties were redefined in the AbstractClient class to
allow property mutability.

Now, since both classes were merged, those properties can be defined
only once.
2022-04-18 12:33:53 +00:00
Vlad Zahorodnii
2540e80277 Make AbstractClient::layoutDecorationRects() virtual
This fixes closed windows losing decorations.
2022-04-18 12:08:46 +00:00
Vlad Zahorodnii
328f51ce10 Remove some AbstractClient plumbing casts in input.cpp 2022-04-18 11:47:56 +03:00
Vlad Zahorodnii
507bad4843 Remove AbstractClient plumbing casts in WaylandServer 2022-04-18 11:47:56 +03:00
Vlad Zahorodnii
817656cb0b Remove AbstractClient plumbing casts in AbstractClient 2022-04-18 11:47:56 +03:00
Vlad Zahorodnii
a429739f98 Remove AbstractClient plumbing casts in DbusInterface 2022-04-18 11:47:56 +03:00
Vlad Zahorodnii
348e20e20f Remove AbstractClient plumbing casts in Workspace 2022-04-18 11:47:56 +03:00
Vlad Zahorodnii
31d1d13de5 Remove AbstractClient plumbing casts in TouchInputRedirection 2022-04-18 11:47:56 +03:00
Vlad Zahorodnii
6cf490c9cc Remove AbstractClient plumbing casts in PointerInputRedirection 2022-04-18 11:47:56 +03:00
Vlad Zahorodnii
f7d913af91 Remove AbstractClient plumbing casts in TabBox 2022-04-18 11:47:56 +03:00
Vlad Zahorodnii
506863f97e Remove AbstractClient plumbing casts in src/layers.cpp 2022-04-18 11:47:56 +03:00
Vlad Zahorodnii
e5561b194a Remove AbstractClient plumbing casts in WindowItem 2022-04-18 11:47:54 +03:00
Vlad Zahorodnii
76a3a31f42 Remove AbstractClient plumbing casts in EffectsHandlerImpl 2022-04-18 11:10:29 +03:00
Vlad Zahorodnii
9157b1303e Remove AbstractClient plumbing casts in PopupInputFilter 2022-04-18 11:04:18 +03:00
Vlad Zahorodnii
94bbe14f4c Remove AbstractClient plumbing casts in Placement 2022-04-18 11:01:51 +03:00
Vlad Zahorodnii
85be7c2b48 Remove AbstractClient plumbing casts in ScreencastManager 2022-04-18 10:59:45 +03:00
Vlad Zahorodnii
e5fe1ebd20 Remove AbstractClient plumbing casts in Shadow 2022-04-18 10:58:53 +03:00
Vlad Zahorodnii
3c69b08e49 Fix up some AbstractClient dynamic_cast<>()s
Originally, they were to check whether the given window is managed.
2022-04-18 10:42:53 +03:00
Nils Fenner
aaa429ee0a Merge Toplevel into AbstractClient
References issue #81
2022-04-18 07:42:11 +00:00
l10n daemon script
5acf8aa792 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-18 01:40:14 +00:00
Ismael Asensio
d320756206 kcm/rules: Add Exclusive and SelectAll types to options model
A "Select All" option has the value of all the rest of the options
combined. Used for the Window Types property.

An Exclusive option cannot be check as the same time as any other
options, but uses its own value. Used for "All Activities" and
"All Virtual Desktops" properties.

Co-Authored-By: Fushan Wen <qydwhotmail@gmail.com>
2022-04-17 12:28:56 +02:00
Ismael Asensio
bb7bc3359a kcm/rules: Refactor OptionsModel
Provide `allOptionsMask`, `bitMask`and `useFlags` as properties
and roles from OptionsModel in C++ side, to simplify the QML part
and improve the treatment of flag-based properties in `OptionsComboBox`.
2022-04-17 12:28:56 +02:00
l10n daemon script
e21972fa71 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-17 01:48:39 +00:00
Xaver Hugl
3d556bba83 backends/drm: drop DrmGpu test mode
It's unused
2022-04-16 21:23:57 +00:00
Xaver Hugl
8cb8d2f627 backends/drm: drop DrmPipeline format helpers 2022-04-16 21:23:57 +00:00
Ismael Asensio
75d71a1c1a AbstractClient: Re-check screen rules on screen enabled
BUG: 409979
FIXED-IN: 5.25
2022-04-16 16:02:12 +00:00
Weng Xuetian
14ae6e3100 Fix race in wp_drm_lease_v1.
Basically this is a well known issue in wayland for globals. If bind
comes after destroyed, it will raise a invalid global error. The common
practice is to delay the destroy of global. Similar technique is also
applied to wl_output.

CCBUG: 452435
2022-04-16 00:01:12 -07:00
l10n daemon script
a518a4d53b 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-16 01:46:47 +00:00
Vlad Zahorodnii
e6f08665fe Drop Output::updateTransform()
If the backend needs to apply custom logic when changing the transform,
it should override Platform::applyOutputChanges(); otherwise just update
the Output's internal transform state.
2022-04-15 19:22:41 +03:00
Vlad Zahorodnii
8e7a8c5a11 Rename AbstractOutput to Output
AbstractOutput is not so Abstract and it's common to avoid the word
"Abstract" in class names as it doesn't contribute any new information.
It also significantly reduces the line width in some places.
2022-04-15 17:49:49 +03:00
Vlad Zahorodnii
b376865f52 Rename WaylandOutputConfig to OutputConfiguration 2022-04-15 14:49:02 +00:00
Vlad Zahorodnii
d43dac8f8d Merge AbstractWaylandOutput with AbstractOutput 2022-04-15 14:49:02 +00:00
Vlad Zahorodnii
ca7927e3b6 Run clang-format yet another time 2022-04-15 15:23:44 +03:00
Vlad Zahorodnii
c157e948e2 autotests: Fix TestWaylandSurface
The API of SurfaceInterface was changed so it always maintains an opaque
region.

At the surface commit, if the attached buffer is opaque, the whole
surface will be marked opaque. Otherwise, the specified opaque region
will be intersected with the surface rect.
2022-04-15 09:44:39 +00:00
Nils Fenner
1466836ba7 Inherit "Delete" and "Unmanaged" from AbstractClient
Depends on !2224, !2232 

Further changes are blocked until the above MR's are merged.
2022-04-15 07:15:59 +00:00
l10n daemon script
34c1231d60 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-15 01:50:12 +00:00
Eric Edlund
c09871917b Make VirtualDesktopManager update grid dimentions when only 1 desktop
This is a patch to get the last two commits to work.
A larger problem to fix is that when the desktop grid size is changed in
the KCM by removing desktops, the internal grid dimensions are not
updated until system restart.
2022-04-15 00:09:52 +00:00
Eric Edlund
003c820e00 rework of slide effect internals
Fixed a bunch of bugs and polished the slide effect.
Plugged the slide effect into the new VirtualDesktopManager interface desktopChanging() to allow for mac os style desktop switching.

BUG: 448419 BUG: 401479
2022-04-15 00:09:52 +00:00
Eric Edlund
26a4f75944 Implement desktopSwitching() interface for realtime animations
Added this interface to the VirtualDesktopManager. Realtime touchpad gestures update the interface to allow for mac os style desktop switching.
Also makes gestured switching use natural direction.

BUG: 185710
2022-04-15 00:09:52 +00:00
Nils Fenner
31ec0ceb24 Use Toplevel::isDeleted() to resolve Deleted type.
Prepares #81 (part 2)

Note that the `Unmanaged` type is not explicitly checked - implies `(t->isDeleted() || t->isClient()) == false`.
2022-04-14 19:36:34 +00:00
Xaver Hugl
e48a5c0535 toplevel: set valid output in the constructor
This makes it less easy to cause crashes and fixes some segfaults.

BUG: 452433
2022-04-14 17:56:50 +00:00
Vlad Zahorodnii
3534b6afee Remove input processing functions in Platform
Input event flow has been refactored so all input events originate from
input devices.

The X11 backend uses InputRedirection so make it forward events to
relevant input device handlers.
2022-04-14 17:29:51 +03:00
Nils Fenner
d146a3d1dd Use Toplevel::isClient() to resolve AbstractClient type. 2022-04-14 13:50:12 +00:00
Vlad Zahorodnii
4790408423 Run clang-format again
Some people either don't have clang-format installed or disable the
commit hook.
2022-04-14 13:58:03 +03:00
Vlad Zahorodnii
2c1d36e8c5 kcms/rules: Remove unused cpp files from build dependencies 2022-04-14 09:53:05 +00:00
Vlad Zahorodnii
45dc423638 Make RuleBook::setUpdatesDisabled() work with AbstractClient 2022-04-14 09:53:05 +00:00
Fushan Wen
7f39bb1b33
scene: Check waylandServer() is nullptr in filterAcceptsWindow
This fixes compositing on X11.
2022-04-14 14:29:38 +08:00
l10n daemon script
16b7f5729a 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-14 01:45:53 +00:00
Xaver Hugl
432fb52788 backends/drm: refactor format choosing and prefer alpha formats
Prefering alpha is needed for some interactions with video underlays; more
directly choosing formats with an alpha channel will be needed for overlay
planes, too.
2022-04-13 20:48:28 +00:00
Marco Martin
5cf2e1e84d Rebase and adapt to changes in master 2022-04-13 19:06:11 +00:00
Vlad Zahorodnii
a0f456b7dc effects: Add Window View effect
The Window View effect is a companion effect for the task manager. It
provides the task manager a way to ask the user to pick a window among
windows identified by window ids passed to the activate() method.

The main motivation for adding this effect is to provide a QtQuick based
alternative for the present windows effect, which is needed to kill the
latter.

This change doesn't extend the overview effect to avoid repeating
mistakes of the past, i.e. adding too many (unrelated) features to the
present windows effect.

While the overview effect provides you a way to select windows, it's not
the only thing that it has. For example, it also allows changing virtual
desktops, etc.

On the other hand, the task manager doesn't need all of that. It only
needs to ask the user to pick a window among the specified windows, nothing
more.

As is, the window view effect is simply WindowHeap with a d-bus api slapped
on top of it.
2022-04-13 19:06:11 +00:00
Vlad Zahorodnii
2ac1f9b7d3 kwineffects: Expose internalId 2022-04-13 19:06:11 +00:00
Vlad Zahorodnii
6dffda920a effectkit: Allow disabling dnd in WindowHeap 2022-04-13 19:06:11 +00:00
Vlad Zahorodnii
2456344fae Allow disabling expo cells
This allows making specific windows in a WindowHeap static.
2022-04-13 19:06:11 +00:00
Vlad Zahorodnii
1589e2c918 effects: Re-introduce support for client filtering in WindowHeap 2022-04-13 19:06:11 +00:00
Vlad Zahorodnii
00c95afcc1 effects: Move WindowHeap in a qml module
The WindowHeap can be useful not only to the Overview effect, but also
other effects, e.g. a desktop grid replacement, etc.
2022-04-13 19:06:11 +00:00
Aleix Pol
e3fe69041f Centralise window filtering around a new SceneWindowFilter class
This way WaylandServer can implement its own filter with its own set of
rules without having Scene be too involved in it.
2022-04-13 11:17:34 +00:00
Aleix Pol
d3259fe945 Fix unlocking wayland sessions
We were never issuing a repaint which confused thoroughly the
compositor.

BUG: 447705
2022-04-13 11:17:34 +00:00
Vlad Zahorodnii
efd43f97e6 Drop Scene::qpainterRenderBuffer() 2022-04-13 10:16:16 +00:00
Vlad Zahorodnii
bd689ef76c Simplify software cursor implementation
With RenderTarget, CursorView and CursorDelegate can be merged.
2022-04-13 10:16:16 +00:00
Vlad Zahorodnii
bfb60e3610 Add RenderTarget type
The main motivation behind this change is to unify render target
representation across opengl and software renderers and avoid accessing
the render backend directory in order to get the render target.
2022-04-13 10:16:16 +00:00
Xaver Hugl
db3f27336f effects/kscreen: don't use xcb on Wayland
BUG: 450564
FIXED-IN: 5.24.5
2022-04-12 18:28:18 +00:00
Xaver Hugl
adb46cbfa3 backends/drm: disable added outputs if finding a working setup fails
If the non-working outputs stay enabled, that may cause problems.
2022-04-12 16:32:16 +00:00
Xaver Hugl
255e9882b6 backends/drm: add some warnings for failing atomic tests 2022-04-12 16:32:16 +00:00
Xaver Hugl
661fbec244 backends/drm: create surfaces for new pipelines before doing tests
It's more efficient and avoids code paths where KWin can crash if all
tests fail
2022-04-12 16:32:16 +00:00
Xaver Hugl
08324f0924 backends/drm: apply changes after setting initial mode
If the changed mode isn't applied, it might be reverted if an atomic commit
fails
2022-04-12 16:32:16 +00:00
Aleix Pol
4b9fc5f9ce readability: Do not close ifdef only to open it again 2022-04-12 13:14:52 +00:00
Aleix Pol
1ada1c0652 tabbox: Do not leak QKeyEvents
Allocate in the stack so it gets cleaned up after using
2022-04-12 13:14:52 +00:00
Vlad Zahorodnii
992753c24a Rename GLRenderTarget to GLFramebuffer
GLRenderTarget doesn't provide a generic abstraction for framebuffer
objects, so let's call GLRenderTarget what it is - a framebuffer.

Renaming the GLRenderTarget class allows us to use the term "render
target" which abstracts fbos or shm images without creating confusion.
2022-04-12 13:41:19 +03:00
Xaver Hugl
7358daa92c renderbackend: move render methods to OutputLayer
This is in preparation to using multiple outputlayers per output
2022-04-12 09:31:58 +00:00
Xaver Hugl
8e998a7cfa renderbackend: split presentation out of endFrame
With these two actions being separate, RenderLoop can record the time spent
in endFrame (for example for multi-gpu transfers) without risking also recording
blocking swapbuffer calls, and endFrame can later be moved to output layer
2022-04-12 09:31:58 +00:00
l10n daemon script
9dc5e5310e 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-12 01:44:17 +00:00
Kishore Gopalakrishnan
1e0b0c881e effects/desktopgrid: only swap windows on current activity
In the desktop grid effect, dragging an empty area of a desktop to
another desktop swaps all windows on the two desktops. This change makes
sure that this matches only windows in the current activity.

BUG: 386769
FIXED-IN: 5.24.5
2022-04-11 20:57:32 +00:00
Bharadwaj Raju
1d6aee85e2 plugins/nightcolor: Add a DBus method to preview a given color temperature for a short time
This is needed for a proposed live preview feature in the Night Color KCM in
https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1393.
2022-04-11 20:32:24 +00:00
Ismael Asensio
4c8711f121 AbstractClient: Fix the current VD being always added to the plasma interface
When setting-up the plasma window interface we need to call
`setOnAllDesktops()` after the actual virtual desktops have
been set.

Otherwise, the current desktop would be always added to the
interface (as if the user were unsetting the "onAllDesktops"
flag) and the plasma interface and KWin can get un-synced,
specially if there are specific window rules.

BUG: 452171
FIXED-IN: 5.24.5
2022-04-11 16:50:56 +00:00
Weng Xuetian
374e949182 Do not send overlay geometry to text input. 2022-04-11 13:40:22 +00:00
Marco Martin
8947ece98f Fix a crash on x11 on closing laptop lid
On x11 when multiscreen is enabled often kwin crashes on
laptop lid close, for two reasons:
* m_outputLayer going dangling in RenderLayer: fixed by using a QPointer
* m_activeOutput going dangling in Workspace

For the latter, the output disabling was done correctly, but x11client did set the old deleted output
again in X11Client::moveResizeInternal
This is fixed by moving desktopResized() at the bottom of
Workspace::slotOutputDisabled() after the reassign of outputs to
the toplevels
2022-04-11 11:18:30 +00:00
l10n daemon script
9b4fb802a9 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-11 01:45:29 +00:00
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
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
Aleix Pol
fd1dd4f915 --warning: Remove unused local variable 2022-03-28 12:52:09 +00:00
Vlad Zahorodnii
e293972eaa Run clang-tidy with -checks=readability-braces-around-statements fixit
This fixes style issues in old code.
2022-03-28 10:54:11 +00:00
Kai Uwe Broulik
0d223742ab kwineffects: Add OffscreenQuickScene::setSource with initial properties
Signed-off-by: Eike Hein <eike.hein@mbition.io>
2022-03-28 09:47:48 +00:00
Vlad Zahorodnii
19a18e4b5d Clean up QPalette handling in DecorationPalette
When using a "legacy" colorscheme, the QPalette will be loaded twice.
With this change, the QPalette is going to be created only once. It also
cleans up variable naming.
2022-03-28 09:17:25 +00:00
l10n daemon script
e14d31a11a 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-28 01:44:20 +00:00
Xaver Hugl
8914a6c50e add global touchscreen gestures
Swipe with three fingers
- left to switch to the previous virtual desktop
- right to switch to the next virtual desktop
- up and down to toggle the overview

CCBUG: 439925
2022-03-27 19:09:04 +02:00
l10n daemon script
0aab6e3ee5 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-27 01:50:57 +00:00
Volker Krause
648640f9ad Include KF headers properly
With the recent KWayland changes we can build without 4 era legacy include
paths now, which makes this visible.
2022-03-25 16:15:10 +01:00