Commit graph

22370 commits

Author SHA1 Message Date
Vlad Zahorodnii
f1f512791e Fix updating fullscreen geometry restore
Currently, fullscreen geometry restore is computed from maximized
geometry restore. However, the latter is set only when the window is
maximized.

Also, updateGeometryRestoresForFullscreen() can be called when the
window has not been moved. Avoid updating geometry restore if the output
has not been changed.
2022-05-04 12:37:50 +00:00
Vlad Zahorodnii
f51db012f2 effects/desktopgrid: Make sure that the screen is rendered correctly when animation reaches the end
If the animation reaches the end, desktop grid may render the screen
incorrectly. Make sure that PAINT_SCREEN_BACKGROUND_FIRST and flags as
such are set even if animation has reached the end.

Also, while on this, simplify the paintWindow() method by removing
redundant effect status checks.
2022-05-04 08:45:15 +00:00
Vlad Zahorodnii
2da599c670 effects/desktopgrid: Make termination code less error prone
The desktop grid effect can be deactivated in postPaintScreen() without
delaying finish().
2022-05-04 08:45:15 +00:00
l10n daemon script
e9d1def1ba SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-05-04 01:45:48 +00:00
Marco Martin
02171495be dynamically load effects that support edge activation
effects can specify in their json file "X-KWin-Border-Activate":true
and will be listed in the edge menus.

Don't hardcode desktop grid and overview in the kcms
2022-05-03 16:54:36 +00:00
Vlad Zahorodnii
0c69ce50ac effects/slide: Fix panels losing blurred background when gesture is active
At the moment, if user switches between virtual desktops using a
gesture, panels will loose blurred background because WindowForceBlurRole
is not set.

This change refactors setup code so the slide effect always forces blur
and background contrast when sliding between virtual desktops using a
gesture or animation.
2022-05-03 17:04:29 +03:00
Vlad Zahorodnii
4513b4830f effects/slide: Use an enum to describe current state 2022-05-03 17:04:25 +03:00
Marco Martin
4cb3ab09ed Realtime screen edges gestures for scripted effects
Possibility to implement realtime screenedges gestures in scripted effects,
implement it in the windowsaperture show desktop effect.
* Expose registerRealtimeScreenEdge to JavaScript, the callback will be
a JS function.
* Add the concept of freezeInTime() in the animation js bindings,
it will either create an animation frozen at a given time or freeze a running animation
that can be restored and ran to completition at any time
* add an edges property only for showdesktop as it's not directly on the effect configuration
2022-05-03 13:43:38 +00:00
Xaver Hugl
46bbe4ff0c backends/drm: don't rely on test commits producing a buffer
When DrmPipeline::commitPipelines returns false without creating a test
buffer, we'd crash.

CCBUG: 453320
2022-05-03 08:14:53 +00:00
l10n daemon script
be5cd1b38e SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-05-03 01:49:38 +00:00
Xaver Hugl
8d3de947af backends/drm: re-create gamma ramps if necessary when switching crtcs
The gamma ramp size of different crtcs is not guaranteed to be the same,
so the gamma blob may need to be re-created
2022-05-02 17:40:25 +02:00
Xaver Hugl
b5aebc83ee backends/drm: fix gamma ramps with legacy
With legacy, gamma ramps wouldn't be calculated from the color transformation,
which made them not be applied.

BUG: 453070
2022-05-02 17:39:19 +02:00
l10n daemon script
74aff4b088 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-05-02 01:40:40 +00:00
l10n daemon script
6d8a303138 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-05-01 01:53:58 +00:00
Méven Car
e97e6e4068 XWayland::Primary: Fix unused warnings 2022-04-30 19:49:29 +02:00
Vlad Zahorodnii
50b3d1d063 Make EffectsHandler use cached active effects list in blocksDirectScanout()
When the scene checks whether any active effect blocks direct scanout,
m_activeEffects is already populated.
2022-04-30 17:03:27 +03:00
Vlad Zahorodnii
2b9adf279e Cancel interactive desktop switching if desktop has not changed
If desktop wrapping is disabled and user swipes to left but there's no
desktop to left, the slide effect can get stuck active because there's
no desktopChanged() nor desktopChangingCancelled() signal emitted.

This change makes the VirtualDesktopManager explicitly cancel
interactive desktop switching session if the current desktop has not
changed.
2022-04-30 12:41:45 +00:00
Xaver Hugl
3c9d209344 backends/drm: fix mode updates with generated modes
DrmOutput::updateModes was called unnecessarily every time, because the
mode list the driver modes was compared against contained generated modes
2022-04-30 11:10:06 +00:00
Xaver Hugl
d50c9b8cb6 backends/drm: initialize layers earlier
With how layers are initialized before this commit, the atomic commit in
DrmOutput::updateModes can cause segfaults.
2022-04-30 10:46:14 +00:00
Aleix Pol
87e72506b8 Add support for KGlobalAccelInterfaceV2::keyReleased
To be able to implement the XdgDesktopPortal for GlobalShortcuts, we
need to let kglobalaccel know when a shortcut is not deactivated
anymore.
2022-04-30 07:24:50 +00:00
Aleix Pol
9a31b0d727 x11: trigger shortcuts when releasing rather than pressing
This way we can issue a keyboard grab without problems
2022-04-30 07:24:50 +00:00
Aleix Pol
1f443301ed x11: Add debug info when grabs fail 2022-04-30 07:24:50 +00:00
l10n daemon script
90d38017da 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-30 01:41:28 +00:00
Vlad Zahorodnii
55f0ccc0fe plugins/screencast: Avoid Window::addRepaintFull()
It will be dropped.
2022-04-29 18:29:16 +00:00
Xaver Hugl
aa432e5947 outputconfigurationinterface: don't crash if mode is invalid
When the client makes the request, the compositor may have already
destroyed the mode object.

BUG: 453042
FIXED-IN: 5.24.5
2022-04-29 17:38:08 +00:00
Vlad Zahorodnii
3cec7e63e9 Drop Window::setClientShown()
It's unused.
2022-04-29 19:09:51 +03:00
Vlad Zahorodnii
2fdb55b199 Rename InternalWindow::internalWindow() to InternalWindow::handle()
internalWindow->handle() reads better than internalWindow->internalWindow()
2022-04-29 17:47:41 +03:00
Vlad Zahorodnii
5ee044e6fc Some client/toplevel -> window 2022-04-29 17:47:39 +03:00
Vlad Zahorodnii
106fb66cd0 Make Scene::createStackingOrder() more efficient
Currently, there's a separate pass to filter out windows not ready for
compositing or windows that must be invisible. That has two issues: we
could merge that pass with the pass that populates stacking_order and
"windows" can detach.
2022-04-29 13:46:49 +00:00
Vlad Zahorodnii
066ac3200a backends/libinput: Rework Device getter
libinput_device_get_user_data() can be used to get the associated Device
object with libinput_device. That way, we won't need to maintain a
private list of all input devices.
2022-04-29 12:47:34 +00:00
Vlad Zahorodnii
eb058a4a2a Merge ThumbnailItemBase and WindowThumbnailItem 2022-04-29 14:13:36 +03:00
Vlad Zahorodnii
953cf452a3 Implement DesktopThumbnailItem as a collection of window thumbnails
The main motivation behind this change is to refactor scene code in
order to allow us set WindowItem visibility upfront before compositing
starts.
2022-04-29 14:13:32 +03:00
Méven Car
96e82a3631 plasmawindowmanagement: Fix some warnings 2022-04-29 06:21:05 +00:00
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
Aleix Pol
7a279522a8 Provide an xdgactivationtest
Adds a test that has two windows and one activates the other.

There are two versions: qt5 and qt6.
The Qt 6 code is vastly different since Qt 6 knows about
xdg_activation_v1, so it makes sense to have both for now.
2022-04-27 23:14:29 +00: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
22e5c8a260 autotests: client -> window 2022-04-27 12:45:46 +00: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