19377 Commits (50dd08531e431304ad4b398392820372682b9c83)
 

Author SHA1 Message Date
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
Aleix Pol 8979f83e38 Unify the code that turns StrutAreas into QRegion 3 years ago
Aleix Pol 69b7b523f8 Make MoveResizeWindowTest::testGrowShrink more reliable
We need to make sure that the information from
toplevelConfigureRequestedSpy is in place to be used, otherwise we get
an empty size and it doesn't work.
3 years ago
Aleix Pol f6c2861b73 strutstest: fix top panel/ivnalid strut 2
The client area is detected as invalid and ignored by
Workspace::updateClientArea.
3 years ago
Aleix Pol 35970686e1 Implement ping on tests
Otherwise there's no pong and we get unnecessary noise.
3 years ago
Zhang Liang 837ef14e46 Change the argument name in function declaration
Change the name from "pipewireStream" to "stream",keep it same as definition.
3 years ago
Vlad Zahorodnii 500321f2b5 xwayland: Relax requirements for /tmp/.X11-unix/ ownership
Hopefully, this will fix some tests in CI. It should be fine if
/tmp/.X11-unix/ is owned by the same user as getuid().
3 years ago
l10n daemon script 4269f13e58 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
Andrey Butirsky e74d8ddfc8 Revert "Register unique service name when wayland keyboard interface is in use"
This reverts commit e6eee5f970
3 years ago
Vlad Zahorodnii 1e6c5a7420 effects/squash: Use cubic easing curve
According to the HIG, the InCubic easing curve should be used if the
animated item changes its state from visible to invisible and the
OutCubic easing curve if vice versa.
3 years ago
Bhushan Shah 6b25335a2b inputmethod: fix coding style
GIT_SILENT
3 years ago
Aleix Pol 92e0357fef InputMethodTest: provide a process to launch when we need a virtual keyboard
Otherwise it never claims to be active.
3 years ago
Aleix Pol 64178a0536 textinputv3: activate the input method when textinput says it's enabled 3 years ago
Aleix Pol 341ec55c9e InputMethodTest: Use InputMethod::isActive as a way to check if it's activated
Instead of looking for a client, which is a bit more of a hit and miss,
since the client doesn't need to be registered when the test expects it
to.
3 years ago
Vlad Zahorodnii 000ed7b122 wayland: Init outputs before emitting WaylandServer::initialized
This shouldn't make any difference, but it makes more sense to emit the
initialized signal after the outputs are added rather than before.
3 years ago
Aleix Pol 1e4b48df2e useractions: Remove redundant logic 3 years ago
Aleix Pol c8a1f48151 GlobalShortcutsTest: No need to make the test longer than it needs to be 3 years ago
Aleix Pol 8cbc03b3be GlobalShortcutsTest: Support running the test without xwayland 3 years ago