Commit graph

27016 commits

Author SHA1 Message Date
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
Xaver Hugl
9293df2681 plugins/zoom: do colorspace conversions between the screen textures
Otherwise colors and especially brightness levels can be quite wrong when
the textures are used on a different screen

BUG: 488839
2024-06-21 14:26:12 +02:00
Vlad Zahorodnii
2fb485d67d plugins/screencast: Unset only cursor id when the cursor is invisible
We are doing half a job of resetting spa_meta_cursor, the actual cursor
content is still left as is. On the other hand, it should plenty enough
to simply reset the cursor id. The clients are expected to call
spa_meta_cursor_is_valid().
2024-06-21 05:54:25 +00:00
Vlad Zahorodnii
16f6473f56 Add closed window guards in X11Window::doSetXYZ() methods
It won't hurt to have them.
2024-06-21 05:35:13 +00:00
l10n daemon script
9bcba5334c GIT_SILENT Sync po/docbooks with svn 2024-06-21 01:27:47 +00:00
l10n daemon script
268d066f4f 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-21 01:18:41 +00:00
Vlad Zahorodnii
9276d28b3d plugins/shakecursor: Ignore animation speed
From the user perspective, shaking cursor is not perceived as an
animation, so let's ignore the global animation speed factor.

BUG: 488813
2024-06-20 22:28:49 +03:00
l10n daemon script
2db79aaca8 GIT_SILENT Sync po/docbooks with svn 2024-06-20 01:32:04 +00:00
David Redondo
1a916293dc plugins/eis: Make input capture activation ids unsigned
The portal API is specified with unsigned ids. Let's make them
unsigned all the way through.
2024-06-19 11:49:31 +00:00
Xaver Hugl
92f1fabe5b wayland_server: create a new screen locker connection when the greeter gets restarted
Otherwise, Wayland objects and protocol errors can cause the new instance to not start
2024-06-19 11:09:10 +00:00
Xaver Hugl
b107295c03 windowheap: don't animate the position of windows that get hidden
The target position is zero, so they just move into the top left corner,
which looks weird. With this commit, they just fade away without moving
2024-06-19 10:17:53 +00:00
Vlad Zahorodnii
e316694675 backends/x11: Move the contents of common/ to standalone/
It's used only there.
2024-06-19 08:56:12 +00:00
Vlad Zahorodnii
8a5bae0f86 backends/x11: Port away from XRenderPicture 2024-06-19 08:56:12 +00:00
Vlad Zahorodnii
ad31fd6b18 plugins/nightlight: Fix dbus property types
currentTemperature, targetTemperature, and mode properties have "u" type.
But there is a mismatch between the property types declared in the
Q_PROPERTY macro and the org.freedesktop.DBus.Properties.PropertiesChanged
signal.

This change makes the property types consistent and match the types
declared in the xml file.
2024-06-19 05:29:11 +00:00
l10n daemon script
18e9adf5b7 GIT_SILENT Sync po/docbooks with svn 2024-06-19 01:28:15 +00:00
Vlad Zahorodnii
1dee66a36c plugins/nightlight: De-duplicate dbus code 2024-06-18 18:14:07 +00:00
David Redondo
1b1af29de9 Sync xwayland eavesdropping default in kwin.kcfg
Amends a136a159f9 which changed the value in the kcfg file that the kcm reads, KWin uses options.kcfg
4f322e24d3 changed the in code default but this will be later overriden when loading the options.
2024-06-18 07:39:22 +00:00
l10n daemon script
940215b624 GIT_SILENT Sync po/docbooks with svn 2024-06-18 01:33:57 +00:00
Aleix Pol Gonzalez
559b0cccf5 shm: support textures of 3 bytes-per-color
Adds support for BGR888 and RGB888.
Some clients use it and we just fail to render them, making devs
thinking that kwin is broken.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
2024-06-17 22:24:16 +00:00
Vlad Zahorodnii
7fca508619 Remove code that updates the focus chain in Window::setSkipTaskbar()
skipsTaskbar() doesn't influence whether the window wants input.
2024-06-17 20:04:11 +00:00
Vlad Zahorodnii
0fc6c6800e Get rid of extra string allocations in src/inputmethod.cpp 2024-06-17 19:01:12 +00:00