Commit graph

26976 commits

Author SHA1 Message Date
Xaver Hugl
372ea85326 bump clang-format to C++ 20
Otherwise it formats some newer C++ features wrong
2024-07-04 16:29:25 +02:00
Vlad Zahorodnii
9ce095dad3 opengl: Add OpenGlContext::glGetnTexImage()
Add glGetnTexImage() to be consistent with other robustness stuff.
2024-07-04 17:12:16 +03:00
Vlad Zahorodnii
74d7c33a97 plugins/screencast: Prefer glReadnPixels() and glGetnTexImage()
They should prevent potentially writing texture data outside the bounds
of the memfd buffer.
2024-07-04 17:11:38 +03:00
Vlad Zahorodnii
b452a5a5fb plugins/screencast: Hide cursor if another window covers screencasted window
BUG: 487294
2024-07-04 13:50:45 +00:00
Vlad Zahorodnii
8cb7e0a26b Simplify X11Window::updateServerGeometry()
There are two shapes that the WM needs to be concerned about: the input
shape and normal shape.

If the client window has custom input shape, the window manager should
synchronize it with all parent windows or ensure that its frame window
has an input shape as big as the client's input shape. The input shape
needs to be updated either when the client changes it or when the
X11Window is resized or its borders have changed. updateInputShape()
accomplishes that.

The normal shape is slightly different. If the window is decorated, the
window manager could ignore the shape set by the client. If the window
is not decorated, it's a good idea for the WM to synchronize client's
shape with the frame window's shape (if there's any). The frame window
shape doesn't need to be updated when it's resized, but if the client
window moves inside the frame window, it needs to be updated.

This change removes too generic updateShape() in the
X11Window::moveResize() code path and replaces it with a more targeted
code to update the shape, so updateServerGeometry() does not emit the
shapeChanged signal and it can be reused in the doInteractiveResizeSync()
function. Note that on wayland, it's unnecessary to synchronize the
shapes because the client window never moves in the frame window but it
is done anyway to minimize the differences between X and Wayland sessions
for easier maintenance.
2024-07-04 11:27:59 +00:00
l10n daemon script
9d9c7fe883 GIT_SILENT Sync po/docbooks with svn 2024-07-04 01:26:29 +00:00
Akseli Lahtinen
a99e1b6622 WindowHeapDelegate: label topMargin to small, remove height padding
This should help avoiding the window heap delegaet labels drawing on top
of each other in Overview effect.


BUG:489595
2024-07-03 20:33:09 +00:00
l10n daemon script
24613d0dd8 GIT_SILENT Sync po/docbooks with svn 2024-07-03 01:29:03 +00:00
l10n daemon script
ec43eb08df 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-07-03 01:19:51 +00:00
Xaver Hugl
64d70029ec plugins/glide: drop references to closed windows if they're not animated
Otherwise the window might still be referenced from the opening animation, which
can lead to the effect wrongly keeping a reference to the window and staying active.

CCBUG: 485425
2024-07-02 23:52:21 +02:00
Vlad Zahorodnii
465873ecac plugins/screencast: Handle frame rate throttling timer firing a bit earlier
The QTimer can fire a bit earlier than expected. If that happens, don't
try to start it again, but record a frame instead.

CCBUG: 489602
2024-07-02 13:54:58 +00:00
Xaver Hugl
b103decda2 backends/drm: test and apply all mode changes at once
This avoids doing multiple atomic tests with outdated state for when multiple
outputs change simultaneously, and avoids crashing because outputs get used
before they're fully constructed
(https://crash-reports.kde.org/organizations/kde/issues/40960)
2024-07-02 14:59:06 +02:00
Vlad Zahorodnii
84e3ff88c3 Round X window gravity adjustment
Qt applications use Static window gravity by default. This means that if
a window decoration is created, the client window should remain at the same
position in the global coordinate space. To do that, X11Window needs to
move the frame geometry by (-borderLeft(), -borderTop()).

On the other hand, after making X11Window::framePosToClientPos() round
the window borders, the client window can end up being moved more than
expected when applying the gravity adjustment.

This change makes X11Window also round the gravity adjustment so the math
is consistent there and in the framePosToClientPos() function.

BUG: 489016
2024-07-02 11:25:50 +00:00
l10n daemon script
282137c41d GIT_SILENT Sync po/docbooks with svn 2024-07-02 01:28:03 +00:00
l10n daemon script
d1bac279de 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-07-02 01:18:59 +00:00
Marco Martin
9f7e30652c Don't assert on null output
don't blindly access m_tileManagers as it can assert
with out of bounds when output is not valid. This can happen
from scripting side as this function is wrapped in the javascript api.
2024-07-01 11:44:53 +00:00
Erwin Saumweber
d4152fafbd quicktiling: Reset layout when last quicktile ceases to exist
To not preserve invisible splits, last quicktile is differentiated
per split axis.

BUG: 465937
2024-07-01 07:53:06 +00:00
l10n daemon script
fa4b75804b GIT_SILENT Sync po/docbooks with svn 2024-07-01 01:26:44 +00:00
l10n daemon script
8084d995f6 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-07-01 01:17:12 +00:00
l10n daemon script
ada78a5143 GIT_SILENT Sync po/docbooks with svn 2024-06-30 01:28:32 +00:00
l10n daemon script
d5180fb91e 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-30 01:19:28 +00:00
Kristen McWilliam
42eb6389e2 virtualdesktops: improve readability
Adds whitespace between documented members of the header file.

Currently the members are all bunched together, making it difficult to
read as one flows directly into the next. This change adds a newline
between each member, making it easier to read.
2024-06-29 09:52:36 +00:00
Vlad Zahorodnii
172e26617c kcms/effects: Exclude internal effects
The internal effects implement some of the core plasma functionality, for
example screenshots, but being an effect is rather an implementation detail.

Also we have pivoted towards unloading the desktop effects kcm and moving
effect configuration in more appropriate places.

BUG: 488988
2024-06-29 09:40:43 +00:00
Vlad Zahorodnii
d6bca5bccd Add effects tab in debug console 2024-06-29 09:40:43 +00:00
Aleix Pol Gonzalez
718a0c26c0 backends/windowed: Port X11 Windowed backend away from XLib
It's a dependency that we have been porting away from.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
2024-06-29 09:29:47 +00:00
l10n daemon script
96b8c71d3f GIT_SILENT Sync po/docbooks with svn 2024-06-29 01:26:50 +00:00
l10n daemon script
7d81f95592 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-29 01:19:28 +00:00
Xaver Hugl
f1a867ea12 color management: map reference luminance of source and target content to each other
This ensures that different content on the screen matches with the user configured
reference / SDR luminance, and both simplifies SDR<->HDR mapping by removing the need
for special casing that situation and significantly improves the mapping in some cases.
As we don't get any reference luminance values for HDR content (yet), this commit
assumes that HDR content is prepared for the reference luminance of the preferred
color description.
2024-06-28 13:16:02 +00:00
Xaver Hugl
15589c9997 color management: change brightness information names to be shorter and more correct
Brightness is a loose word for how bright we perceive things to be, but the
values we're using are about objective measurements, about luminance instead.
2024-06-28 13:16:02 +00:00
Xaver Hugl
280594354c plugins/qpa: set deprecated functions option correctly
If a context is forward compatible, that means the deprecated functions are not
available, and if the QSurfaceFormat::DeprecatedFunctions option is set, that means
they are available.
Wrongly setting QSurfaceFormat::DeprecatedFunctions thus causes Qt to use OpenGL in
a way the context doesn't actually support.

CCBUG: 486460
2024-06-28 12:50:50 +00:00
Vlad Zahorodnii
a9377db1a9 plugins/kdecoration: Fix MenuButton not accepting button press events
If two mouse areas are stacked on top of each other and a button press
event is sent so one of them accepts it, QMouseEvent::isAccepted() will
still return false. It's a QtQuick bug, see the associated upstream bug
report https://bugreports.qt.io/browse/QTBUG-126733.

On the other hand, given that the MenuButton implements its own input
handling, we can port it away from DecorationButton to mitigate the issue.

BUG: 488993
2024-06-28 12:38:04 +00:00
Xaver Hugl
8f35a9ea8d plugins/colorcorrection: simplify the effect, merge the shader files and support color management 2024-06-28 12:23:48 +00:00
Vlad Zahorodnii
cfe5bf2073 opengl: Reset OpenGlContext::currentContext() if it's destroyed
GlxContext destructor doesn't reset s_currentContext.

BUG: 488830
2024-06-28 11:24:58 +00:00
l10n daemon script
09b45a9937 GIT_SILENT Sync po/docbooks with svn 2024-06-28 01:36:56 +00:00
l10n daemon script
d7ad0083a5 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-28 01:24:07 +00:00
David Edmundson
d2c648f6cc input method: Drop unused member variable
The preedit struct holds values that need to be effectively double
buffered till the preedit string is set. There is no need to store the
text in this struct as it is reset at the end of setPreeditString
2024-06-27 22:05:41 +00:00
Andrew Shark
13b2c43b2b Add Colorblindness Correction effect keywords
This allows to easily reach this effect when searching in system settings.

BUG: 489329
2024-06-27 20:57:48 +00:00
Vlad Zahorodnii
3fd9026a01 Make X11Window::{update,discard}WindowPixmap noop on Wayland
These are relevant only to X11 session.
2024-06-27 20:34:42 +00:00
Vlad Zahorodnii
11d3f27e97 Remove the surfaces tab in the debug console
It's usefulness is doubtful, the current visuals poorly map to the
wayland abstractions, and it's partially incomplete because surface
previews are only shown for surfaces that have wl_shm buffers attached.
Tree hierarchy changes are also handled very poorly.
2024-06-27 20:54:42 +03:00
Xaver Hugl
8314cdf89d window: adhere to window rules in checkWorkspacePosition
BUG: 489117
2024-06-27 11:56:07 +00:00
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