20572 Commits (81905dbfaa75a4d616655064fc1952caab517350)
 

Author SHA1 Message Date
Weng Xuetian 0b1565c54c
Do not send reset to an already active input context.
This may be problematic for certain client, e.g. firefox, and cause
input always reset after any key press. Also, sending reset on an
activate also does not match the text input v3 semantics.
3 years ago
Weng Xuetian bd40db7dd1
Fix text input v3 related protocol usage.
zwp_input_method_v1 does not support generic double buffered event.
deleteSurroundingText need to be followed with done().
zwp_input_method_v1 preedit event order is preeditCursor,
preeditStyling, preeditString. To align it with text-input-v3 semantices,
send done() after receiving preedit_string() from input method.
3 years ago
Weng Xuetian c07d3ce7ea
Also fix the flipped case anchor for input panel overlay mode. 3 years ago
Weng Xuetian 8c54c5937a
Fix the input panel popup anchor position.
It should be bottom left instead of top left of the cursor rect.
3 years ago
l10n daemon script 5d99392d1e 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
Vlad Zahorodnii 4459463823 Make focused window and decoration mutually exclusive 3 years ago
Vlad Zahorodnii 41237ea30b Ignore decoration when updating focused window in PointerInput and TouchInput
Currently, it's possible to have the case where the pointer input device
handler or the touch input device handler thinks that there's a focused
window, but the corresponding focused surface in wayland seat is unset,
because the pointer hovers the server side decoration.

If the server side decoration is destroyed, the input device handler will
fail to update wayland seat's focused surface.

In order to make pointer input device handler and touch input device
handler code more intuitive, this change makes focusUpdate() functions
ignore the decoration.

BUG: 411884
BUG: 440380
3 years ago
David Redondo b1686fd472 Always keep focus on active client when switching activities
While finding this to be benficial when working on the activity
switcher I think it makes sense in general to keep focus on the
current client instead of potentially switching away.
3 years ago
Xaver Hugl dde7a2efac backends/drm: fix crash with direct scanout
BUG: 447079
3 years ago
Fushan Wen 1d0e75bc5c x11client: Replace activityList with m_activityList
KWin does not update activity status when setting `_KDE_NET_WM_ACTIVITIES`
to nullUuid outside of KWin, which causes "All Activities" not working
as expected for KWindowSystem.

`X11Client::activityList` is not kept in sync with
`AbstractClient::m_activityList`. Move `m_activityList` from private to
protected, and use it in `X11Client::readActivities`

BUG: 440496
3 years ago
Vlad Zahorodnii 34a0813567 wayland: Avoid creating abstract socket for Xwayland on FreeBSD
FreeBSD does not support abstract sockets.
3 years ago
Weng Xuetian e71fe9ba79 Support text-input-v3 cursor position and position the overlay mode input panel within the screen. 3 years ago
Weng Xuetian 7a270b5d78 Use QPointer to monitor input method server connection.
Input method may crash and leave a dangling pointer. DBus interface may
access the invalid pointer and crash kwin.
3 years ago
Weng Xuetian d66be7b99f Forward xkb modifier changes to input method.
Since not all the key are forwarded to input method, any modifier
changes need to be forwarded to input method as long as keyboard grab
is active.
3 years ago
Weng Xuetian 11f6292cb5 Move input keyboard filter to be just before the key is sent to application.
Features like global shortcuts should be handled before the input
method.
3 years ago
Weng Xuetian 9e68357ce9 Do not unset DISPLAY and XAUTHORITY for input method.
Those variable are required for XIM to work for Xwayland application.
3 years ago
Vlad Zahorodnii 4bd9708503 autotests: Fix PointerInputTest::testDecoCancelsPopup()
We need to ack configure event that wants to change deco mode.
3 years ago
Vlad Zahorodnii 92317c5eff Remove XdgSurfaceClient::updateGeometryRestoreHack()
It's not defined anywhere.
3 years ago
Vlad Zahorodnii be32a1b1f5 Move createDecoration() and destroyDecoration() from AbstractClient to InternalClient
They are used only by InternalClient. AbstractClient doesn't need to
handle the destruction of DecorationBridge because its lifetime matches
kwin's lifetime.
3 years ago
Vlad Zahorodnii acb0683e0d wayland: Properly handle async xdg-decoration updates
Currently, if a window switches between SSD and CSD, it is possible to
encounter a "corrupted" state where the server-side decoration is wrapped
around the window while it still has the client-side decoration.

The xdg-decoration protocol fixes this problem by saying that decoration
updates are bound to xdg_surface configure events.

At the moment, kwin sort of applies decoration updates immediately. With
this change, decoration updates will be done according to the spec.

If the compositor wants to create a decoration, it will send a configure
event and apply the decoration when the configure event is acked by the
client. In order to send the configure event with a good window geometry
size, kwin will create the decoration to query the border size but not
assign it to the client yet. As is, KDecoration api doesn't make
querying the border size ahead of time easy. The decoration plugin can
assign arbitrary border sizes to windows as it pleases it. We could change
that, but it effectively means starting KDecoration3 and setting existing
window deco ecosystem around kwin on fire the second time, that's off the
table.

If the compositor wants to remove the decoration, it will send a
configure event. When the configure event is acked and the surface is
committed, the window decoration will be destroyed.

Sync'ing decoration updates to configure events ensures that we cannot
end up with having both client-side and server-side decoration. It also
helps us to fix a bunch of geometry related issues caused by creating
and destroying the decoration without any surface buffer attached yet.

BUG: 445259
3 years ago
Vlad Zahorodnii db996e0824 Remove updateDecoration() in AbstractClient 3 years ago
Vlad Zahorodnii 70f46970da Invalidate decoration explicitly
Lets us to remove AbstractClient::updateDecoration().
3 years ago
Vlad Zahorodnii 01a46ff389 Reduce code duplication between X11Client::createDecoration() and AbstractClient::createDecoration() 3 years ago
l10n daemon script 0db88c3ea6 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 9781f43a48 backends/drm: remove unneeded methods in DrmBackend 3 years ago
Xaver Hugl 5d5bb2422c backends/drm: move definitions into cpp file 3 years ago
Xaver Hugl ca79f11ede backends/drm: minor refactor of DrmPipeline 3 years ago
Vlad Zahorodnii 991f6b458d Create effects handler after letting toplevels setup compositing
Many effects use the stacking order property of the effects handler in
their constructors. This means that windows should have compositing
setup by the time effects are loaded.

After changing how binary effect plugins are loaded, i.e. not queueing
loading effects, but loading them immediately, some effects broke
because the effects handler is created before windows setup compositing.

This change attempts to fix those effects by rearranging compositor
startup code so windows setup compositing first, then create the effects
pointer.
3 years ago
Vlad Zahorodnii b26227348c wayland: Move or resize xdg-toplevel window during initialization only if geometry is enforced by a window rule
move() and resize() functions are not convenience helpers around the
moveResize() function. They communicate what kwin wants to see after the
corresponding change is applied. It's needed to make asynchronous
geometry updates work.

This change replaces a moveResize() during XdgToplevelClient
initialization with explicit move() and resize() function calls instead,
so it's more clear what the expected end result is.
3 years ago
jiya dong fed45422cf fix: Fix the problem of rotating the screen in full-screen state and maximizing the state after exiting full-screen. 3 years ago
Aleix Pol eaa2f538e3 libinput: Pass QStrings as constref 3 years ago
Aleix Pol 7c6b0d9ef4 libinput: Install org.kde.kwin.InputDevice.xml exposing libinput/device.h
It allows to more comfortably create tooling that implements it.
3 years ago
Aleix Pol 5ff22d7765 libinput: Successfully set the output of a device from the dbus interface 3 years ago
Matt Scheirer 449da861f3 Grammar and syntax changes suggested by @vladz 3 years ago
Matt Scheirer 6287ab16f4 [libinput] Add support for display mapping 3 years ago
Matt Scheirer e51cefe136 [libinput] Serialize QMatrix4x4 for KConfig 3 years ago
Matt Scheirer a719ceab4a [libinput] Persist device calibration & orientation 3 years ago
Matt Scheirer 21ef0925ab [libinput] Expose calibration and orientation on devices over dbus 3 years ago
Xaver Hugl f392a9ba39 backends/drm: add some documentation about the drm api 3 years ago
Vlad Zahorodnii ec8f4140c3 autotests: Add no border window rule tests 3 years ago
Vlad Zahorodnii 64f2cdf9ed Fix memory leak in some plasma components
A few plasma components cache QSGTexture. Those components rely on
texture references going away with QSGNode users. However, with the
current tear down logic, OffscreenQuickView won't destroy any paint
nodes.

Destroy QQuickRenderControl before QQuickWindow to ensure that are no
paint nodes left alive after OffscreenQuickView.

BUG: 444429
BUG: 444381
BUG: 444077
BUG: 444306
3 years ago
Xaver Hugl 3fb14035cd backends/drm: only use atomic gamma size with AMS
For some reason the property exists with legacy, too. If you try to set
legacy gamma with atomic gamma size it'll fail
3 years ago
Xaver Hugl 58e5a5c9f7 backends/drm: also log properties with legacy
Can be useful to find bugs
3 years ago
Xaver Hugl 4dec21d8e4 backends/drm: remove unused user data 3 years ago
nerdopolis turfwalker 37c3e0d158 Fix crash on simpledrm 3 years ago
Vlad Zahorodnii 09b8f5d838 effects/overview: Animate window icon opacity
This looks better.
3 years ago
Alexander Lohnau 901cc62d28 Remove unused code for loading task switcher KCM
For all the task switchers on my system there is no KCM installed:

```bash
rg 'X-KDE-ParentComponents=(PlasmaXLight|org.kde.breeze.desktop|org.kde.breezedark.desktop|org.kde.breezetwilight.desktop|org.kde.breeze.desktop|org.kde.breezedark.desktop|org.kde.breezetwilight.desktop|org.kde.plasma.mycroft.bigscreen|small_icons|big_icons|compact|text|present_windows|thumbnail_grid|thumbnails|informative)'
```

As the docs state, this is only for buildin effects. Which means it is internal API.
Also I consider the choice of displaying a KCM *or* the preview odd, IMHO the preview
is the most important part.

I stumbled upon this when reviewing the metadata files as part of the preparation
for https://phabricator.kde.org/T14564.

Also this way of plugin loading is discouraged for performance reasons, because all the
plugins from the namespace have to be reopened to get their metadata.
3 years ago
l10n daemon script 92d3345310 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
Vlad Zahorodnii 1f798485b9 effects/scale: Tune animation params
Use standard easing curves in animations. OutCubic for the intro
animation and the InCubic for the outro animation.

Hidden opacity options were removed because I don't think they are
needed anymore. I made the starting opacity 0.4 to make the animation
look closer to what it would have been with an ease-out curve without
realizing it.
3 years ago
Vlad Zahorodnii acea685b04 autotests: Replace output management test with a more useful test
The output management test checks the implementation of output
management capabilities in the virtual backend, which is not helpful.

This change replaces it with a more useful test that verifies how
windows are placed after an output change.
3 years ago