Commit graph

19398 commits

Author SHA1 Message Date
Vlad Zahorodnii
07c4057180 autotests: Stabilize tests that create Xwayland windows
The order in which Xwayland surfaces are associated with X11 windows is
undefined, meaning that we cannot assume that a newly created X11 window
won't have a surface associated with it already.
2021-05-15 16:16:48 +00:00
Alexander Lohnau
8125f9137f
GIT_SILENT Remove obsolete KRunner property 2021-05-15 10:03:33 +02:00
l10n daemon script
1a1a6077c1 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"
2021-05-15 01:19:22 +00:00
Vlad Zahorodnii
77a9d38166 Make libdrm required dependency
As is, kwin with the drm backend results in the most pleasant user
experience on Wayland. Given that and the fbdev being about to be
dropped, making libdrm a required dependency seems a reasonable decision.
2021-05-14 18:00:40 +00:00
Aleix Pol
3b05823f1f libinput: bump required version
So we can remove ifdefs and weird cases to support versions that are far
too old to support anyway.
2021-05-14 17:47:46 +00:00
Nate Graham
b29f211fe4 Disable translucency effect by default
Many reasons have been brought up over the years for why this effect is
not appropriate to be enabled by default:
- It was designed to highlight the whizzy technical feature of being
  able to make windows transparent, which is no longer particularly
  impressive today.
- It looks visually dated.
- It can produce a confusing visual soup by blending a window being
  moved or resized with the content below it, which we recently disabled
  for the Highlight Windows effect.
- If one window is covering up another as a way to deliberately hide the
  content of the lower window, this effect will reveal the hidden
  content whenever the upper window is moved or resized at all.

Overall it does not seem to have enough advantages to offset these
issues. Let's disable it by default--but only for the people who did not
modify its configuration at all. We can assume that those people like
it, so let's keep it on for them.

BUG: 384054
FIXED-IN: 5.23

Closes Phab task T7915
2021-05-14 15:21:11 +00:00
Vlad Zahorodnii
c1969afa10 wayland: Port logind session from GetSessionByPID
It's needed to make kwin_wayland properly systemd managed. A service
launched using systemctl --user is per user, not session.

As a consequence, user services run outside the session. Applications
that deal with user session need some quirks to work with systemd boot.

Unfortunately, GetSessionByPID() doesn't work well with systemd boot,
see bug 433364. GetSession(auto) is shown to work better.
2021-05-14 12:59:26 +00:00
Aleix Pol
f4715b9ac5 inputmethod: deactivate the input method when we textinputv3 is committed as disabled
Fixes InputMethodTest::testEnableDisableV3 on my system when running on
Valgrind, should hopefully also fix on CI.
2021-05-14 09:28:57 +00:00
Vlad Zahorodnii
03445424e9 x11: Don't initialize X11Client's geometries to 0,0 100x100
It is actually okay to start with an empty frame geometry because
manage() will compute the frame geometry from the client's window size.
2021-05-14 07:00:20 +00:00
Vlad Zahorodnii
e5799a2131 Remove force geometry flags
With the client-side decoration changes, kwin will properly determine
whether the window needs to be configured even if the frame geometry has
not changed.

This change slightly changes the semantics of the setFrameGeometry()
method. Prior to this, it was possible to force a geometry, i.e. block
other geometry updates, however such a behavior is counter-intuitive and
it exponentially increases the complexity of code.

As far as I know, the force flag was needed to propagate geometry
changes if the frame geometry doesn't change, but the client geometry
does. With the client-side decoration changes, the force flag is not
needed, as kwin now takes into account the client geometry and the frame
geometry when determining whether to send a configure event.
2021-05-14 07:00:20 +00:00
Vlad Zahorodnii
90d60a530f Try to update geometry without checking if it's the same
Even if the frame geometry is the same, the client geometry may not be
the same. We need to call setFrameGeometry() unconditionally.
2021-05-14 07:00:20 +00:00
Vlad Zahorodnii
b6dd7c5860 autotests: Introduce own idle inhibit v1 helpers
Non-core wrappers in kwayland are deprecated. qtwaylandscanner needs to
be used instead for generating client-side wrappers.
2021-05-14 05:36:08 +00:00
Aleix Pol
b9b58b6e66 Use preferred QFileInfo::exists API as documented 2021-05-14 01:35:33 +02:00
Aleix Pol
c405877801 Only mark slots as slots 2021-05-14 01:35:33 +02:00
Aleix Pol
f4adff66cc Do not detach when getting a readonly reference 2021-05-14 01:35:33 +02:00
Aleix Pol
b8a355252d Q_ENUMS -> Q_ENUM
It's more useful
2021-05-14 01:35:33 +02:00
Aleix Pol
b6867bcb75 Normalize SLOT() definition 2021-05-14 01:35:33 +02:00
Aleix Pol
d6e8148675 Add missing Q_EMIT when emitting signals 2021-05-14 01:35:33 +02:00
Aleix Pol
5b5ef7f07e Remove unused variables 2021-05-14 01:35:33 +02:00
Aleix Pol
4b3cc58073 Do not override parent's class signals with the same name 2021-05-14 01:35:33 +02:00
Aleix Pol
035ea75ab7 Use qAsConst in fors when there's a risk for it to detach 2021-05-14 01:35:33 +02:00
Aleix Pol
50dd08531e Make sure we do not get references on temporary objects 2021-05-14 01:35:33 +02:00
Aleix Pol
f70256931c --warning: treat unused variables so we are not warned about them 2021-05-14 01:35:33 +02:00
Aleix Pol
2a9a436307 Prefer Q_ENUM to Q_ENUMS
It does more things and it makes clazy complain.
2021-05-14 01:35:33 +02:00
Aleix Pol
a06bf936bc --warning: Remove unnecessay cast 2021-05-14 01:35:33 +02:00
Aleix Pol
1754744297 Add switch case for impossible enum
It's already treated above and the compiler just does not see it.
2021-05-14 01:35:33 +02:00
Aleix Pol
6176a63d76 Remove unnecessary moc files
They are not necessary if there's no QObjects being declared and just
produce a warning from moc
2021-05-14 01:35:33 +02:00
Aleix Pol
edd1ec389b input: Use specific API
No need to construct values that are already provided
2021-05-14 01:35:33 +02:00
Aleix Pol
84200e7e38 EffectWindow::geometry -> EffectWindow::frameGeometry
::geometry is deprecated.
2021-05-14 01:35:33 +02:00
Vlad Zahorodnii
bf2e54fb5e wayland: Make some animations less glitchy
If a minimized window is animated by the AnimationEffect, the final
layer repaint will be ineffective. In order to account for that, the
AnimationEffect adds the layer repaint to data.paint in the
prePaintScreen() hook. The issue with this hack is that it does not
work on Wayland with per screen rendering.

If a window is animated on screen B, but the layer repaint is added
to data.paint when screen A is painted, there will be a ghost of the
window on screen B.

In order to fix this issue, we need to use effects->addRepaint(), but
we cannot use it in prePaintScreen() as it won't have immediate effect.

effects->addRepaint() can be called either from window paint hooks
or from the postPaintScreen() hook. This change goes after the latter
option.

In the prePaintScreen() hook, AnimationEffect will only advance
animations. In the postPaintScreen() function, it will perform final
janitorial chore.
2021-05-13 20:29:41 +00:00
Vlad Zahorodnii
33b2ea2058 wayland: Fix internal connection teardown
The internal EventQueue is a child of the registry object. This means
that after the registry is destroyed, all proxy objects in that event
queue are going to have invalid reference to it, which is not a problem
as long as the wl_display_dispatch() function is not called.

The wl_display_dispatch() function uses wl_proxy's queue reference to
enqueue incoming events to that queue.

Unfortunately, during teardown, the internal ConnectionThread may
dispatch events right after the registry object has been destroyed,
which can lead to a crash.

In order to fix the crash, we need to destroy all proxy objects and only
after that we can destroy the event queue. It's okay if wayland events
are dispatched in between.
2021-05-13 18:51:35 +00:00
Nate Graham
7861c8d389 Expose compositing status to Switcher QtQuick item
This allows Task Switcher visualizations to know whether compositing is
active or not so they can adjust their visual representations
accordingly, if needed.
2021-05-13 18:50:11 +00:00
Jonathan Riddell
2f0088de93 Update version number for 5.22.80
GIT_SILENT
2021-05-13 15:09:31 +01:00
Vlad Zahorodnii
7d0cad07fb autotests: Fix XwaylandInputTest
For some reason, Xwayland doesn't like starting without outputs. If
outputs are added later, it sends bogus EnterNotify and LeaveNotify
events.
2021-05-13 11:44:41 +00:00
Jonathan Riddell
0efc9e8e7f Update version number for 5.21.90
GIT_SILENT
2021-05-13 10:21:29 +01:00
Jonathan Riddell
2358a9b031 Update kf5 version requirement to 5.82
GIT_SILENT
2021-05-13 09:56:06 +01:00
Vlad Zahorodnii
432c617d10 Revert "wayland: Simplify XdgSurfaceConfigure"
This reverts commit 110182b213.

The reverted commit has introduced a regression where interactively
moved windows jump back to their old position. This needs some time for
proper investigation. Due to beta rolling out quite soon, it will be
better to revert the change.
2021-05-13 10:18:10 +03:00
Aleix Pol
b7389c6f1a libinput tests: Fix new-delete-type-mismatch error when using ASAN 2021-05-13 06:53:13 +00:00
Vlad Zahorodnii
110182b213 wayland: Simplify XdgSurfaceConfigure
Rather than have an error prone way to detect whether a configure event
has good position information, handle the case where the plasma shell
surface has a position hint explicitly.
2021-05-13 06:50:24 +00:00
Vlad Zahorodnii
0e63b4e8cc wayland: Simplify plasmashell surface installation code 2021-05-13 09:20:20 +03:00
Vlad Zahorodnii
7475385c82 Make scale and glide effect ignore lockscreen greeter
On X11, the lockscreen greeter is an override-redirect window so the
scale and the glide effect ignore it.

On Wayland, the lockscreen greeter is a regular window so both effects
try to animate it upon the screen being unlocked, which looks bad.
2021-05-13 05:46:30 +00:00
Vlad Zahorodnii
0f60cc68a9 autotests: Prefer stackingOrder() over xStackingOrder()
This reduces the number of usages of xStackingOrder(), which simplifies
the reasoning about when it can be marked as dirty.

Since internal windows are now in the regular stack, InternalWindowTest
can use stackingOrder().

As for X11ClientTest, there's no specific reason why it uses the x stack
instead of the regular one.
2021-05-13 04:58:45 +00:00
Vlad Zahorodnii
32848490ba wayland: Call KSldApp::lockScreenShown() for layer-shell lockscreen clients
The lockscreen no longer creates xdg-toplevel surfaces.
2021-05-12 22:14:42 +03:00
Vlad Zahorodnii
d78d686690 autotests: Stabilize ActivationTest::testSwitchToWindowMaximized 2021-05-12 20:44:28 +03:00
Aleix Pol
8e63bd230f InternalWindowEventFilter: Also track pressed ids for touch points != 0
So far we were only tracking the first touch point, meaning that if 2
touch points were applied to the internal window and removed one, the
second's events would then be sent to Wayland, which would assert since
it didn't know it had been pressed in the first place.

This fixes InternalWindowTest::testTouch
2021-05-12 17:38:03 +00:00
Vlad Zahorodnii
e187e766b0 Only promote windows to upper layers if one of the group members is in fullscreen mode
We want panels to be behind fullscreen windows, but osd windows above
them. With the current layer promotion logic, the panel will be promoted
to the osd layer, which is undesirable. This change restores the old
behavior by allowing layer promotion only to ActiveLayer.

BUG: 436985
2021-05-12 17:02:04 +00:00
Vlad Zahorodnii
d031381f19 Fix a typo
We should update stacking_order, not x_stacking_order.
2021-05-12 16:59:08 +00:00
Vlad Zahorodnii
e29dee951d Don't invalidate x stacking order prematurely
Workspace::updateStackingOrder() will mark it as dirty if the stacking
order actually changes due to a constraint being added or removed.
2021-05-12 16:59:08 +00:00
Vlad Zahorodnii
c9ee2f06db autotests: Fix testActivation
Currently there's a race condition with regards to the first configure
event with the activated state.
2021-05-12 19:21:38 +03:00
Aleix Pol
0fbde9a2e0 Add a virtual destructor for XdgSurfaceConfigure
It's inherited by XdgToplevelConfigure and we need to make sure that the
object gets destroyed properly.
Alternatively we get a new-delete-type-mismatch error in ASAN and
rightfully so.
2021-05-12 16:14:31 +02:00