19394 Commits (3b05823f1f71da9ee26e7e264ea96c7c3e3cbe11)
 

Author SHA1 Message Date
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.
3 years ago
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
3 years ago
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.
3 years ago
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.
3 years ago
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.
3 years ago
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.
3 years ago
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.
3 years ago
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.
3 years ago
Aleix Pol b9b58b6e66 Use preferred QFileInfo::exists API as documented 3 years ago
Aleix Pol c405877801 Only mark slots as slots 3 years ago
Aleix Pol f4adff66cc Do not detach when getting a readonly reference 3 years ago
Aleix Pol b8a355252d Q_ENUMS -> Q_ENUM
It's more useful
3 years ago
Aleix Pol b6867bcb75 Normalize SLOT() definition 3 years ago
Aleix Pol d6e8148675 Add missing Q_EMIT when emitting signals 3 years ago
Aleix Pol 5b5ef7f07e Remove unused variables 3 years ago
Aleix Pol 4b3cc58073 Do not override parent's class signals with the same name 3 years ago
Aleix Pol 035ea75ab7 Use qAsConst in fors when there's a risk for it to detach 3 years ago
Aleix Pol 50dd08531e Make sure we do not get references on temporary objects 3 years ago
Aleix Pol f70256931c --warning: treat unused variables so we are not warned about them 3 years ago
Aleix Pol 2a9a436307 Prefer Q_ENUM to Q_ENUMS
It does more things and it makes clazy complain.
3 years ago
Aleix Pol a06bf936bc --warning: Remove unnecessay cast 3 years ago
Aleix Pol 1754744297 Add switch case for impossible enum
It's already treated above and the compiler just does not see it.
3 years ago
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
3 years ago
Aleix Pol edd1ec389b input: Use specific API
No need to construct values that are already provided
3 years ago
Aleix Pol 84200e7e38 EffectWindow::geometry -> EffectWindow::frameGeometry
::geometry is deprecated.
3 years ago
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.
3 years ago
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.
3 years ago
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.
3 years ago
Jonathan Riddell 2f0088de93 Update version number for 5.22.80
GIT_SILENT
3 years ago
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.
3 years ago
Jonathan Riddell 0efc9e8e7f Update version number for 5.21.90
GIT_SILENT
3 years ago
Jonathan Riddell 2358a9b031 Update kf5 version requirement to 5.82
GIT_SILENT
3 years ago
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.
3 years ago
Aleix Pol b7389c6f1a libinput tests: Fix new-delete-type-mismatch error when using ASAN 3 years ago
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.
3 years ago
Vlad Zahorodnii 0e63b4e8cc wayland: Simplify plasmashell surface installation code 3 years ago
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.
3 years ago
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.
3 years ago
Vlad Zahorodnii 32848490ba wayland: Call KSldApp::lockScreenShown() for layer-shell lockscreen clients
The lockscreen no longer creates xdg-toplevel surfaces.
3 years ago
Vlad Zahorodnii d78d686690 autotests: Stabilize ActivationTest::testSwitchToWindowMaximized 3 years ago
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
3 years ago
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
3 years ago
Vlad Zahorodnii d031381f19 Fix a typo
We should update stacking_order, not x_stacking_order.
3 years ago
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.
3 years ago
Vlad Zahorodnii c9ee2f06db autotests: Fix testActivation
Currently there's a race condition with regards to the first configure
event with the activated state.
3 years ago
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.
3 years ago
Vlad Zahorodnii eef97904b6 Simplify Workspace::constrainedStackingOrder()
Workspace::constrainedStackingOrder() is a constant source of issues.
This change replaces the current logic that builds the stacking order to
hopefully make constrainedStackingOrder() less crashy.

With the new version, constrainedStackingOrder() doesn't perform layer
caching. On the other hand, it's quite rare to see apps in the wild that
have more than just 1 or 2 members in the window group.

BUG: 436095
3 years ago
Vlad Zahorodnii 0de2b73393 Introduce transient constraints api in Workspace
Currently, the Workspace has no any api to constrain one window above
another. This results in having hacks such as keepDeletedTransientAbove()

This change introduces a basic api to constrain a given window above
another. It can be used for ensuring that transient windows are placed
above their parents. It also can be used for stacking the outline window
below the move-resize window.

Internal windows may also have transient parents. Because of that, this
change makes the workspace add internal clients to the stacking order by
default. The good thing about it is that it allows us unify some input
related code for "external" windows and internal windows.
3 years ago
Vlad Zahorodnii 9b2b450fdd wayland: Use new api to remove globals safely
BUG: 435258
3 years ago
Aleix Pol 2a32e642ed No need to compare values if we know they already changed
Makes for more readable code as well as less code to execute
3 years ago