Commit graph

6257 commits

Author SHA1 Message Date
Alexander Lohnau
82780effc1 Avoid Qt module incldues
This causes a longer compile time, because lots of unneeded files are
included. With https://invent.kde.org/sdk/clazy/-/merge_requests/91/
lots of false positives in the clazy check were resolved, this commit
takes care of the remaining places
2023-12-19 15:23:22 +00:00
Alexander Lohnau
3e5ae3b247 windowsrunner: Deduplicate/optimize strings 2023-12-19 15:23:22 +00:00
Alexander Lohnau
11d813625a windowsrunner: Reuse QVariantMap object 2023-12-19 15:23:22 +00:00
Alexander Lohnau
e3ab09dbd3 windowsrunner: Make dummy implementation of Action method inline 2023-12-19 15:23:22 +00:00
Vlad Zahorodnii
624da13e21 core: Specify explicit OutputTransform::Kind enum values
Some OutputTransform code assumes that Kind enums have specific values.
In order to ensure that that code doesn't break if the enums are reordered
or something, this change sets output transform enums to those explicit
values.
2023-12-19 17:08:13 +02:00
Vlad Zahorodnii
3a4eebddc9 core: Rework OutputTransform::combine()
The naive way to combine output transforms is not great, especially
because of the for loop.

The output transform kind enums have the following bit pattern:

- rotate-0:   000
- rotate-90:  001
- rotate-180: 010
- rotate-270: 011
- flip-0:     100
- flip-90:    101
- flip-180:   110
- flip-270:   111

`(rotate-a + rotate-b) & 0x3` can be used to combine two rotation
transforms. The rotatation is clockwise.

If the first transform is a flip transform, then we should rotate
counter-clockwise, i.e. `(rotate-a - rotate-b) & 0x3`.
2023-12-19 17:08:13 +02:00
Xaver Hugl
50346b6e37 core: Introduce OutputTransform::combine()
Co-authored-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
2023-12-19 17:08:13 +02:00
Yifan Zhu
bc73e14e68 tabbox: match Shift+Backtab against Shift+Tab
When users simultaneously press Shift and Tab, the keys are sometimes
registered as Shift+Tab, and sometimes as Shift+Backtab.
So we need to match received Shift+Tab against shortcuts containing
Shift+Backtab, and vice versa. Previously the code only checks for
the first case. This commit adds checks for the second case.

BUG: 438991
FIXED-IN: 6.0
2023-12-19 10:00:08 +00:00
Aleix Pol
a02545e8f5 glshadermanager: Fix nv12 shader for older versions of opengles
It wasn't compiling for PowerVR drivers.
2023-12-19 09:37:17 +00:00
Vlad Zahorodnii
c45ee91ab2 plugins/showpaint: Snap repaint region to the pixel grid 2023-12-19 11:00:30 +02:00
Vlad Zahorodnii
2e78ae2b6d core: Fix pixel grid snapping in RenderViewport
Our painting code is assumed to work as following: scale the geometry,
snap it to the pixel grid, apply the render transform, e.g. flip the
geometry vertically.

However, with QMatrix4x4 in RenderViewport, we have a slightly different
order: scale the geometry, apply the render transform, snap to the pixel
grid. It results in mapToRenderTarget() not properly mapping logical
geometry to the device geometry, which later manifests as glitches.

BUG: 477455
2023-12-19 11:00:30 +02:00
Stefan Hoffmeister
44419d832d Decrease log level of reporting choosing backend
Automatic backend selection is a very normal by-design activity that warrants informing. Decrease from log level Warning to Info to avoid spoiling the log at too high of a log priority.
2023-12-19 08:43:36 +00:00
Vlad Zahorodnii
c5124a1daf core: Document what each OutputTransform does
Flipped transforms are very confusing because the order of mirroring and
rotatation transforms matters in some cases.
2023-12-19 08:13:58 +00:00
Vlad Zahorodnii
08d2ec835d Install more headers 2023-12-19 07:44:37 +00:00
Vlad Zahorodnii
b476d7f4c0 plugins/screentransform: Stop tracking disabled outputs
If an output is disabled, the Output object will be kept alive. That
means that the aboutToChange connection will be kept.

If the output is enabled again and its transform changes, its contents
will be captured more than once.

In order to fix, the screentransform plugin has to break the
aboutToChange connection.
2023-12-18 22:40:12 +00:00
Vlad Zahorodnii
1f5fb58d23 plugins/screentransform: Don't preemptively cancel screen animation
If two output configurations are applied consecutively, the screen
rotation animation may be cancelled too early.
2023-12-18 22:40:12 +00:00
Vlad Zahorodnii
bd5c566399 plugins/screentransform: Avoid mangling with opengl context when a screen is removed
For the most part, the screen transform effect is inactive. So if a
screen is removed, it's likely that m_states contains no entry for it.
2023-12-18 22:40:12 +00:00
Vlad Zahorodnii
e894f694ce plugins/screentransform: Avoid needlessly capturing screen contents
If the output configuration doesn't touch the output transform,
capturing the previous screen contents is pointless.

I believe the main reason why the screen transform operates this way is
because it couldn't access OutputConfiguration before.
2023-12-18 22:40:12 +00:00
Kai Uwe Broulik
699bdda60a plugins/windowsystem: Implement new virtuals
For XDG foreign support. No-ops.
2023-12-18 18:46:42 +00:00
Vlad Zahorodnii
4283ba00c6 scene: Snap DecorationItem texture coords to the pixel grid
Do the same what the SurfaceItem does.
2023-12-18 15:05:43 +00:00
Stefan Hoffmeister
3887542240 backends/drm: Detect mode content change instead of comparing mode pointers
This fixes Plasma Desktop / kwin resizing problems at least for virtual
machines running off the vmwgfx Linux kernel driver

BUG: 477985
2023-12-18 14:23:27 +00:00
Xaver Hugl
51ff2e4c32 backends/drm: do glFinish after rendering on NVidia
Polling the dmabuf for readability doesn't appear to work on NVidia and
we're no longer using an egl surface where the driver does this for us,
so we need to explicitly wait for rendering to complete or there are glitches
on the output
2023-12-14 22:41:57 +00:00
Arjen Hiemstra
0ff4f84ace plugins/overview: Replace OpacityMask with ShadowedTexture
The OpacityMask is used purely for rounding the corners. We can get rid
of it by using ShadowedTexture which does the same thing while also
drawing the shadow, meaning we can also eliminate the ShadowedRectangle.
2023-12-14 13:44:28 +00:00
l10n daemon script
510e776e80 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"
2023-12-14 02:06:54 +00:00
Vlad Zahorodnii
3663453c7d scene: Freeze SurfaceItem tree when the Window is closed
If the wl_surface is unmapped, the compositor should unmap the window.
Most clients don't do it, and instead destroy the wl_surface or the
surface role object or both. A very tiny fraction of clients actually
close the window by unmapping the wl_surface. Either way, it's worth
handling that case because xdg-shell protocol says that the clients are
allowed to do it.

BUG: 478297
2023-12-13 15:06:45 +02:00
David Edmundson
5dc16fc614 x11: Avoid calls to workspace in OverlayWindow and sync GLX and EGL paths
OverlayWindow had different paths for GLX and EGL when it came to
managing size. On EGL the initial size comes from the overlay resizing
to workspace, but future updates were explicitly handled by the backend.
On GLX the backend tracked changes, but then it was the overlay's job to
resize but using a different method.

This patch also prevents use of workspace after destruction fixing
kwin_x11 --replace.
2023-12-13 09:33:31 +00:00
Vlad Zahorodnii
76fbea704a plugins/slidingpopups: Cancel animations when screen is locked/unlocked
BUG: 412104
2023-12-13 08:19:40 +00:00
Vlad Zahorodnii
ef2c4e201e plugins/overview: Load milou on demand
Milou.ResultsView loads runners regardless whether the query string is
empty. It's not clear what milou should do. There are valid arguments
both in favor and against preloading runners.

This change puts Milou.ResultsView behind a Loader so milou is loaded
when it's actually needed and not when starting overview.

CCBUG: 455780
2023-12-12 15:21:23 +00:00
Niccolò Venerandi
667b95e240 Make window captions in Overview 2 lines at most
Captions are set to elide with ElideRight, which does allow for multi-line captions.
However, this means that the height of the captions depends on their width (since a shorter
width results in more lines), and the width of the captions depends on the size of the
window thumbnail, which depends on the height of the caption to be positioned. If the
caption is really long, this can cause visual glitches. Having a maximum line value avoids that.

BUG: 477103
2023-12-12 13:55:41 +00:00
l10n daemon script
47e7f6e06a 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"
2023-12-12 02:09:54 +00:00
Xaver Hugl
6f06bf1989 plugins/invert: support color management
To do this, this commit adds infrastructure to include glsl files,
extracts all the color management functions and uniforms into such a
file, and makes use of it in the invert effect

BUG: 443148
2023-12-11 22:46:27 +01:00
Xaver Hugl
8f7772da2e backends/drm: don't wait for pending pageflips on gpu hotunplug
The pageflip event may never arrive, as the GPU to trigger it is gone. It
also doesn't make a difference, as the GPU is unaccessible anyways, so
KWin can't affect the relevant output(s) anymore
2023-12-11 19:44:42 +00:00
Xaver Hugl
ef0c07d03a backends/drm: unify legacy and atomic modesetting code paths a bit 2023-12-11 19:44:42 +00:00
Xaver Hugl
d228dc173a xdgshellwindow: make maxSize always >= minSize by enforcing the same minimum
BUG: 478269
2023-12-11 18:07:13 +01:00
Xaver Hugl
63c71d9e56 wayland/xdgshell: enforce invalid_size errors
If the client sets invalid min or max size, that can cause some code in KWin
to assert. To ensure that doesn't happen, enforce that the minimum size is
always at most as big as the maximum.

CCBUG: 478269
2023-12-11 14:44:27 +01:00
l10n daemon script
d8c1022049 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"
2023-12-11 02:06:41 +00:00
Xaver Hugl
19672bc82f opengl/glshadermanager: fix version check for desktop gl
Apparently mix with bvec is only supported with glsl 1.30 on desktop gl
too
2023-12-10 04:29:51 +01:00
l10n daemon script
682d578093 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"
2023-12-10 02:30:44 +00:00
David Edmundson
5d922742fa Avoid additional FBO rendering the blurred background
WindowThumbnails are image providers meaning it can provide textures
directly to ShaderEffects

layer.enabled is effectively a ShaderEffectSource meaning we render our
single desktop background item into an offscreen texture to ultimately
contain our desktop background.

We can cut out the middle-man and use the DesktopBackground as a source
directly saving a massive texture being generated.
2023-12-09 12:43:55 +00:00
l10n daemon script
5805c047a8 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"
2023-12-09 02:07:58 +00:00
Xaver Hugl
4be57d78e9 opengl/glshadermanager: check opengl instead of glsl version
Whether or not mix with bvec is supported depends on the OpenGL version and
not on the glsl version
2023-12-08 20:06:30 +00:00
Xaver Hugl
5734342f9f plugins/zoom: disable acessibility integration on Wayland
It causes hangs, and thus doesn't actually help with accessibility but makes
it worse. Until that's fixed, it needs to stay disabled

BUG: 450940
2023-12-08 19:27:08 +00:00
Xaver Hugl
50899f3f34 backends/drm: work around atomic commits failing with NVidia
For some reason, when IN_FENCE_FD is set, the NVidia driver rejects the
commit. Until that's fixed in the driver, don't set the property

BUG: 478246
2023-12-08 16:27:24 +01:00
Vlad Zahorodnii
eb13085de2 plugins/overview: Load screen delegate asynchronously
The compilation step still takes a significant amount of time on the
first launch. On my machine, it's around 1s. Even if it happens just
once, freezing the session for 1 second is not great.

This change makes the overview effect load main.qml asynchronously
when plasma session starts. By the time the session is loaded, it should
be ready.

CCBUG: 455780
2023-12-08 13:40:53 +00:00
Vlad Zahorodnii
f1ff706b3b scripting: Cache WindowThumbnail textures
Effects like overview can create more than one thumbnail for the same
window. For example, if you have 4 virtual desktops, the overview is
going to create 9 window thumbnails for the desktop background, which in
its turn means that each thumbnail is going to have its own texture.
That's not great.

WindowThumbnailItem.sourceSize has been dropped because it's unused and
will complicate texture caching.

CCBUG: 455780
2023-12-08 10:21:20 +00:00
Vlad Zahorodnii
acd743f672 plugins/shakecursor: Avoid abrupt transition to 1x magnification
When the pointer moves, the shake cursor effect will either update the
cursor magnification or reset the magnification.

At the moment magnification is reset immediately, which doesn't look
if the pointer moves before the reset scale animation finishes.
2023-12-08 07:12:52 +00:00
Ismael Asensio
8b54372160 kcms/rules: Fix section header width
It is now necessary to explicitly set the ListSectionHeader width
as it inherits from ItemDelegate
2023-12-07 19:39:04 +01:00
Nate Graham
d3ece17dde kcms/rules: clip rules popup's list view
Otherwise it escapes!

BUG: 478170
2023-12-07 10:30:19 -07:00
Vlad Zahorodnii
8e2d0a3d7e Load close button in WindowHeapDelegate on demand
Most windows are typically not hovered, so we don't need to create
a Button for every one of them.
2023-12-07 15:45:09 +00:00
Vlad Zahorodnii
71dd6bac78 tabbox/switchers/thumbnail_grid: Fix sync'ing currentIndex
The task switcher doesn't initialize thumbnailGridView.currentIndex
properly after the Plasma.Dialog has been just created.
2023-12-07 15:26:09 +00:00
Vlad Zahorodnii
ee24a44cc4 tabbox/switchers/thumbnail_grid: Load Plasma.Dialog on demand
This avoids keeping old and creating new window thumbnails after the task
switcher is hidden.
2023-12-07 15:26:09 +00:00
Vlad Zahorodnii
a7987f5a33 Change window highlight style in WindowHeapDelegate
Currently FrameSvgItem is used to highlight selected or hovered windows.
But the problem with it is that it's a bit heavyweight. As a way around
it, we could put it in a Loader, but that's going to be bring a set of
other challenges.

As an alternative solution, this change replaces FrameSvgItem with a
simple outline. It still produces decent visuals and it's simpler.
2023-12-07 15:02:01 +00:00
Xaver Hugl
4ad5670ddf backends/drm: set dma-fence deadlines if available
This tells the kernel when a buffer should be done rendering, which allows
it to for example increase GPU clocks in order to hopefully hit our deadlines.
That in turn should reduce the amount of dropped frames

CCBUG: 452119
2023-12-07 13:17:58 +00:00
Vlad Zahorodnii
1cd1047eba scripting: Don't block client until acquire fence is signaled in WindowThumbnailItem
We just need to ensure that qtquick rendering commands don't use the
window thumbnail until it's ready. The CPU can continue executing its
commands.
2023-12-07 12:29:37 +02:00
Vlad Zahorodnii
e89916a6ba Assign top-left screen corner to overview by default 2023-12-07 06:31:56 +00:00
Xaver Hugl
b76c793d95 opengl/glshadermanager: work around GLES2 not supporting mix with bvec
BUG: 478144
2023-12-06 23:22:09 +00:00
Vlad Zahorodnii
1729dee3ef plugins/overview: Make transition between overview-grid modes longer
Otherwise it's barely visible.
2023-12-06 17:40:30 +00:00
Ismael Asensio
a26e66be4b kcms: Port away from SwipeListItem to ItemDelegate
Let's port the remaining uses to the upstream simpler alternative
`ItemDelegate`, which provides a consistent styling and fixes some
issues such as the background and highlighting.

This affects the rules, efects and virtual desktops KCMs.
2023-12-06 17:26:53 +01:00
Marco Martin
022214e411 Less concurrent animations
Overview was trying always to animate the opening with 2 animations at the same moment:

* the transition from initial to active in WindowHeapDelegate
* the animation on the partialactivationfactor was always ran, partial or not

this resulted in jankier animations than they could be.

now base only on partialanimationfactor, so we a re sure there is one single way to trigger the effect
2023-12-06 16:04:13 +00:00
Ismael Asensio
c16a5e355f kcm/rules: Fix OverlaySheet shadow coverage
Do not reparent the OverlaySheet's parent and let it be the
whole page, so that the shadow darkening also covers the empty
space below the view and the placeholder message

BUG: 477963
FIXED-IN: 5.91.0 (Beta2)
2023-12-06 15:41:20 +00:00
Aleix Pol Gonzalez
0527d301dd Address licence of plugin.h
The rest of the project is GPLv2, this one is GPLv3 for no apparent
reason. Even the .cpp file is GPLv2.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
2023-12-06 15:49:00 +01:00
Vlad Zahorodnii
6eca078db9 Fix "Drag down to close" label visibility
It's visible by default but has 0 opacity, which results in unnecessary
relayouting. The opacity is vice versa as well.
2023-12-06 14:19:58 +00:00
Aleix Pol Gonzalez
62b379ea55 backends/drm: Fix build with older kernels
DMA_BUF_IOCTL_EXPORT_SYNC_FILE was only included some time ago in the
kernel.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
2023-12-06 14:06:15 +01:00
David Edmundson
25f4732764 effects/overview: Avoid relaying text during animation
There is a window title beneat the stock WindowHeapDelegate. The label
was bound to the size of the window, but because this animates our label
resizes every frame too.

Given the label is only at full opacity when the window is filling the
ExpoCell, we can set the width of our label to that directly.

This looks less glitchy as we don't change wrapping during animation,
but also should have a noticable performance impact as we avoid
re-laying out multiple times.
2023-12-06 10:55:54 +00:00
Xaver Hugl
f3aaede382 backends/drm: properly handle neither CTM and gamma being supported
Instead of hardcoding only NVidia, try to use CTM and GAMMA_LUT before falling
back to the shader path. This way it also works on other GPUs that lack
color management hardware, and only falls back to the color management path
on older NVidia drivers.

This commit also ensures that the color management hardware is set properly
after toggling color management on and off again, and simplifies ColorDevice
to only deal with rgb factors instead of always calculating luts. This should
improve performance of night color animations on hardware where CTMs are
supported

CCBUG: 453701
2023-12-06 10:32:49 +01:00
Xaver Hugl
4ec8430a4b backends/drm: fix vrr being wrongly assumed disabled with cursor movement 2023-12-06 08:34:55 +01:00
Xaver Hugl
120d141501 backends/drm: use sync files for checking buffer readiness and use IN_FENCE_FD
This shouldn't change anything in practice, but with some badly behaving
drivers it can prevent oversynchronization.
2023-12-06 08:34:55 +01:00
l10n daemon script
520ead8f9e 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"
2023-12-06 02:10:37 +00:00
Vlad Zahorodnii
b01b626ca8 x11: Fix MouseButtonPress events sent to decoration
ButtonPressEvent::state includes keys and buttons prior to the button
press has been generated.

On the other hand, it appears that QMouseEvent::buttons() should include
currently pressed buttons, i.e. the button that has been just pressed
should be in that bitfield.

This is important for QQuickDeliveryAgent, which checks
QMouseEvent::button() and QMouseEvent::buttons() to decide whether to
send the button event only to tap handlers or both tap handlers and
mouse areas.

BUG: 476653
2023-12-05 22:04:10 +00:00
Xaver Hugl
7c8036efef core/colorspace: fix mapTo method and support PQ with it
BUG: 477799
2023-12-05 18:28:23 +00:00
Xaver Hugl
ab48621758 plugins/magnifier: use floating point offscreen texture
With color management, everything would get clamped to 1 nit otherwise.

BUG: 477841
2023-12-05 17:56:27 +00:00
Rafał Szalecki
3dc8b937ba Add missing whitespace in magiclamp config 2023-12-05 16:00:00 +00:00
Xaver Hugl
7fdf0fb792 backends/drm: support atomic modesetting in virtual machines
With kernel 6.6+, HOTSPOT_X and HOTSPOT_Y are exposed on the cursor plane
in virtual machines, so the fallback to the legacy API is no longer needed.
At some point in the future, the list of virtual machine drivers can be
dropped entirely.
2023-12-05 15:39:03 +00:00
Vlad Zahorodnii
57e2afaec1 plugins/shakecursor: Add descale animation 2023-12-05 15:19:29 +00:00
Vlad Zahorodnii
0a5bd7397b plugins/shakecursor: Make it easier to build up magnification 2023-12-05 15:19:29 +00:00
Vlad Zahorodnii
494e4a07f2 plugins/shakecursor: Don't trigger for cursor pushback
The shake detector is mistriggered by sporadic pointer movement when the
cursor is pushed back by a screen edge.

As a way to prevent it, this change adds a bounding rectangle
constraint. The cursor will move chaotically within a small bounding
rectangle if it's pushed back. So it should be enough to just check
the length of the diagonal.
2023-12-05 08:50:03 +00:00
l10n daemon script
e4c979c578 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"
2023-12-05 02:05:58 +00:00
Yifan Zhu
c441ce5cd1 Avoid accidental mixing of qreal and int
The code for placeSmart uses ints to store coordinates and dimensions,
but the various methods of QRectF return qreal types, which can be
non-integers under fractional scaling, causing multiple issues.

This commit explicitly converts the needed quantities to ints,
avoiding the issues.

Previously, the code relied on the assumption that
y = area.y() + area.height(); implies !(y < area.y() + area.height()).
This doesn't always hold when mixing qreals and ints, causing infinite loops
under fractional scaling when attempting to open large windows, as
reported in BUG 477820.

This commit also extends the fix in 5502ce9 to fractional scaling scenarios.
The ceiling of client widths and height is used, instead of the implicit
floor, which caused BUG 477886.

BUG: 477820
BUG: 477886
2023-12-04 08:59:58 -08:00
Nate Graham
e28ec8ada1 kcms/screenedges: fix defaults indicator for "remain active" checkbox
The initial value was being initialized to true despite the setting
being off by default, and the default checker was highlighting when it
was false, not when it was true.

BUG: 477329
FIXED-IN: 6.0
2023-12-04 14:58:25 +00:00
l10n daemon script
5b4dce93e3 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"
2023-12-04 02:08:23 +00:00
l10n daemon script
ad07733e18 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"
2023-12-03 02:07:06 +00:00
l10n daemon script
6a494f9364 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"
2023-12-02 02:07:11 +00:00
Bharadwaj Raju
e5753ea336 Make autohide screen edges use the same activation delay setting as other edges
Makes it possible to easily target things in a window near your panel edge,
without bringing up your panel.

The `m_client` condition this MR removes appears to have been added solely to make autohiding panels appear instantly. See c4140d6f4e.

BUG: 267277
2023-12-01 08:09:35 +00:00
l10n daemon script
0468860b0d 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"
2023-12-01 02:08:56 +00:00
Vlad Zahorodnii
f5f343d33e opengl: Drop scale arg in GLTexture::render()
It makes the API confusing and in many places, the target size is
already in device pixels.
2023-11-30 13:55:55 +00:00
Kai Uwe Broulik
cecd630b2e wayland/xdgforeign_v2: Create UUID without braces
They can be annoyin to type on the terminal, requiring escaping and what not.
The protocol doesn't specify the format, so we can just drop them.
2023-11-30 13:17:08 +00:00
l10n daemon script
2ad4bb6de3 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"
2023-11-30 02:05:05 +00:00
Vlad Zahorodnii
7787920277 cmake: Improve readability
Indent target_link_libraries of kwin to improve code readability. As is,
PUBLIC and PRIVATE blend with target names and therefore they are harder
to spot.
2023-11-29 14:21:36 +00:00
l10n daemon script
2b29e702dc 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"
2023-11-29 14:10:58 +00:00
Vlad Zahorodnii
5e90452d08 Add more closed window checks
The stack contains closed windows, so we need to guard against them.

BUG: 475423
2023-11-29 13:56:07 +00:00
Vlad Zahorodnii
c0b387bf5e backends: Drop waylandServer dependency
Backends dependending on the wayland server is not great, it makes them
less reusable and creates a strict instantion order that doesn't fully
make sense.
2023-11-29 13:31:47 +00:00
Vlad Zahorodnii
19c6425607 plugins/screencast: Use bilinear min/mag filter
Use GL_LINEAR so region screencasts look nicer when the output content
is magnified or minified.
2023-11-29 13:16:54 +00:00
Vlad Zahorodnii
6f7e06bf9e plugins/screencast: Clean up embedded cursor painting code
The MVP uniform is set twice, in addition to that, the cursor size is
scaled more than once.
2023-11-29 13:16:54 +00:00
Vlad Zahorodnii
40dbe9eb66 plugins/startupfeedback: Fix glitches with fractional scaling
Snap the bouncy icon to the pixel grid and if necessary stretch it.
2023-11-29 08:04:51 +00:00
Timothy Bautista
a25ae5261d plugins/morphingpopups: add easing curves
This makes the motion of the effect more consistent with other
window-related effects, which typically also use some form of a
cubic curve.
2023-11-29 07:47:12 +00:00
Yevhen Popok
0b1bc516e3 plugins/magnifier: Add missing "Zoom In" alt. shortcut
Make the "Magnifier" and "Zoom" effects use the same shortcuts for "Zoom In"
2023-11-29 07:27:39 +00:00
Yevhen Popok
0f31ab89c8 plugins/zoom: Add missing "Zoom In" default alt. shortcut 2023-11-29 07:27:39 +00:00
Vlad Zahorodnii
5ba0d2c933 plugins/screencast: Simplify OutputScreenCastSource::render()
The texture size is already in device pixels.
2023-11-29 07:15:35 +00:00
l10n daemon script
c8122e4cd5 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"
2023-11-29 02:08:23 +00:00
David Edmundson
d18db74d5f XWayland: no forwarding with Shift keys
The shift key doesn't make sense to be one of the keys that will trigger
KWin to allow XWayland apps to process all keys when it's pressed,
because there aren't generally global shortcuts that consist of Shift
plus an alphanumeric character key. That's because this key combination
is used to type capital letters.

So we can safely exclude the shift key to improve security against key logging and not break any global
shortcut-using XWayland apps for people using this feature.

The shift key on it's own is still forwarded as that's a non-character key.
2023-11-28 20:10:37 +00:00
Vlad Zahorodnii
831064f351 plugins: Add shakecursor plugin
This plugin helps you locate the cursor by enlarging it when the pointer
is quickly moved back and forth.

BUG: 432927
2023-11-28 16:36:26 +00:00
Vlad Zahorodnii
5696081cf7 plugins/startupfeedback: Add hidpi support on wayland 2023-11-28 18:18:16 +02:00
Vlad Zahorodnii
7233616c2c plugins/startupfeedback: Fix bouncing icon being too small on wayland
We need to be careful about the target rect when painting a hidpi image
onto a lodpi image.

This is the case when the startup feedback generates bouncing frames.
The icon pixmap may be hidpi, while the result image has device pixel
ratio 1.
2023-11-28 16:06:33 +00:00
Vlad Zahorodnii
784d48ef52 Port away from deprecated KConfigBase::group() api 2023-11-28 10:02:03 +00:00
Vlad Zahorodnii
c8d4f26a9f plugins/screencast: Fix hidpi region screencasting
Currently hidpi region screencasting is broken because output textures
are inappropriately scaled.

The orthographic projection is set up with logical pixels, but the
remaining rendering code uses "1 / m_scale" scale factor, which is wrong.

In order to fix hidpi and also simplify rendering logic, this change
makes rendering code use logical coordinate system. It's okay to do in
screencasting because we don't need to worry about snapping to the pixel
grid.

BUG: 476858
BUG: 476859
2023-11-28 08:52:12 +00:00
David Redondo
ff76c8581d Do not wait for timer if there are no open windows
If there were no open windows KWin would wait until the timer ran
out and return false signifying that some windows didnt close.
BUG:477573
FIXED-IN:6.0
2023-11-28 09:08:47 +01:00
Aleix Pol Gonzalez
b853de3d29 Allow building KWin without KGlobalAccel
Signed-off-by: Falko Becker <falko.becker@mbition.io>
2023-11-27 17:07:28 +01:00
Aleix Pol Gonzalez
25a976e559 Fix build Reduced kwin
GuiPrivate is also needed for the OffScreenQuickView

Signed-off-by: Falko Becker <falko.becker@mbition.io>
2023-11-27 17:07:28 +01:00
Doğukan Korkmaztürk
d4103fa9c1 backends/drm: Support hardware cursors on NVidia GPUs
This change enables the use of HW cursors on Nvidia GPUs. The problem
with the current approach is that the cursor plane requires a linear
buffer to be attached on the Nvidia hardware. However, Nvidia GPUs
cannot render to a linear texture, this is why DRM_FORMAT_MOD_LINEAR is
marked as "external only" when the supported modifiers are queried by
eglQueryDmaBufModifiersEXT(). Since the EGL render backend in KWin
cannot find a common DRM format modifier between what the cursor plane
needs and what the GPU can render to, it falls back to the SW cursor
implementation.

With this change, when the EGL renderer detects that a plane only
supports linear buffers but rendering directly to a linear buffer is not
possible, it copies the rendered content into a linear dumb buffer, and
attaches that buffer to the plane instead of using the rendered buffer
directly.
2023-11-27 10:47:12 -05:00
Kai Uwe Broulik
7bd9ae8d0b helpers/killer: Modernize UI
This overhauls the kill prompt UI to make it more modern and more
easily to grasp.

* Reduce the amount of text and redundancy.
  Give the window a title and drop the "app is not responding" heading.
  Try to remove the application name from the displayed window title.
  Also use the bold emphasis used in other places like deleting files.

* Use the application icon if available with a warning overlay.
  This makes it easier to grasp which application it's talking about.

* Move technical information (like PID and hostname) into an
  expandable "Details" section.

KGuiAddons has been implicitly pulled in by KConfigWidgets already.
2023-11-27 14:10:15 +00:00
Kai Uwe Broulik
5c96c38e39 Support kill prompt for XdgTopLevelWindows
Instead of killing the window without asking, show the kill prompt
like it's done for X11 windows.

The window in question is exported through XDG foreign so the kill
helper can parent itself to it, and an activation token is also provided.

Also, the more contemporary desktop file name is now used for
identification rather than window class.

A no-display desktop file is installed for the kill helper so that it
can get a proper window icon and suppress startup notification.
2023-11-27 14:10:15 +00:00
Kai Uwe Broulik
9b7718459e xdgforeign: Allow exporting surfaces internally
Without a client asking for it. This way we can send a surface
to another helper application, such as the window killer.

An ExportedSurface wrapper class is introduced which represents
an exported surface in a windowing-system independent way.
2023-11-27 14:10:15 +00:00
Kai Uwe Broulik
2b868edb9e xdgshell: Use killPingTimeout option
This makes it consistent with the timeout used on X11.

The current ping timeout was also generally quite short, causing apps
to desaturate for brief moments when they were busy e.g. starting up
or loading large files.
2023-11-27 14:10:15 +00:00
Kai Uwe Broulik
28c1545beb wayland_server: Initialize integrations in initWorkspace
At this point KWin options are available.
2023-11-27 14:10:15 +00:00
Kai Uwe Broulik
214e471a50 Introduce KillPrompt class
This encapsulates running and querying for the killer helper
and allows to more easily re-use it for Wayland windows.
2023-11-27 14:10:15 +00:00
Natalie Clarius
99ff31d3ab plugins/nightcolor: fix wrong changed property insert in DBus interface
BUG: 477482
2023-11-26 11:49:12 +00:00
l10n daemon script
bc957af28e 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"
2023-11-26 02:31:49 +00:00
Kai Uwe Broulik
41659956e7 kcms/rules: Add tooltip when rule name is elided 2023-11-25 19:24:09 +01:00
Xaver Hugl
301e95b07c backends/drm: unset GAMMA_LUT and CTM when enabling color management
BUG: 477430
2023-11-24 20:50:55 +00:00
Xaver Hugl
673cb16f15 utils: move drm format list to a cpp file
Makes compilation a little bit faster and removes warnings about the unused
function in some files
2023-11-24 16:14:07 +01:00
Vlad Zahorodnii
3ffa3ed0d8 tabbox: Guard against including closed windows when using stacking order
Closed windows are present in the stack. If user has selected
"Stacking order" sort order in task switcher KCM, we need to guard
against closed windows in the stack.
2023-11-24 10:39:46 +02:00
Vlad Zahorodnii
b40b13b661 tabbox: Fix ClientModel::createClientList() reinserting closed windows 2023-11-24 10:39:46 +02:00
Vlad Zahorodnii
4d0d153a57 Always reset tabbox ClientModel if a window is added or removed
Otherwise dangling pointers can end up in TabBox::ClientModel. Tabbox is
written with hard model resets in mind. In order to fix it, the client
model has to be rewritten.

BUG: 477166
2023-11-24 10:39:27 +02:00
Vlad Zahorodnii
f3e6d3ca19 Ignore decoration changes of closed windows
Ideally the decoration of a closed window should not change. However,
it seems like it can happen when resuming the session.

When switching to another VT, the touchpad input device is removed, but
the touch input device is still kept on my machine. This results in
the tablet mode changing temporarily and triggering recalculation of new
borders in breeze decoration. It's a no-no thing to do if the window is
closed. We need to guard against this case. But in long term, we need to
reroute all decoration state updates through kwin so it can block state
updates when the window is closed. It's also needed for double buffered
state.

How to improve handling of tablet mode detection when switching between
VTs needs a separate investigation.

CCBUG: 477166
2023-11-24 10:35:33 +02:00
Nicolas Fella
8ec88aa3bf Adjust to renamed activities libraries 2023-11-23 21:48:01 +01:00
Jonathan Esk-Riddell
cc4eac4c85 Port to renamed kwayland
https://invent.kde.org/plasma/kwayland/-/merge_requests/107  use renamed kwayland
2023-11-23 19:34:24 +00:00
Xaver Hugl
9e03a219cb platformsupport/scenes/opengl: don't crash when creating the texture fails 2023-11-23 18:46:03 +00:00
Xaver Hugl
985f0edf88 platformsupport/scenes/openglbackend: increase GPU reset timeout again
Apparently it can take a while in some cases, so this commit increases the
timeout to 10s
2023-11-23 17:36:41 +01:00
Vlad Zahorodnii
477102f6bc Fix build with qt dev 2023-11-23 14:27:39 +00:00
Xaver Hugl
593be99207 backends/drm: clear format list before parsing IN_FORMATS property
Otherwise we add the same modifiers every time the properties get updated,
which bloats the list and reduces performance over time
2023-11-23 14:03:03 +00:00
Xaver Hugl
8408dcfad0 core/colorspace: use gamma22 for sRGB content
sRGB content is made to be encoded with the sRGB piece-wise transfer function,
and to be decoded by displays with the gamma 2.2 transfer function.
When KWin has a display in sRGB mode, this doesn't make a difference - it
decodes with sRGB and encodes with sRGB, so there's effectively no transformation.
When the display is in PQ mode though, KWin uses the sRGB inverse EOTF for
decoding sRGB content, but not the sRGB EOTF for encoding it again.

To fix this, this commit changes KWin to use the gamma 2.2 EOTF and inverse
EOTF for untagged content. That's not technically correct for sRGB screenshots,
where we'd have to use the piecewise sRGB EOTF, but that's a problem that
can be solved in the future.
2023-11-23 13:13:30 +00:00
Nicolas Fella
e7942c3485 Implement bounce keys on Wayland
Bouce keys suppresses additional key presses during a given interval

This is used by people with motor impairments or bad keyboards

It works by remembering the last input timestamp for a key

If an event's timestamp is too close to the last timestamp for that key the event is rejected

BUG: 474752
2023-11-23 13:07:35 +00:00
Jarek Janik
6573275be6 Workspace::raiseWindow: fix order of transients
Place transients of window being raised in correct order when moving
them within unconstrained_stacking_order list; this way we don't have to
reorder them each time we call constrainedStackingOrder() later on.
Workspace::lowerWindow() already does it correctly.
2023-11-23 09:53:55 +00:00
Nicolas Fella
d4127d07fd Implement locking sticky keys on Wayland
When pressing a latched modifier a second time lock it

When pressing a locked modifier release it

BUG: 464452
2023-11-23 08:17:00 +00:00
Vlad Zahorodnii
beb2643143 backends/wayland: Throttle configure events
Output resizing is a resource intensive task so throttle it to keep
nested kwin_wayland responsive when it's resized.
2023-11-22 21:40:52 +02:00
David Edmundson
e52163d405 Drop DockLayer concept
With LayerShell all docks were in the above layer to match with the
semantics of the specification. Under X11 our main panel was also in the
above layer by setting the keep above flag.

The only thing that ended up in the dock layer were wayland applet
popups, and that was mostly by accident. When they get a transient
parent fixed they'll end up in the AboveLayer anyway so we should drop
it now to reduce complications.

This fixes a bug where applet popups could go under the panel.

BUG: 465354
2023-11-22 16:13:17 +00:00
Vlad Zahorodnii
a01a11fc35 wayland: Reset SurfaceInterface::primaryOutput when the output is removed
CCBUG: 477325
2023-11-22 14:42:59 +00:00
Vlad Zahorodnii
1f32d01a49 Guard against null Group in EffectWindow::group()
Closed windows don't belong to any group.

BUG: 476827
2023-11-22 13:05:54 +02:00
Vlad Zahorodnii
15b8fbe604 Preserve relative order of transient siblings
If a constraint indicates that window A must be below window B but it's
not the case at the moment, the workspace will move window A right after
window B.

This can invert the relative order of transient siblings, for example
let's say that there are three constraints

- A <- B (window A must be below window B)
- A <- C
- A <- D

and the unconstrained stacking order looks as follows: [B, C, D, A]. The
final constrained stacking order is expected to look as [A, B, C, D],
but currently it's [A, D, C, B] instead:

- starting stacking order: [B, C, D, A]
- apply A <- B constraint: [C, D, A, B]
- apply A <- C constraint: [D, A, C, B]
- apply A <- D constraint: [A, D, C, B]

In order to fix this issue, this patch makes the workspace traverse the
constraint graph in the reverse order. In addition to that, it ensures
that the relative order of transient siblings in unconstrained stacking
order is preserved in the constrained one.

BUG: 477262
2023-11-21 19:26:05 +00:00
Vlad Zahorodnii
41df430aa8 plugins/screentransform: Properly exclude itself from previous screen capture 2023-11-21 19:11:44 +00:00
Vlad Zahorodnii
57ff600c98 plugins/screentransform: Use Output::pixelSize()
It's more accurate than `size * scale`.
2023-11-21 19:11:44 +00:00
Vlad Zahorodnii
b8f2f87672 plugins/screentransform: Drop m_captured flag
It's redundant now. If there's an entry in m_states dictionary for the
given screen, then there's also a valid captured previous frame.
2023-11-21 19:11:44 +00:00
Vlad Zahorodnii
62f904b698 Drop EffectsHandler::renderScreen()
It's no longer relevant after merging libkwin and libkwineffects. By
dropping EffectsHandler::renderScreen() and making the screen transform
use the Scene API directly, we can clean up some OpenGL context handling
code.
2023-11-21 19:11:44 +00:00
Vlad Zahorodnii
6a997b41ae Fix screen becoming black when its geometry changes while overview is active
Offscreen quick views are repainted in the pre paint step because that
requires a QOpenGLContext and we don't want it to mess with kwin's
opengl context. After a view is updated, its QOpenGLContext is going to
be unbound.

During normal operation mode, it works as expected:

- the view gets updated in the pre paint stage
- kwin opengl context is made current when starting the paint stage
- the offscreen view is painted on the screen

However, effects->renderScreen() has no such separation. The OpenGL
context changes from the pre paint stage will leak to the paint stage.
So we have

- the workspace notifies that the screens have changed
- the screen transform effect sees that, makes opengl context current
  and renders the screen
- the offscreen quick view is updated and after OffscreenQuickView
  is done, it's going to call QOpenGLContext::doneCurrent()
- effects->renderScreen() calls m_scene->paint()
- since there's no current opengl context, vbo allocation in
  GLTexture::render() will fail and nothing will be rendered on the
  screen

As a way around it, this change adds a makeOpenGLContextCurrent() call
before the paint stage. It doesn't quite belong there, the opengl
context has to be made current in the paint stage, e.g. by the
ItemRenderer or something. But atm we have no good place where we
could stick it in.

BUG: 477027
2023-11-21 19:11:44 +00:00
Aleix Pol
4540925f3f Remove unnecessary variable 2023-11-21 18:52:40 +00:00
Aleix Pol
97e75c858a nv12: Remove unnecessary debug
Forgot to remove it before merging the patch
2023-11-21 18:52:40 +00:00
Xaver Hugl
008e5e5a10 workspace: reduce placeholder output size
Maximized windows get resized to this when the last output gets removed, which
can increase VRAM load unnecessarily. As the placement tracker resizes windows
back to their original size, we can reduce the size of the placeholder output
without causing additional issues
2023-11-21 18:36:29 +00:00
Vlad Zahorodnii
2ff0fc26a4 Merge EffectWindow::{windowMinimized,windowUnminimized}
The main motivation is to match the Window API.
2023-11-21 18:20:02 +00:00
Xaver Hugl
017b4019b6 outputconfigurationstore: don't generate configs that disable all outputs 2023-11-21 18:38:05 +01:00
Xaver Hugl
3c25474b41 outputconfigurationstore: ensure that the config doesn't turn off all outputs 2023-11-21 18:08:01 +01:00
Kai Uwe Broulik
75935c126c layershellv1window: Check isDeleted before activating it
Opening the user actions menu causes auto-hiding layer-shell windows
(such as Kickoff, KRunner) to hide, closing the menu and having KWin
transfer focus back to the window which is now half-destroyed.

XdgToplevelWindow::acceptsFocus() also checks for isDeleted().
2023-11-21 16:13:06 +00:00
Xaver Hugl
ae884dd19e backends/drm: add brightness metadata overrides and sdr gamut wideness setting
The brightness overrides are for displays with missing or broken brightness
data in their EDID, and allow the user to work around those displays. In
the future we could also offer an HDR calibration process that allows determining
the correct brightness values for the screen.

The gamut wideness setting allows the user to tweak what gamut KWin assumes
sRGB applications to have. This is useful for working around the gamut mapping
displays do, which make sRGB content look washed out, and also to allow
users to make colors of sRGB apps look more saturated if they wish to.
2023-11-21 15:51:53 +01:00
Aleix Pol
118bc93144 config.h: Use constexpr QLatin1String instead of char*
char* are the past, constexpr lets us calculate certain things at
build time.
2023-11-21 08:09:38 +00:00
Aleix Pol Gonzalez
597b041666 Fix build without HAVE_ACCESSIBILITY 2023-11-20 23:38:05 +01:00
Vlad Zahorodnii
4faad8bd49 effects.h -> effecthandler.h 2023-11-20 15:47:36 +00:00
Vlad Zahorodnii
25ab2b53dd Extract EffectWindow into its own header 2023-11-20 15:47:36 +00:00
Alessandro Astone
f555c3301e screencast: Make nvidia use the GLES path
glGetTexImage returns a black image

https://forums.developer.nvidia.com/t/glgetteximage-returns-a-black-image-when-using-a-gbm-backed-egldisplay/273253

Fixes: BUG:476602
2023-11-20 15:26:51 +00:00
Alessandro Astone
491a5b386b screencast: Fix GLES path
glReadPixels reads from the bound framebuffer, so create an offscreen
framebuffer and attach the texture to it

Co-authored-by: Jan Grulich <jgrulich@redhat.com>
2023-11-20 15:26:51 +00:00
David Redondo
4cdf27e74c Expose a method to allow closing windows on shutdown.
This allows Plasma to gracefully close windows on shutdown by sending
xdg_toplevel.close. If after 10 seconds windows are still open because
they prompt for unsaved changes or similar cases, a notification is
shown to either prompt or logout regardless.
CCBUG: 461176
2023-11-20 14:56:17 +00:00
Kai Uwe Broulik
40aa5aceb8 workspace: Add "xdg activation"-only mode
Never auto-activate Wayland windows when "Extreme" focus stealing
prevention is configured. This allows to more easily find places
where window activation isn't properly implemented, such as on
application startup.
2023-11-20 14:36:05 +00:00
Vlad Zahorodnii
433b753360 Drop EffectWindowList
Use `QList<EffectWindow *>` instead.
2023-11-20 13:45:36 +00:00
Xaver Hugl
b28d2c2d80 backends/drm: use closefb instead of removefb when available
The closefb ioctl removes the userspace reference from the framebuffer but does
not try to disable planes and outputs if the buffer is still used. This allows
for example for smoother transitions between SDDM and the Plasma session
2023-11-20 14:36:08 +01:00
Andreas Gattringer
5651bae432 backends/drm: Don't add GPU if we are already using it
BUG: 477242
2023-11-20 13:08:12 +00:00
Vlad Zahorodnii
96af98609e Don't pass ownership of InputEventFilter and InputEventSpy to InputRedirection
This is not compatible with plugins that install their own filters. The
approach in this patch is not elegant, but it should work. Another option
would be to convert these filters and spies to QObjects and use QObject
ownership model, but this would be also too excessive just to save a few
lines of code.
2023-11-20 14:45:29 +02:00
Vlad Zahorodnii
961bd00919 Move WindowVertex,WindowQuad,RenderGeometry out of effects.h
These are core scene abstractions and don't belong in effects.h.
2023-11-20 14:05:52 +02:00
Vlad Zahorodnii
86084d118c libkwineffects/ -> effect/ 2023-11-20 11:32:43 +00:00
Vlad Zahorodnii
75f9fda962 Clean up workspacescene.h includes 2023-11-20 11:32:43 +00:00
Vlad Zahorodnii
618dee19cf Move GLVertex2D to glvertexbuffer.h 2023-11-20 11:32:43 +00:00
Vlad Zahorodnii
9aef54b701 Remove effects.h include in effectframe.h 2023-11-20 11:32:43 +00:00
Vlad Zahorodnii
0a2ed7d1c8 Move scaledRect,roundVector,flooredPoint to globals.h 2023-11-20 11:32:43 +00:00
Xaver Hugl
bec9ffeacd outputconfigurationstore: match KScreen's max scale of 300% 2023-11-20 09:11:09 +00:00
Nicolas Fella
6a1b1d01b8 Fix and simplify UI creation in various effect KCMs
We don't need an intermediate widget class here, we can set up the UI directly, like it's done in several effect KCMs already

Not only does this simplify the code, it also fixes crashes due to broken ownership

BUG: 477020
2023-11-20 07:41:49 +00:00
Huang-Huang Bao
3d4036210d
scene: use fractionalGeometry() as input of RenderViewport renderRect
Fixes mismatches between renderTarget.size() and deivce geometry calculated using viewport.renderRect() * viewport.scale() .

BUG: 475325
2023-11-20 06:14:55 +08:00
Natalie Clarius
8e6b1a363f plugins/nightcolor: osd: show day icon if appropriate 2023-11-16 19:48:06 +00:00
Vlad Zahorodnii
96e979c736 Move window motion manager to the slideback effect
Slide back is the only remaining its user.
2023-11-16 17:06:38 +02:00
Vlad Zahorodnii
b0292fc0de Move Effect::animationTime() implementation to effect.h
Amends d13b53c366.

It was overlooked.
2023-11-16 16:15:32 +02:00
Vlad Zahorodnii
fe9821722e Drop Effect::initConfig()
Effect::initConfig() definition can't be moved to effect.h because
it's going to create a cyclic dependency. On the other hand, the real
benefit of initConfig() is doubtful. It's a shortcut for calling
Config::instance(effects->config()), which is small amount of code.
2023-11-16 16:14:09 +02:00
Vlad Zahorodnii
8566cb3735 Move effectloader.h to libkwineffects/ 2023-11-16 15:51:39 +02:00
Vlad Zahorodnii
36021b12a7 Drop redundant "kwin" prefix in some filenames 2023-11-16 13:37:50 +00:00
Xaver Hugl
e17af124d4 backends/drm: correct color management check for the CTM 2023-11-16 13:15:36 +00:00
Devin Lin
12d04f9d86 libkwineffects: Export EffectTogglableState 2023-11-15 21:41:40 -08:00
l10n daemon script
56c732829f 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"
2023-11-16 02:15:19 +00:00
Aleix Pol Gonzalez
b860439be5 Allow support dmabuf formats that we have conversions for.
If there's a supported mechanism to handle the format, announce them as
supported.
If there are modifiers supported by the graphics card (even though as
external only), offer them as well.
2023-11-15 21:42:05 +01:00
Aleix Pol Gonzalez
3568829216 opengl: Add support for NV12 on Wayland dmabufs
Offers wayland clients the possibility to send us their contents using
an NV12 texture.
It implements it by rendering into scene using a shader.
2023-11-15 21:32:25 +01:00
Niccolò Venerandi
9e81d2f65c plugins/overview: Bind values to 1:1 animation while gesture is ongoing
Otherwise the animation feels wrong while activating with a gesture.
Now when a 1:1 gesture is ongoing, then the Overview effect will stop
animating the overviewVal/gridVal values. I implemented this by porting
to states, giving 1:1 gestures their own states, and only animating the
change between states.

BUG: 476536
2023-11-15 17:41:02 +00:00
Vlad Zahorodnii
15b47ce7fc Merge EffectsHandlerImpl and EffectsHandler 2023-11-15 15:21:50 +02:00
Vlad Zahorodnii
d0158ec588 Drop X11 connection getters in Effect
They are redundant, EffectsHandler already provides same things.
2023-11-15 14:41:43 +02:00
Vlad Zahorodnii
a5546f1450 Drop some unused kwineffects.h includes 2023-11-15 14:41:42 +02:00
Vlad Zahorodnii
d13b53c366 Extract Effect into its own header
After merging libkwineffects and libkwin, EffectsHandler and EffectWindow
have effectively become redundant. On the other hand, Effect and the
associated factory code is still relevant. In order to split relevant and
"legacy" code, this change extracts the Effect class in its own header.
It's also a good idea to split kwineffects.h header because it's quite
huge...
2023-11-15 14:41:42 +02:00
Vlad Zahorodnii
56e384e527 Extract TimeLine into its own header 2023-11-15 12:02:50 +00:00
Vlad Zahorodnii
889180b685 Remove code to unset QT_DEVICE_PIXEL_RATIO envvar
QT_DEVICE_PIXEL_RATIO has been dropped in Qt 6.
2023-11-15 12:27:32 +02:00
David Redondo
6befc5d11b Do not set QSG_RENDER_LOOP Variable
This leaks to other processes that are started by KWin.
The QPA sets ThreadedOpenGL capability to false which suffices
to use the basic render loop with OpenGL.
2023-11-15 09:58:54 +00:00
Xaver Hugl
ee146d33b9 libkwineffects: move files out to more fitting places 2023-11-14 17:03:40 +01:00
Vlad Zahorodnii
51cb2b00b3 Extract EffectFrame helper in its own header 2023-11-14 15:11:29 +00:00
Vlad Zahorodnii
9692c65390 Drop "sub-feedback" concept in PresentationFeedback
This gets rid of the container feedback to simplify presentation
feedback organization.
2023-11-14 14:58:40 +00:00
Vlad Zahorodnii
79d5a70c01 wayland: Make SurfaceInterface::{frameRendered,takePresentationFeedback} not touch subsurface tree
This gives us greater flexibility and in general more cleaner code.
2023-11-14 14:58:40 +00:00
Weng Xuetian
9e047059c1
Add isInputMethod in EffectWindow and do not dim input method window 2023-11-14 06:29:51 -08:00
Vlad Zahorodnii
aabc162632 x11: Unload effects before destroying Workspace and Compositor
Effects can hold references to closed windows, which can cause problems
after the workspace is destroyed.

This change makes ApplicationX11 unload effects before destroying the
Workspace and the Compositor similar to how it's done in main_wayland.

BUG: 475511
2023-11-14 15:51:03 +02:00
Xaver Hugl
75304afe0f backends/drm: only disallow direct scanout with mismatching color descriptions
Generically disabling it with color management is a bit overkill
2023-11-14 14:17:37 +01:00
Xaver Hugl
38575ac33d backends/drm: re-allow the hardware cursor with color management
It doesn't look wrong anymore, presumably what caused it to look wrong before
was just a bug. Blending in sRGB or PQ is still technically wrong, but it
looks okay, and that's an acceptable tradeoff to make in order to get the
responsiveness and power usage improvements the hardware cursor offers
2023-11-13 20:49:22 +01:00