Commit graph

3297 commits

Author SHA1 Message Date
Xaver Hugl
e7959b9693 backends/drm: don't expose DrmPipeline state as a public member
While having all state be public is great for avoiding the boilerplate that
comes with setters and getters, it also exposes more state than necessary
to the rest of the backend and makes it more error-prone if more than one
part of the state needs to be changed at the same time.
2022-04-26 07:43:37 +00:00
Vlad Zahorodnii
f7452fb4c5 Allow WindowThumbnailItem work also with override redirect windows
WindowThumbnailItem doesn't depend on features that are available only
with managed window.

By making WindowThumbnailItem work with all kinds of windows, its code
is easier to work with and refactor.
2022-04-26 06:48:09 +00:00
Vlad Zahorodnii
c773649377 Simplify EffectHandler::findWindow(uuid) implementation
With Workspace::findToplevel() code paths in findWindow() can be
unified.
2022-04-26 06:34:02 +00:00
l10n daemon script
beecf8c9d4 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-26 01:42:26 +00:00
Xaver Hugl
945eef58fe OutputMode: use uint32_t for the refresh rate 2022-04-25 21:54:17 +02:00
Vlad Zahorodnii
175037d9d1 Prefer the term "window" over "client" in Workspace 2022-04-25 11:33:55 +00:00
Nils Fenner
4bb276aa93 Minor clean up in KWin::Window
References #81
2022-04-25 08:26:59 +00:00
l10n daemon script
3030a85694 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-25 01:51:27 +00:00
Alexander Lohnau
3324400672 Port KWin scripts KCM to new install location
Task: https://phabricator.kde.org/T14517
2022-04-24 09:58:34 +00:00
Alexander Lohnau
719e97194d Port KWin Scripts KCM to QML
Task: https://phabricator.kde.org/T7289
2022-04-24 09:58:34 +00:00
l10n daemon script
be9781d0c5 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-24 01:40:58 +00:00
Xaver Hugl
9ed87a4e23 backends/drm: support common display modes
BUG: 448398
2022-04-23 23:29:57 +02:00
Xaver Hugl
a343af674b backends/drm: fix damage tracking for virtual outputs 2022-04-23 10:51:09 +00:00
Vlad Zahorodnii
3de377e461 Rename XwaylandClient to XwaylandWindow 2022-04-23 07:55:51 +00:00
Vlad Zahorodnii
4b91c6163f Rename XdgShellClient to XdgShellWindow
The word "client" means different things in wayland and kwin. Use a
better word to refer to windows.
2022-04-23 07:55:51 +00:00
Vlad Zahorodnii
a21aa839b1 Rename X11Client to X11Window
The word "client" means different things in wayland and kwin. Use a
better word to refer to windows.
2022-04-23 07:55:51 +00:00
Vlad Zahorodnii
f0f829bc5b Rename WaylandClient to WaylandWindow
The word "client" means different things in wayland and kwin. Use a
better word to refer to windows.
2022-04-23 07:55:51 +00:00
Vlad Zahorodnii
3cdee2f24a Rename LayerShellV1Client to LayerShellV1Window
The word "client" means different things in wayland and kwin. Use a
better word to refer to windows.
2022-04-23 07:55:51 +00:00
Vlad Zahorodnii
fb4607f5a6 Rename InternalClient to InternalWindow
The word "client" means different things in wayland and kwin. Use a
better word to refer to windows.
2022-04-23 07:55:51 +00:00
Vlad Zahorodnii
48b951201a Rename InputPanelV1Client to InputPanelV1Window
The word "client" means different things in wayland and kwin. Use a
better word to refer to windows.
2022-04-23 07:55:51 +00:00
l10n daemon script
b935bca22f 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-23 01:44:53 +00:00
Vlad Zahorodnii
0ef12b69a1 plugins/screencast: Avoid damaging full screen on rotated outputs
Not sure what that check is for, but things should work as expected even
without it.
2022-04-22 20:03:20 +00:00
Volker Krause
5368537981 Fix Qt6 build regressions 2022-04-22 18:10:26 +00:00
Nils Fenner
b491aeb9ae Rename AbstractClient to Window 2022-04-22 17:39:12 +00:00
Fushan Wen
2e7364ddde WindowHeap: Hide window icon and label when excluded
This makes the opening animation of Window View from task manager less rigid.
2022-04-22 16:20:43 +00:00
Xaver Hugl
99761901ee backends/drm: don't check the test buffer if we don't need one
BUG: 452572
2022-04-22 15:17:01 +00:00
Xaver Hugl
941bae2810 backends/drm: fail atomic tests gracefully when buffer allocations fail
This should fix the crash. However, it's still unclear to me why allocations
fail in the first place

CCBUG: 452572
2022-04-22 15:17:01 +00:00
Vlad Zahorodnii
2b7fa206e8 Refactor Output information initialization
Instead of passing all possible field values to the initialize()
function, pass all relevant data in a struct. With designated
initializers, it's more readable and makes code more comprehensible.

The general goal is to split Output's data in two categories - general
information about the output (e.g. edid) and mutable state (position,
mode, etc).
2022-04-22 14:36:41 +00:00
Fushan Wen
c4a0f20f4a
effects/windowview: Fix "Unable to assign [undefined] to int"
animationDuration is not defined in WindowViewEffect. Use
heap.animationDuration instead.
2022-04-22 21:13:43 +08:00
Vlad Zahorodnii
31c069ebf3 wayland: Let ecm_add_qtwayland_server_protocol_kde() work with targets
Makes CMakeLists.txt code a bit safer.
2022-04-22 12:38:41 +00:00
Vlad Zahorodnii
a4a2ee0428 Refactor output mode abstractions
With this, the drm backend will be able to associate drmModeModeInfo
with Output's modes, which can be useful if there are several modes with
the same resolution and refresh rate but different flags.
2022-04-22 11:17:11 +00:00
Vlad Zahorodnii
6b4daeddc9 src/xwl -> src/xwayland
It makes naming more consistent, we use "wayland" more frequently than
"wl".
2022-04-22 13:09:51 +03:00
Vlad Zahorodnii
b64f95b703 Integrate kwaylandserver
This makes KWin switch to in-tree copy of KWaylandServer codebase.

KWaylandServer namespace has been left as is. It will be addressed later
by renaming classes in order to fit in the KWin namespace.
2022-04-22 12:27:33 +03:00
Ben Cooksley
28ed0ced17 Merge kwayland-server into kwin.
Ref T15459
2022-04-22 21:20:08 +12:00
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