20580 Commits (dfe69a678446a02adc1a01b732ed64bbaab22569)
 

Author SHA1 Message Date
Vlad Zahorodnii dfe69a6784 effects: Enable the scale effect by default
It looks fancier than the fade effect.
3 years ago
Alexander Lohnau 1322b52b03 kwin scripts: No longer copy videowall metadata file in kservices folder
We load the KCM by path now and don't use KServiceTypeTrader
3 years ago
Alexander Lohnau ab2ac07e2a Define X-KDE-ConfigModule for videowall KCM
This way we do not need to go through KServiceTypeTrader for the querying
3 years ago
Alexander Lohnau a1340a9815 Rework determining of scripted effect config
Currently the plugin needs to set a property in oder to be considered configurable.

In kpackage we have the concept of optional and required files, based on the existence of those
optional files we can define different behavior. For example in Plasma the applets can optionally have a config ui.

Because here we don not use The KPackage:Package class, it is simpler to check the existence of the files on disk.
3 years ago
Alexander Lohnau f2dd50e1f9 Clean up legacy configmodule querying
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.
3 years ago
Alexander Lohnau 32f9ba0caf Do not embed json metadata in KCMs that get loaded by path
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.
3 years ago
Alexander Lohnau 728b449891 Effectsmodel: Load KCM by path instead of searching for plugin by id
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.
3 years ago
Devin Lin c59c52cb0c Expose org.kde.kwin.ColorCorrect.xml dbus file 3 years ago
Xaver Hugl 81905dbfaa backends/drm: properly handle pending transformations
AbstractWaylandOutput::pixelSize returns the size with already set transformation
applied but the render backends need the pending transformation
3 years ago
Xaver Hugl b06ec13ead backends/drm: test crtc+connector combinations with hardware rotation
This should enable KWin to use hardware rotation in more situations. As
a fallback all hardware rotation is disabled and the test is done again
3 years ago
Xaver Hugl dc5cddd33f backends/drm: ensure hardware transforms are properly applied and tested
Testing only the pipeline that this output uses is not enough and can
cause breakage on multi-monitor setups.
3 years ago
Xaver Hugl 2af3f46357 backends/drm: adjust logging verbosity 3 years ago
Ismael Asensio 088e870d54 TabBox: Add SwitcherItem to declarative API 3.0
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.
3 years ago
Vlad Zahorodnii 457e9faaa1 Avoid sending a configure event when starting interactive move
There's nothing to configure that needs an acknowledgement from the
client.
3 years ago
Vlad Zahorodnii feaebcf81d Rename XdgToplevelClient::m_requestedStates to m_nextStates
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).
3 years ago
Vlad Zahorodnii 5420e11bd4 Make AbstractClient::titlebarPosition() return Qt::Edge
Conceptually, it's an edge, the titlebar can't be in a window corner.
3 years ago
Fabian Vogt 63a2a88e6c Allow starting kwin_wayland as root
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.
3 years ago
Laurent Montel 9521ca1e56 Use const'ref here 3 years ago
Vlad Zahorodnii 5f83f2a781 Replace abort() with Q_ASSERT and Q_UNREACHABLE
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.
3 years ago
Vlad Zahorodnii dde3010353 Move X11-specific code from interactive move resize handler to X11Client
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.
3 years ago
Vlad Zahorodnii d85ab218ee Avoid changing geometry when finishing interactive move resize
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.
3 years ago
Vlad Zahorodnii dbee0573c4 Lock clientStepUserMovedResized to move resize geometry changes
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.
3 years ago
Vlad Zahorodnii dd7972ce46 wayland: Avoid repetitive move() and resize() calls during interactive move/resize
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.
3 years ago
Vlad Zahorodnii fcf0b4796f Drop geometry tip
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.
3 years ago
Weng Xuetian 6cc0c204fd
Fix tests by checking if InputMethod::self() is null.
Only integration test has InputMethod instance.
3 years ago
Méven Car d81b106c15 Apply the rgbrange read from Kscreen configuration on startup
CCBUG: 442520
3 years ago
Xaver Hugl 93d5127014 backends/drm: improve dmabuf feedback
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.
3 years ago
Xaver Hugl 0ba2c35e1a dmabuf feedback: limit modifiers to those supported by egl 3 years ago
Xaver Hugl 5a6f1e42c1 backends/drm: make the placeholder screen as big as the last screen
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
3 years ago
Vlad Zahorodnii bc3d80db2a Use default member initialization in Compositor consistently 3 years ago
Vlad Zahorodnii e81a360194 Bump libepoxy to 1.3
1.3 has been released in 2015 which is sufficiently old enough.
3 years ago
Vlad Zahorodnii 9e97c06758 Move graphics reset handling to RenderBackend
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.
3 years ago
Weng Xuetian ca7298a325 Ensure modifier change is forwarded after the key sending to input method.
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.
3 years ago
l10n daemon script db55e463f0 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"
3 years ago
Xaver Hugl 5e75d2a095 backends/drm: fix cursor crash 3 years ago
l10n daemon script 1d6de6a3a9 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"
3 years ago
l10n daemon script 5e5752b8c4 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"
3 years ago
Julius Zint 3b4d558371 Improve window decorations in OpenGL scene
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.
3 years ago
Ismael Asensio e655dc7b42 autotests/xdgTestClientRules: Add helper function setWindowRule()
Reduces ~700 lines of the same code boilerplate to simplify the tests
and prevent mistakes.
3 years ago
Vlad Zahorodnii 84690a0de6 scenes/opengl: Move copying front buffer to back buffer to X11 specific code
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.
3 years ago
Aleix Pol 13b85d77fc inputmethod: Expose VirtualKeyboard.willShowOnActive on dbus
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.
3 years ago
Xaver Hugl 6a99bfd2f4 make software cursors work per output 3 years ago
Weng Xuetian 8a2f64fbe1
Do not call setActive(true) when request input panel to show
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.
3 years ago
Weng Xuetian c074e2eb42 Try our best to convert preedit styling to text-input-v3 cursor range.
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.
3 years ago
Weng Xuetian f50866d3f8 Fix different semantics of delete_surrounding_text between zwp_input_method_V1 and text_input_v{2,3} 3 years ago
Vlad Zahorodnii e4ccf24cd9 effects/overview: Change default shortcut to Meta+W
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
3 years ago
Xaver Hugl f2b29e3555 backends/drm: deep color support
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.
3 years ago
Xaver Hugl cfeeb817bf backends/drm: query min and max values for properties 3 years ago
Weng Xuetian 4f2c3a00c4 Change InputMethod::show() and InputMethod::hide() to not change active state.
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.
3 years ago
Weng Xuetian 119f0d02be Do no send empty preedit string to text-input-v3.
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.
3 years ago