Commit graph

26936 commits

Author SHA1 Message Date
Jonathan Riddell
6f2cab89d9 use separation dep_version to build against, updated by release scripts 2024-06-27 12:42:45 +01:00
Xaver Hugl
ad8c947134 plugins/hidecursor: show the cursor on tablet events
BUG: 489009
2024-06-27 12:38:14 +02:00
l10n daemon script
e597a37429 GIT_SILENT Sync po/docbooks with svn 2024-06-27 01:30:48 +00:00
l10n daemon script
240af64c82 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"
2024-06-27 01:19:12 +00:00
Vlad Zahorodnii
585dd069f7 plugins/hidecursor: Change the defaults
It's more likely that this plugin will be enabled because of hiding
cursor when typing so let's use that by default.

CCBUG: 488971
2024-06-26 22:02:29 +03:00
Vlad Zahorodnii
4c8544c44f plugins/hidecursor: Allow disabling hiding cursor on inactivity
BUG: 488971
2024-06-26 22:02:03 +03:00
Vlad Zahorodnii
a41fac2d75 Switch to Xcb::Window geometry where it makes sense
There are a couple of reasons why it's worthwhile doing:

The first is that it makes the logic in the updateServerGeometry()
function reusable for the interactive code path. As of now, when the
window is being interactively resized, doInteractiveResizeSync() will
issue some xcb_configure_window() calls but then it also implicitly
assumes that updateServerGeometry() will call updateShape() and
updateInputWindow() but skip m_frame.setGeometry() later. That is
confusing, and error prone. For example, if somebody drops
m_lastFrameGeometry in favor of m_frame.geometry() (which is an
absolutely reasonable thing to do btw!!), a regression will be
introduced: things would appear to work at first, but then eventually
bug reports about input working weirdly would start piling up.

The second is hidpi scaling of wayland clients. toXNative(a + b + c)
is not the same as toXNative(a) + toXNative(b) + toXNative(c). By
switching to the device geometry, we leave less space for making an
error.

The third is that lets us clean up some geometry manipulation code.
When dealing with window hierarchies, it's more convenient to have
m_window.position() rather than a dedicated property in the X11Window
class such as wrapperPos().
2024-06-26 17:53:31 +00:00
Vlad Zahorodnii
02d43147b5 utils: Add convenience geometry getters in Xcb::Window 2024-06-26 17:53:31 +00:00
Akseli Lahtinen
07dcede820 WindowHeapDelegate: Label text background
Give label text background color to make it easier to distinct from the background.


BUG:483016
2024-06-26 16:00:54 +00:00
Vlad Zahorodnii
4c86653cd5 utils/xcbutils: Use window geometry in device pixels
If the logical geometry changes, the X11Window still needs to verify
whether the currently applied native geometry differs from it. In order
to do that, the X11Window needs to map the logical geometry to the device
pixels. Given that X11Window already maps the logical pixels to the
device pixels, the Xcb::Window doesn't need to map the geometry again.

Also, the way different coordinate spaces are handled now is inconsistent.
Some things (Xcb::Window) work only with the logical pixels, while other
(e.g. client messages) require the user manually mapping the geometry
between the different coordinate spaces. With this change, it would be
more consistent.

Regarding the porting process, it was performed in a single step because
all the code that changes or reads Xcb::Window geometry is neatly
encapsulated in the X11Window class in a couple of functions.
2024-06-26 18:06:06 +03:00
Xaver Hugl
eb7b04e320 core/colorspace: make max brightness values optional
Zero is already optional, but it's easy to make mistakes that way
2024-06-26 15:41:38 +02:00
Xaver Hugl
bdc24ff8c7 core/colorspace: add mastering display colorimetry
The mastering display colorimetry describes what part of the colorspace
is actually used, which is important when we're sending desired metadata
about a screen using the rec.2020 container colorspace, or when the client
uses an "infinite" / extended colorspace like scRGB
2024-06-26 15:41:38 +02:00
Xaver Hugl
b35edf8d30 plugins/backgroundcontrast,blur: correct support checks
On Xorg, the effects need support for OpenGL blits, but on Wayland, the
screen texture can be used instead
2024-06-26 14:52:38 +02:00
Xaver Hugl
60a483471c opengl/glframebuffer: handle missing support for blits on Wayland
If OpenGL blits aren't supported, we can still copy the area by sampling the
texture for the screen on Wayland

BUG: 484193
2024-06-26 14:52:38 +02:00
Xaver Hugl
0773db0710 opengl: glBufferStorage is not supported on GL ES by default
CCBUG: 484193
2024-06-26 14:52:33 +02:00
Vlad Zahorodnii
9e57469c2f kcms/effects: Remove shake cursor keywords
It's confusing when the Desktop Effects shows up in the search results
while looking for "shake cursor".

BUG: 488850
2024-06-26 09:02:41 +03:00
l10n daemon script
f0fad81963 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"
2024-06-26 01:19:45 +00:00
Vlad Zahorodnii
7590c6d386 wayland: Bump default max buffer size to 1 MiB
This is to prevent disconnecting clients that sometimes struggle with
keeping up with the events that the compositor sends. 1 MiB was eyeballed.

Wayland's wire protocol consists of a stream of messages. Every message
consists of a header (2 words: 1 word for object id, the other word
specifies the message size + event/request opcode) and the arguments.

Considering the compositor sending motion events generated by a mouse
with 1000Hz polling rate, we have

- wl_pointer.motion event size: (4 bytes for serial + 4 bytes for x +
  4 bytes for y + 8 bytes for header) = 20 bytes
- wl_pointer.frame event size: 8 bytes for header

So in total, if the client freezes for a second, the client buffer size
should be at least (20 + 8) * 1000 / 1024 = 27 KiB. 1 MiB corresponds to
the client not processing the motion events for approximately 30 seconds.
2024-06-25 20:19:59 +03:00
Xaver Hugl
5a0ecdba33 opengl/eglcontext: bail out early if we can't use complex shaders
Some old hardware is very limited in the amount of instructions it can support.
In order to not have KWin fail to composite, reject using hardware acceleration
in this case and fall back to llvmpipe or QPainter

BUG: 482868
2024-06-25 13:49:01 +00:00
Xaver Hugl
c5fb21fd8b core/renderloop: assume high render times if the last frame has been a while ago
This helps avoid some frame drops after the GPU may have went into a lower power
state. While this isn't generally noticeable, avoiding this makes noticing and
debugging actually relevant frame drops easier

CCBUG: 488843
2024-06-25 13:07:36 +00:00
Aleix Pol Gonzalez
2601d06f5b Fix !KWIN_BUILD_GLOBALSHORTCUTS builds
Makes it so the GlobalShortucts object gets built and its KGlobalAccelD
parts get disabled.

Addresses the TODO in GestureHandler.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
2024-06-25 11:21:56 +02:00
Aleix Pol Gonzalez
a7470f4b4a core/renderjournal: Make sure we include std::span 2024-06-25 11:13:59 +02:00
Vlad Zahorodnii
44ea9ee959 scripting: Add a temporary workaround to fix build without global shortcuts 2024-06-25 07:29:48 +00:00
Vlad Zahorodnii
059f66af9a scripting: Port gesture handlers to native gesture apis
If a SwipeGesture or a PinchGesture is cancelled, the associated QAction
is going to be triggered. It is against the expectations of the gesture
handlers.

In order to address that, this ports the gesture handlers to the native
gesture apis, which expose whether the gesture has been started or cancelled
better.
2024-06-25 07:29:48 +00:00
Vlad Zahorodnii
c958a75e2b scene: Drop ItemRendererOpenGL::RenderNode::scale
It's unused.
2024-06-25 06:56:56 +00:00
Alik Aslanyan
47ee47dcc8 tiling: Add fallback path for the first Polonium tile
After !5532 a new code path was triggered during Workspace::rearrange call.
When first Polonium window opens on any screen, there is no active tile yet.
This forces geometry calculation in Window::checkWorkspacePosition -> Window::ensureSpecialStateGeometry
To return empty QRect, which depending on the screen arrangement will move window to the other screen.

This confuses Polonium plugin, as it receives wrong outputChanged signal in scripting API.

BUG: 488898
Signed-off-by: Alik Aslanyan <inline0@pm.me>
2024-06-25 05:59:11 +00:00
Vlad Zahorodnii
a97c748d1c plugins/shakecursor: Harden cursor theme loading logic
The currently used cursor theme can be different from the configured one.
For example, if the configured theme cannot be used.

In order to ensure that that case is handled well, this change makes the
shake cursor plugin uses the same cursor theme as PointerInputRedirection.
2024-06-25 05:38:59 +00:00
Vlad Zahorodnii
1384a8d3fd utils: Fix XCURSOR_PATH envvar parsing
The XCURSOR_PATH environment variable can contain "~/.icons". Unfortunately,
QDir does not expand the tilda, we need to do it ourselves.
2024-06-25 05:38:59 +00:00
Vlad Zahorodnii
d6b3baec8f plugins/shakecursor: Include high resolution breeze cursor themes 2024-06-25 05:38:59 +00:00
Vlad Zahorodnii
53221fd43f utils: Allow specifying XCursor theme search paths 2024-06-25 05:38:59 +00:00
Vlad Zahorodnii
28b396f44c plugins/shakecursor: Display default cursor shape
At the moment, the shake cursor respects the current cursor shape. But
there are couple of drawbacks behind doing it: the first is that it's
very likely that the cursor pixmap has low resolution, the second is
the cursor can be hidden client-side.

This change makes the shake cursor plugin load the Xcursor theme with
a high enough size and display the default cursor shape regardless of
what the client has set in order to address the two aforementioned issues.
2024-06-25 05:38:59 +00:00
Vlad Zahorodnii
6a2bc79dae Make FocusChain ignore closed windows
At the moment, the FocusChain has Q_ASSERT()s to prevent inserting closed
windows back into the focus chain. It makes sense on paper. But, there
are code paths that could still hypothetically call FocusChain::update(),
they are harmless except the logic in the FocusChain.

So instead this change makes the FocusChain ignore closed windows, i.e.
take a more defensive approach. There are a few reasons why it's
worthwhile doing: the first is that it would prevent inserting closed
windows back into the focus chain in release builds and potentially even
back into the stack, debugging such crashes is absolutely no fun; the
second is that it would be preferred to avoid sprinkling random
isDeleted() checks in the Window code here and there and thus making
the code harder to follow.
2024-06-25 05:23:40 +00:00
Xaver Hugl
03eb688818 core/renderloop: also log the predicted render time
It can be used to better judge why a frame was dropped
2024-06-24 20:59:14 +02:00
Xaver Hugl
92ceb00b37 autotests/drm: add test for vrr capability changing without a hotunplug 2024-06-24 18:47:00 +02:00
Xaver Hugl
4453ce7eef backends/drm: update output properties after they're created too
Otherwise we might miss some changes that come without a hotplug event,
like adaptive sync becoming available after the output has been initialized

BUG: 486149
2024-06-24 18:47:00 +02:00
Xaver Hugl
3b3c75a8e9 core/renderjournal: remove unnecessary includes 2024-06-24 15:05:32 +00:00
Vlad Zahorodnii
ad4e27f5ef opengl: Remove code that prints gl platform details
It's printed whenever any opengl context is created, which can flood the
logs. On the other hand, this information is also included in the support
information, which we often ask in the bug reports.

BUG: 489000
2024-06-24 15:03:11 +00:00
Xaver Hugl
21a0ae31b7 plugins/screencast: test creating a dmabuf with the real modifier list
The test isn't useful if it tests different parameters than we're actually using
2024-06-24 16:43:09 +03:00
Xaver Hugl
a169114fee core/renderloop: log frame statistics into a file
Data like target vs. actual pageflip time, and render times is often needed for
debugging or optimizing render time predictions, so this commit makes KWin print
that information to a file in the home directory whenever KWIN_LOG_PERFORMANCE_DATA
is set.

CCBUG: 488843
2024-06-24 15:26:18 +02:00
Aleix Pol
0eb02c8b2c plugins/slidingpopups: adopt input panels from when they're added
Now that they will be shown and hidden in the proper state, we can set
up the input panel slide as the window gets added and ignore the
geometry changes that it will have in its lifetime.
2024-06-24 12:48:05 +00:00
Aleix Pol
b1bd3ff630 inputpanelv1window: polish window states
Do not markAsMapped an unpositioned panel, it would confuse the sliding
popups effect and force it to figure out its state in creative ways.
Mark the panel window as hidden as it gets destroyed.
2024-06-24 12:48:05 +00:00
Vlad Zahorodnii
1dbef2d5ed backends/drm: Fix DrmCrtc::queryCurrentMode() accidentally resetting m_crtc to null
Otherwise kwin will likely crash.
2024-06-24 12:32:24 +03:00
l10n daemon script
1ee3062e45 GIT_SILENT Sync po/docbooks with svn 2024-06-24 01:23:58 +00:00
Vlad Zahorodnii
944be3d55a Drop WaylandServer initialization flags
These flags affect kwin in general so WaylandServer is not the best place
for them to live in. For such things, we typically add properties in the
Application object, which is what this change does.
2024-06-23 17:53:17 +00:00
Yifan Zhu
c6ac6d3caa scene: install all the headers 2024-06-23 01:59:43 +00:00
l10n daemon script
6540112bf3 GIT_SILENT Sync po/docbooks with svn 2024-06-23 01:30:03 +00:00
l10n daemon script
7d486ddce7 GIT_SILENT Sync po/docbooks with svn 2024-06-22 01:34:31 +00:00
l10n daemon script
85badd901d 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"
2024-06-22 01:20:29 +00:00
Vlad Zahorodnii
7eb9f75af2 plugins/glide: Subdivide window quad grid
The way the glide effect works is that it takes 2D geometry and applies
the perspective projection to it on the CPU side. The reason we do it is
that the scene is 2D.

However, this leaves us with the well known problem where a texture
that's mapped to a trapezoid won't be correctly interpolated along the
diagonal.

It can addressed by performing a perspective division in the fragment
shader, but given the way the effect is structured, it's off the table. So
instead subdivide the window grid.

BUG: 488840
2024-06-21 12:46:28 +00:00
Xaver Hugl
b745f83339 x11window: remove unused variable 2024-06-21 12:34:35 +00:00