In KWin we are allowed to break compat and here all first party consumers
have already been ported for quite a while.
Also the querying is very inefficient, because for every plugin where the
X-KDE-ConfigModule property is not defined all available KCMs have to be opened and
their metadata parsed.
This way we also get rid of the deprecation warning for KPluginMetaData::readStringList.
Doe to 1a0031c08a3b41458eb5bf2097b4cd6452ba3d09 we no longer require json metadata to be embedded.
Also we did not use the metadata anywhere, except for finding the correct plugin.
This way we do not need to embed json metadata in the plugins
and can consequently drop the metadata files entirely.
The resulting metadata object might still be invalid, however KCoreAddons
can handle such cases. See https://phabricator.kde.org/T15094 regarding
create better KCoreAddons API for such cases.
Not sure if this was left out on purpose as a kind of deprecation.
It would be necessary to allow port the tabbox switchers to the newer 3.0 API and use their components (such as `Workspace`)
Probably for `Plasma/5.25` now.
It's consistent with m_nextDecoration and m_requestedStates contains
both requested and "not requested" states (i.e. the ones set by kwin
without waiting for acknowledged from the client, e.g. activated).
Running a Plasma Wayland session as root is not insecure, it is in fact the
opposite. There is no way for other users to somehow influence this session
due to the user separation and the user is more likely to only use this for
administrative actions. This is in contrast to regular user sessions, which
most likely start a mix of unprivileged programs next to privileged windows
like some with authorized kauth helpers or even just sudo in a konsole tab.
This change replaces abort() with Q_ASSERT and Q_UNREACHABLE() macros to
make kwin code base consistent. Besides that, Q_UNREACHABLE may
potentially provide the compiler more info that can be used to generate
more efficient machine code.
When moving or resizing a window on X11, the window based screen edges
won't receive pointer input, so handleInteractiveMoveResize() explicitly
pokes the ScreenEdges to check if there's any approached screen edge.
On Wayland, it's not an issue. This change moves X11-specific code to
X11Client to avoid checking screen edges twice.
When finishing interactive resize operation, the move resize geometry is
already good and the client should have sent the corresponding configure
event. So, this moveResize() call is redundant.
This change moves code that is responsible for quitting maximized
horizontally or vertically mode to the start of the interactive resize
operation. It makes handling of MaximizeFull mode consistent, and it
kills one moveResize() call at the end of the interactive resize
operation, which is good because it makes simpler handling of resizing
aspect ratio aware windows on wayland.
However, in order to make resizing of aspect ratio aware windows good
for real, we will need to augment configure events with gravity info.
On Wayland, the move resize geometry and the frame geometry are
completely out of sync.
This change synchronizes emitting of the clientStepUserMovedResized
signal to the move resize geometry changes.
It simplifies code of InternalClient and XdgSurfaceClient, and makes
adding support for other shell surface protocols easier as there's less
boilerplate stuff that you would need to take care of.
With internal clients and xdg-shell clients, geometry updates occur in
asynchronous fashion when interactively resizing the window.
As is, performInteractiveMoveResize() will call resize() if the move
resize geometry is different from the current frame geometry. This can
result in kwin sending excessive configure events.
With this change, kwin will send less configure events during
interactive resize.
It's not practical, regular users don't care about window geometry. One
could argue that it can be useful for creating window rules, but window
rules kcm pulls relevant properties from kwin.
If needed, one can reimplement this feature as a QtQuick script that creates
an overlay window positioned above the window that is being interactively
moved or resized.
Instead of only allowing the current format, send the default tranches modified
to only contain formats and modifiers suitable for scanout.
In order to not fail when we can't do direct scanout with a given format
(because that may require a modeset, which we don't allow), keep a blacklist
of attempted formats and modifiers for the current client.
The fixed size of 1080p makes windows change their size and place. To
prevent that from happening, make the placeholder screen the same size
as the last disconnected screen.
This is not a bullet proof solution, only a fast one. Ideally KWin
should remember the window layout on a given monitor setup and restore
it when reconnected.
BUG: 447419
FIXED-IN: 5.24
This makes the Scene less overloaded and it's needed for things such as
render layers.
In hindsight, it would be great to merge checkGraphicsReset() and
beginFrame(), e.g. make beginFrame() return the status like in QRhi or
VkSwapchain. If it's OUT_OF_DATE or something, reinitialize the
compositor.
Same as real hardware wl_keyboard, key should be sent before modifier
change. For example, Left Ctrl press and release should produce
key events in the order of Control_L and Control+Control_L.
When creating the texture containing the window decorations, the drawing
code now directly handles the rotation for the left and right
decoration, instead of rotating the image after it has been drawn.
The padding, to prevent texture bleeding, is now a fixed value instead
of being scaled. With this change, there are no longer visual artifacts
for window decorations with rounded corners, when the scaling value is
fractional.
On X11, if buffer age is unsupported, kwin can do some quirks like
copying parts of the front buffer to back buffer to avoid repainting the
whole screen.
Currently, the copying is performed in the opengl scene, which is not
perfect because it makes the scene responsible not only for painting the
scene but also some low level platform specific shenanigans.
This change moves the copying step to the glx and egl backends. It
simplifies the opengl scene, makes it less overloaded and more open to
changes, but it also duplicates code, which is not ideal. However, given
the de-facto deprecated state of the X11 platform, it's sort of acceptable
as the main focus is now on wayland session and the things that are
needed to make it fly as expected.
It can help clients predict how KWin will react. Sometimes, the noise of
seeing a virtual keyboard pop up is reason enough not to focus an input
field.
Observed in kdevelop, that isEnabled() could be false when switching
between different tabs with Ctrl+Tab. But Qt may still call show()
if you click on the texteditor widget. This leads to isEnabled == false but
setActive(true) is called. This causes kdevelop in a usable state because
keyboard grab will be created and no key event will reach application
because isEnabled == false. Under normal circumstances, key will reach
widget first and triggers another text_input_v2 enable to make input
method work properly.
text-input-v3 does not have preedit styling, instead, it can only
specify the range of cursor. Try to keep track of any
highlight/selection style range and combine them together. If it matches
the cursor position, use it as the cursor range.
Ctrl+Meta+D is already taken by the Minimize All script. "W" in Meta+W
stands for "window". Meta+O wasn't chosen because it's one of a
finger-stretcher.
BUG: 445800
This commit makes 10 bits per color channel the default color depth, which
should reduce banding on outputs that support color formats with more than
8 bits per color channel. In order to support this the commit also removes
the dependency of the EglGbmBackend on a specific format and EglConfig and
instead makes those per-Output properties.
Qt usually request InputMethod::hide() upon unfocus, but
InputMethod::show() is actually never called if focus transfer is done
by keyboard, which leads to a permanent disabled input method state.
It can be easily reproduced with a window with two text field, e.g.
QFileDialog, by pressing tab to switch the focused widget.
The semantics of hide/show should not deactivate the input method.
Instead, it should simply hide/show the input panel. Also it should not
be a hard request for input method to permanently hide the window. When
input method asked to show it again, the input panel window should be
shown.
zwp_input_method_v1 has some different semantics comparing to
text-input-v3. There is no way to indicate that "clear preedit" with
zwp_input_method_v1. In some client (Namely, Gtk), receiving an empty
preedit string will also trigger replace selection action. For example,
focus into address bar in firefox will automatically select the URL in
the address bar, and a following empty preedit string will clear the
selection which is not desirable.
To avoid such behavior, simply send an empty "done()" to clear text
input v3 preedit if preedit is empty.