Commit graph

26009 commits

Author SHA1 Message Date
Xaver Hugl
bb2391133d plugins/screencast: hardcode DRM_FORMAT_ARGB8888 for screencasts
It's universally supported, and our format negotiation code needs improvements to
properly handle the receiving application not suporting the actual output format
2024-01-25 10:19:15 +02:00
Nicolas Fella
06230e43d6 Remove wrong handling of Qt::KeypadModifier
Qt::KeypadModifier doesn't actually map to any XKB modifier

The XKB_MOD_NAME_NUM modifier is (semi-)unrelated
2024-01-25 10:10:11 +02:00
l10n daemon script
957e73a889 GIT_SILENT Sync po/docbooks with svn 2024-01-25 01:18:34 +00:00
l10n daemon script
daad3b9d7c 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-01-25 01:12:07 +00:00
Vlad Zahorodnii
9cdf19c657 autotests: Add keypad global shortcuts test 2024-01-24 13:20:58 +00:00
Nicolas Fella
296d3f31be Consider Qt::KeypadModifier relevant for global shortcuts
Otherwise kglobalaccel can't distinguish between numbers on the num block and other numbers

BUG: 453423

BUG: 446389
2024-01-24 13:20:58 +00:00
Vlad Zahorodnii
25150633ed kconf_update: Update Version
kconf_expects version 6.
2024-01-24 12:16:22 +02:00
Vlad Zahorodnii
3bce89553c Prefer QRegion::operator+=
`QRegion::operator|=` has some optimizations but it basically boils
down to

  QRegion result(*this);
  result.detach(); // it will make a copy because this is shared
  result.d->append(rect);
  return result;

On the other hand, `QRegion::operator+=` tries to add the new rect
in-place.
2024-01-24 10:26:02 +02:00
Vlad Zahorodnii
f44484137e plugins/blur: Fix blur behind decoration
Currently, if only blur behind decoration is enabled, no m_windows entry
is going to be created and so the blur effect won't blur the background.

BUG: 479893
2024-01-24 10:24:57 +02:00
Vlad Zahorodnii
e01116149b tests: Fix constraint region in pointerconstraints example 2024-01-24 10:23:45 +02:00
l10n daemon script
a1b47dfa08 GIT_SILENT Sync po/docbooks with svn 2024-01-24 01:19:44 +00:00
l10n daemon script
f065ee6d06 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-01-24 01:12:23 +00:00
Vlad Zahorodnii
3663e1ec13 Apply "Accepts focus" window rule to WM_TAKE_FOCUS messages as well
Currently the window rule is not 100% effective because the "take focus"
message is not guarded. So depending on the input model of the X11
window, kwin can still activate a window even if it has a window rule
to force no focus.

workspace()->setShouldGetFocus() should be guarded too to help the focus
stealing prevention logic.

Technically though, forcing XSetInputFocus() or WM_TAKE_FOCUS if the
client doesn't advertise supporting them is finiky. But on the other
hand, the window rules are an advanced feature, so its assumed that the
user knows what they do.
2024-01-23 22:11:16 +02:00
Vlad Zahorodnii
bbb40a9a84 Fix lingering dpms input event filter after cancelling scheduled dpms mode change
The output goes through the following stages when it changes its dpms
mode:

- Output::aboutToTurnOff()]
- some time later, Output::dpmsModeChanged() to indicate that it's off
- Output::dpmsModeChanged() to indicate that it's back on
- Output::wakeUp()

The Output::dpmsModeChanged() signals in the middle are optional. They
may not be emitted after Output::aboutToTurnOff() if the user quickly
cancels the dpms mode transition.

The Workspace should monitor the Output::wakeUp() signal instead.
Alternatively, create the dpms input event filter only after the dpms
mode has changed. While the screen won't be turned back on immediately,
it's still going to produce acceptable visuals. Either solution is fine.
This patch makes the Workspace monitor the wakeUp signal because it
takes fewer lines of code.

BUG: 479659
2024-01-23 22:05:25 +02:00
Yifan Zhu
adc076322b plugins/fallapart: use InCubic easing
This visual effect corresponds to visible to invisible. So use InCubic
easing for opacity and speed.
2024-01-23 22:00:14 +02:00
Vlad Zahorodnii
d0a49a6b77 helpers/wayland_wrapper: Bump the buffer size for display_name
The compiler prints the following warning at the moment:

    wl-socket.c:143:9: note: ‘snprintf’ output between 10 and 20 bytes into a destination of size 16
2024-01-23 21:55:19 +02:00
Xaver Hugl
8db8dd24bf move vao from WorkspaceSceneOpenGL to GlxContext
EglContext already had a vao, and it makes more sense for the context to
take care of this than the scene
2024-01-23 19:40:30 +00:00
Xaver Hugl
7e095412aa outputconfigurationstore: add a fallback for when edid parsing fails
When edid parsing fails, KWin will base output settings on the connector, which
isn't great on its own, but at least works in many cases. When the edid can be
parsed later though, the display settings will reset because now the edid identifier
is used to exclude the old config (in which the latter is missing).
To work around that, this commit adds output identification based on the edid hash,
which is also not ideal, but can be safely matched with in case no output config
with a matching edid identifier exists.
2024-01-23 19:34:06 +00:00
Xaver Hugl
3cafc20981 backensd/drm: directly try presentation with changed properties
This optimizes out an unnecessary atomic test - instead of testing the new state and
then attempting to present with that new state, this just directly tries to present the
full state. If that commit fails, the backend just tries again with the safer presentation
mode.
2024-01-23 19:25:05 +00:00
Xaver Hugl
7a2d95ddc8 outputconfigurationstore: take rotation into account for the position
Otherwise outputs may overlap
2024-01-23 19:19:49 +00:00
Vlad Zahorodnii
575ff68e5b plugins/qpa: Fix a warning about unused variable 2024-01-23 21:10:56 +02:00
Vlad Zahorodnii
01818f683c wayland: Add missing wp_security_context_manager_v1.destroy implementation 2024-01-23 21:00:15 +02:00
Yifan Zhu
8774a0114c plugins/private/Windowheap: Use InOutCubic easing
All transitions correspond to visible to visible changes, and should
have InOutCubic easing as per HIG.
2024-01-23 20:59:04 +02:00
l10n daemon script
acb0dc4c24 GIT_SILENT Sync po/docbooks with svn 2024-01-23 01:21:22 +00:00
l10n daemon script
015a8452cd 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-01-23 01:13:11 +00:00
l10n daemon script
9fa5f7547f GIT_SILENT Sync po/docbooks with svn 2024-01-22 01:36:03 +00:00
Ismael Asensio
efde6c8e9e kcms/tabbox: Use higher resolution thumbnails for previews
Replace the hardcoded thumbnails which have a low resolution for
current screen standards (~300x200), with higher resolution ones
(~1200x800).

Also set the new 6.0 wallpaper as the fallback desktop thumbnail

BUG: 446765
FIXED-IN: 5.93.0
2024-01-21 12:47:25 +01:00
Aleix Pol
fd7a67d92e screencasting_test: Declaring the metatype is unnecessary now 2024-01-21 11:17:49 +00:00
l10n daemon script
daa8785e34 GIT_SILENT Sync po/docbooks with svn 2024-01-21 01:19:39 +00:00
l10n daemon script
2b684146c7 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-01-21 01:12:31 +00:00
Tino Lorenz
adbf69aab4 plugins/buttonrebinds: Support rebinding to modifier keys
Allow rebinding buttons to send modifier keys (Control, Alt, Meta,
Shift) without any other key.
This is part of restoring the functionality kcm-wacomtablet had under
X11 for wayland.
CCBUG: 461259
2024-01-20 15:49:42 +00:00
l10n daemon script
39a5489bde GIT_SILENT Sync po/docbooks with svn 2024-01-20 01:19:39 +00:00
Aki Sakurai
ab41bcf3ad Accepting the tablet serial for the xdg_toplevel move/resize function 2024-01-19 20:06:49 +00:00
Xaver Hugl
9822e75fbf core/renderjournal: improve render time heuristics
Instead of giving the rolling average for render times a special case for
when render time suddenly increases, detect how stable render times are.
If they're volatile and increase a lot, increase the predicated render time
beyond the spike, as more render time spikes are likely to follow.

CCBUG: 477959
2024-01-19 20:26:20 +01:00
Vlad Zahorodnii
7ba7ddfee8 opengl: Let OpenGL implementation handle if preprocessor directive
It's less error prone and handles cases like if/elif/else better, etc.

CCBUG: 479279
2024-01-19 16:57:50 +02:00
Vlad Zahorodnii
0284610eff opengl: Fix parsing of the else branch
`it` points to `#else`. We need to move to the next line.

BUG: 479279
2024-01-19 14:44:39 +00:00
Vlad Zahorodnii
7e8230a596 plugins/colorblindnesscorrection: Ensure that error and correction are fully initialized
vec3() will complain if the vector is not fully initialized. Also if the
type of these variables is changed to vec4 and some miss alpha values,
the glsl compiler will complain again.
2024-01-19 14:23:57 +00:00
Vlad Zahorodnii
4cc94e9462 plugins/colorblindnesscorrection: Fix screen becoming white on intel machines
correction.a is uninitialized. It creates problems on intel machines.

BUG: 479749
2024-01-19 14:23:57 +00:00
Aleix Pol
0ce01ac30f screencasting: Fix CI
It seems on the CI the dataFrame is null at times
2024-01-19 14:05:51 +00:00
Stefan Hoffmeister
d563bc6c86 Fix mishandling of output configuration if output monitor EDID is missing
This functionally fixes
* duplication of output configuration in ~/.config/kwinoutputconfig.json
* _wrong_ ouput configuration - in particular the scale - being restored (i.e. scale would never be restored)
2024-01-19 13:52:28 +00:00
Vlad Zahorodnii
cffacc514d opengl: Correct order of transforms in GLTexturePrivate::updateMatrix
The textureToTransformMatrix should be applied first, otherwise the scale
transform is going to change the winding order of rotations.

In practice though, it shouldn't matter because these matrices are used
to downscale or upscale uv coordinates.
2024-01-19 07:43:30 +00:00
l10n daemon script
428758d33a GIT_SILENT Sync po/docbooks with svn 2024-01-19 01:22:42 +00:00
Aleix Pol
0b36919b7c screencasting_test: Adapt to KPipeWire change 2024-01-19 01:41:47 +01:00
Xaver Hugl
36bec2d941 colors/colordevice: make channel factors linear
The redshift table is in gamma 2.2 encoding and not linear, which means
that it only yields correct results with 1.0 pixel values. It also means
that when it's being applied in linear space in the color management shaders,
the result is quite wrong.

To fix that, this commit makes the channel factors linear and the backend
calculates the nonlinear factors where needed.
2024-01-18 21:51:40 +01:00
Vlad Zahorodnii
788c186701 plugins/shakecursor: Ensure that cursor is magnificated for at least certain amount of time
If the cursor is magnificated and it's slightly moved so the shake
detector returns std::nullopt, the cursor scale will be set back to 1.0
as soon as possible. This is not ideal. Immediately resetting doesn't
help with locating the cursor.

Also the cursor scale reset delay has been increased to two seconds to
provide more time to see the cursor.
2024-01-18 18:03:15 +00:00
Vlad Zahorodnii
f6d9b8a0b4 plugins/screenshot: Use SmoothPixmapTransform when stitching area screenshots
CCBUG: 478426
2024-01-18 14:56:33 +00:00
Vlad Zahorodnii
f23e0ef05b opengl: Correct transformation order in GLTexture::render()
First, the texture-to-buffer transform has to be applied, then the y
axis should be flipped. Doing it vice versa changes the winding order
of rotation transforms.

Also the screenshot plugin uses incorrect render transform. Since
convertFromGLImage() undoes the render target's transform, the color
space transformation pass should use the same transform, not the
inverted one.

BUG: 479934
2024-01-18 14:15:28 +00:00
Niccolò Venerandi
69f8bee0b1 kcms/screenedges: Hardcode the Overview as an option in the touchscreen KCM
You can now select "Overview" in the touch KCM to use it as a touch edge gesture again!
2024-01-18 14:08:34 +00:00
Xaver Hugl
d5ca429627 wayland: consider every commit a "content update" for presentation time
The protocol doesn't have a definition of what it means, but damage is a
flawed interpretation. Color management changes are arguably content updates,
so are viewporter changes, so are blur changes and so on.

Also see https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/36
for an upstream discussion of this
2024-01-18 13:45:18 +00:00
Vlad Zahorodnii
da4f4d7e69 Rename UnmanagedLayer to OverlayLayer
The UnmanagedLayer layer is used for placing overlay content so
rename it to match how it's used in practice.
2024-01-18 13:13:55 +00:00