Commit graph

25902 commits

Author SHA1 Message Date
Bart Ribbers
a879c59a08 Fix building of tests on Musl by making sure to include sys/select.h
Required for access to fd_set
2024-01-11 17:00:09 +01:00
Vlad Zahorodnii
bc30ca64dc Fix evaluating window rules for closed windows
gedit changes its caption from "Untitled document - gedit" to "gedit"
when it closes. This schedules Window::evaluateWindowRules() to be
called when the window is already marked as deleted. kwin then crashes.

In order to prevent that, a direct connection can be used instead. But
then the caption must be initialized extra carefully because if the
window rule changes the window type, "<N>" can be lost.
2024-01-11 14:17:31 +00:00
Vlad Zahorodnii
4ab504c994 Add Window::captionNormalChanged()
This signal notifies when the client specified caption changes, not when
kwin changes it because it changed the suffix, etc.
2024-01-11 14:17:31 +00:00
Vlad Zahorodnii
68f1570d45 scene: Fix alpha channel of offscreen cursor texture
When running with 10bpc, the alpha channel has only 2 bits for it, which
is too low for the cursor.

BUG: 479637
2024-01-11 13:44:36 +00:00
Vlad Zahorodnii
3a5ba58a45 effect: Install xcb.h
BUG: 479584
2024-01-11 09:10:06 +00:00
Jin Liu
18ba622c40 Update keyboard focus when exiting from a keyboard-grabbing effect
BUG: 479628
2024-01-11 16:40:44 +08:00
Jie Liu
e427ad73aa update keyboard focus when window switcher is closed.
BUG:477885

Signed-off-by: Jie Liu <liujie01@kylinos.cn>
2024-01-11 01:28:52 +00:00
l10n daemon script
4d3779f061 GIT_SILENT Sync po/docbooks with svn 2024-01-11 01:19:25 +00:00
Xaver Hugl
a05a6d8727 effect/offscreenquickview: always use GL_RGBA8
GL_RGB8 isn't supported by OpenGL ES

BUG: 479055
2024-01-10 20:56:15 +01:00
Vlad Zahorodnii
66b1462cf8 xwayland: Make xinerama index -> Output mapping more robust with fractional scaling
xdg-output-v1 uses the fractional geometry, so also use it when mapping
a xinerama screen index to an Output.
2024-01-10 15:18:48 +00:00
Jonathan Esk-Riddell
61699e9ed3 Update version number for 6.0.80
GIT_SILENT
2024-01-10 14:03:49 +00:00
Vlad Zahorodnii
3f1e57de1c xwayland: Fix primary output identification
Output::geometry() returns a logical geometry, while the crtc rect is in
the device pixels.
2024-01-10 12:41:31 +00:00
Jonathan Esk-Riddell
cc49e25eac Update version number for 5.92.0
GIT_SILENT
2024-01-10 12:28:48 +00:00
l10n daemon script
f3618ffe9d GIT_SILENT Sync po/docbooks with svn 2024-01-10 02:15:23 +00:00
Xaver Hugl
0ed66ed5d2 move more opengl related files to the opengl folder 2024-01-09 19:45:59 +01:00
Vlad Zahorodnii
b214251f81 Force software cursor on Intel devices
kwin randomly freezes for a second when calling glFlush or glFenceSync.
In principle, this should not happen.

BUG: 474725
2024-01-09 18:03:45 +00:00
Vlad Zahorodnii
f7e8d3cefb scene: Add SurfaceItem::destinationSize()
Its main purpose is to reroute surface size updates through SurfaceItem
so it can invalidate quads cache. Not all SurfaceItems currently discard
them when needed. When proper item transform support lands,
setDestinationSize() could also change the surface scale instead.
2024-01-09 17:42:09 +00:00
Vlad Zahorodnii
6510fe6e5d scene: Fix SurfaceItem::bufferTransform()
The wayland spec is not quite clear about the transforms, but the buffer
transform indicates a transform from wl_surface to wl_buffer or compositor
global coordinate space to composited buffer.

On the other hand, SurfaceItem assumes that the order is vice versa.
2024-01-09 17:42:09 +00:00
Vlad Zahorodnii
f8df72497f opengl: Replace TextureTransform with OutputTransform
It reduces duplication of same math code.
2024-01-09 17:42:09 +00:00
Vlad Zahorodnii
27821e3c76 plugins/screenshot: Invert render transforms in the correct order
The render transform is applied first, after that, the texture is
flipped implicitly by opengl.

So in order to undo these transforms, we need to flip the image
vertically first, then undo the render target transform.
2024-01-09 17:42:09 +00:00
Vlad Zahorodnii
16809e6b15 core: Port RenderTarget to OutputTransform 2024-01-09 17:42:09 +00:00
Vlad Zahorodnii
c970d3261b core: Add OutputTransform::FlipY convenience aliases
`flip-y | rotate-N` transforms are equivalent to `flip-x | rotate-N`.
However, it is not intuitive to express transforms that flip the y axis
via flip-x transforms. This change adds convenience aliases to improve
code readability and keep code intuitive, which is going to be needed in
order to drop TextureTransforms flags.
2024-01-09 17:42:09 +00:00
Vlad Zahorodnii
9039612c20 core: Rename OutputTransform enums 2024-01-09 17:42:09 +00:00
Vlad Zahorodnii
47017d19de core: Make flip transform first
The wayland spec says we must flip first. FWIW it also matches how
kms processes reflect-x and reflect-y.
2024-01-09 17:42:09 +00:00
Vlad Zahorodnii
1905f7586e core: Change winding order of OutputTransform
Wayland spec says we must rotate counterclockwise.
2024-01-09 17:42:09 +00:00
Vlad Zahorodnii
11aa9abfe2 core: Drop viewport arg in RenderTarget::applyTransformation() 2024-01-09 17:42:09 +00:00
Vlad Zahorodnii
b733bb69bf core: Cleanup OutputTransform::map(QRectF,QRect)
Return the resulting value immediately than use moveLeft(),moveRight().
It makes no difference for QRectF, but it might be nicer for QRect which
would need to recompute the right and bottom coordinates twice.

I wanted to do this refactoring for a while but didn't do it due to the
lack of test coverage.
2024-01-09 17:42:09 +00:00
Vlad Zahorodnii
e6853a9109 core: Add OutputTransform::map(QPointF,QPoint) 2024-01-09 17:42:09 +00:00
Vlad Zahorodnii
a9b01a68b8 core: Add OutputTransform::map(QRect,Size) overloads
These can be useful in case a QRect needs to be mapped. One could
convert the QRect into a QRectF and then back to QRect, but given that
these conversion helpers are present in rendering hot paths, it would
be great to be more efficient and also potentially loosing precision
because of floating point arithmetic.
2024-01-09 17:42:09 +00:00
Vlad Zahorodnii
98a1b5098a core: Add OutputTransform::toMatrix() 2024-01-09 17:42:09 +00:00
Xaver Hugl
7f9cbbaa98 core/renderloop: improve frame scheduling heuristics with VRR
Instead of checking for fullscreen windows and deciding whether or not to schedule repaints
based on that, check if the active window is refreshing fast enough to be reasonable for vrr.
For automatic mode, vrr is also enabled with the active window instead of the direct scanout
candidate.

BUG: 478680
BUG: 477199
2024-01-09 17:06:01 +00:00
Xaver Hugl
e1373ae2e1 scene: add the presentation hint to Item
With this, the RenderLoop can use the Item instead of having to directly
deal with Wayland surfaces
2024-01-09 17:06:01 +00:00
Fushan Wen
a4283a2437 backends/x11: convert source cursor image to BGRX format
XCB_IMAGE_FORMAT_Z_PIXMAP is in BGRX format.

BUG: 476198
FIXED-IN: 6.0
2024-01-09 17:04:01 +00:00
Vlad Zahorodnii
9bbcc746c6 scene: Fix clipping in software cursor 2024-01-09 15:35:37 +00:00
Vlad Zahorodnii
5bb209a869 Install all core headers 2024-01-09 13:43:50 +00:00
Xaver Hugl
f222eb1d24 core: ensure icc profiles contain valid colorimetry 2024-01-09 12:42:07 +00:00
Xaver Hugl
a8d2fe5c2e core: refactor colorimetry a bit and add a constructor
That way the vectors can never be uninitialized, and the to/fromXYZ matrices
can be cached
2024-01-09 12:42:07 +00:00
Xaver Hugl
58a2a3cf81 utils: install all the headers
BUG: 479068
2024-01-09 08:51:31 +00:00
Stefan Hoffmeister
429b421dd4 scene: Fix scaled rendering of software cursors
BUG: 479154
2024-01-09 08:46:27 +00:00
Vlad Zahorodnii
c24a157581 backends/drm: Clear damage journal when switching between compositing and direct scanout
When returning back from direct scanout to compositing, the whole frame
has to be repainted because the most recent buffer in the EGL swapchain
contains outdated contents now.

This change works around it by purging the DamageJournal when scanning
out a buffer. However, a nicer solution would be to assign a unique
sequence number to every frame and use that to index the entries in the
DamageJournal. It's a nicer design. With such absolute frame numbers,
the DamageJournal could properly detect discontinueties.

Given the final release is in close proximity, this change doesn't go
after such a refactoring.
2024-01-09 07:26:42 +00:00
zhang yu
cbb95f5649 quit tile window when it is maxied in wayland env 2024-01-09 07:10:58 +00:00
l10n daemon script
b561224ad0 GIT_SILENT Sync po/docbooks with svn 2024-01-09 02:12:50 +00:00
Aleix Pol Gonzalez
df3e894c1a wayland: Install display.h
It's needed to properly access KWin::effects->waylandDisplay().

Signed-off-by: Georg Leugner <georg.leugner@mbition.io>
2024-01-08 23:06:43 +00:00
Xaver Hugl
e2878e912a core: move vrr and tearing control out of RenderLoop
This way the vrr setting is in Output like all the other settings, and the
RenderLoop can handle tearing not working better too
2024-01-08 17:41:13 +01:00
Xaver Hugl
e1d4c0e092 core: move content type to OutputFrame 2024-01-08 17:41:07 +01:00
David Edmundson
160f6069e8 Add missing header file to installation
BUG: 479423
2024-01-08 11:39:34 +00:00
l10n daemon script
97663e0e9d GIT_SILENT Sync po/docbooks with svn 2024-01-08 02:18:13 +00:00
l10n daemon script
7effcf46f4 GIT_SILENT Sync po/docbooks with svn 2024-01-07 02:49:10 +00:00
l10n daemon script
77375055a8 GIT_SILENT Sync po/docbooks with svn 2024-01-06 02:13:56 +00:00
l10n daemon script
5166597d3e GIT_SILENT Sync po/docbooks with svn 2024-01-05 02:15:46 +00:00