Commit graph

3263 commits

Author SHA1 Message Date
l10n daemon script
143d803f7b 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-29 01:43:22 +00:00
Vlad Zahorodnii
16af4bf437 Remove redundant window filter calls
If the window filter rejects a window, that window won't be in the
stacking_order and henceforth won't be painted, so finalDrawWindow()
does extra work of checking again if the window is accepted.
2022-04-28 13:56:13 +00:00
Xaver Hugl
05877a8321 backends/drm: reduce "max bpc" to what is actually used
This prevents triggering a bug in the BenQ GW2765 monitor, and should
in theory have no downsides.

BUG: 449906
FIXED-IN: 5.24.5
2022-04-28 02:32:11 +02:00
Vlad Zahorodnii
d24f908720 Move EffectWindow and SceneWindow to Deleted
It simplifies finishCompositing() function.
2022-04-27 16:43:24 +00:00
Xaver Hugl
b522bbc8fc backends/drm: fix build with HAVE_GBM_BO_GET_FD_FOR_PLANE=0 2022-04-27 15:33:04 +00:00
Vlad Zahorodnii
000f3d839f Ensure that Workspace::deletedRemoved() is emitted while there's scene window
Effects may perform cleanup when a deleted window is removed. If that
happens and the SceneWindow is accessed, kwin may crash.

The Scene processes Workspace::deletedRemoved() before effects.

In order to fix dereferencing null pointer, this change makes the Window
destroy its associated SceneWindow.
2022-04-27 18:14:16 +03:00
Vlad Zahorodnii
892059cd23 Rename Window::effect_window to Window::m_effectWindow 2022-04-27 18:14:16 +03:00
Vlad Zahorodnii
fd453537c5 Drop Platform::screenSize()
It's effectively unused.
2022-04-27 06:49:26 +00:00
l10n daemon script
c8a151d4f1 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-27 01:44:50 +00:00
Xaver Hugl
5730dc624b colors/colortransformation: add license header 2022-04-26 20:39:36 +02:00
Xaver Hugl
1365a76f3b manage ColorPipelineStages with unique_ptr 2022-04-26 16:20:47 +00:00
Xaver Hugl
14e7afcb4e color management: refactor and move to its own directory
The pipeline stages are also now properly managed, which should prevent
use-after-free errors.

BUG: 453026
2022-04-26 16:20:47 +00:00
Xaver Hugl
68a54a67b8 backends/drm: enable format modifiers by default
Format modifiers enable the graphics hardware to be much more efficient,
especially when it comes to multi-gpu transfers. With the issues regarding
bandwidth limits now solved, enable them by default to make all supported
systems benefit from them.

CCBUG: 452397
CCBUG: 452219
2022-04-26 17:03:19 +02:00
Xaver Hugl
916f1f4ea8 backends/drm: prune format modifiers when tests fail
When explicit modifiers are used, it can happen that Mesa chooses modifiers that make
the display hardware hit bandwidth limits. In that case, atomic tests fail and the
outputs don't work, or KWin may even crash.
In order to work around that, DrmGpu now removes the used modifier whenever an atomic
test fails, and tries to find a working combination of outputs and modifiers.
2022-04-26 17:03:02 +02:00
Vlad Zahorodnii
cd0430303b Fix potential null dereference in LockScreenFilter
input()->findToplevel() may return null.
2022-04-26 12:49:30 +00:00
Vlad Zahorodnii
f9b7d5298b Fix testModifierOnlyShortcut
If a window is destroyed before the frame is presented, the window
pointer will be dangling.

In order to make kwin handle that case correctly, the window is captured
using a QPointer.
2022-04-26 15:16:42 +03:00
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