Commit graph

19947 commits

Author SHA1 Message Date
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.
2021-05-12 11:50:38 +00:00
Vlad Zahorodnii
9b2b450fdd wayland: Use new api to remove globals safely
BUG: 435258
2021-05-12 11:31:36 +00:00
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
2021-05-12 10:44:22 +00:00
Aleix Pol
8979f83e38 Unify the code that turns StrutAreas into QRegion 2021-05-12 10:44:22 +00:00
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.
2021-05-12 10:43:28 +00:00
Aleix Pol
f6c2861b73 strutstest: fix top panel/ivnalid strut 2
The client area is detected as invalid and ignored by
Workspace::updateClientArea.
2021-05-12 10:43:03 +00:00
Aleix Pol
35970686e1 Implement ping on tests
Otherwise there's no pong and we get unnecessary noise.
2021-05-12 10:42:34 +00:00
Zhang Liang
837ef14e46 Change the argument name in function declaration
Change the name from "pipewireStream" to "stream",keep it same as definition.
2021-05-12 10:39:03 +00:00
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().
2021-05-12 13:02:12 +03:00
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"
2021-05-12 01:17:30 +00:00
Andrey Butirsky
e74d8ddfc8 Revert "Register unique service name when wayland keyboard interface is in use"
This reverts commit e6eee5f970
2021-05-11 22:37:42 +03:00
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.
2021-05-11 19:25:31 +00:00
Bhushan Shah
6b25335a2b inputmethod: fix coding style
GIT_SILENT
2021-05-11 16:44:01 +05:30
Aleix Pol
92e0357fef InputMethodTest: provide a process to launch when we need a virtual keyboard
Otherwise it never claims to be active.
2021-05-11 12:47:41 +02:00
Aleix Pol
64178a0536 textinputv3: activate the input method when textinput says it's enabled 2021-05-11 12:47:27 +02:00
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.
2021-05-11 12:47:27 +02:00
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.
2021-05-11 10:45:28 +00:00
Aleix Pol
1e4b48df2e useractions: Remove redundant logic 2021-05-11 12:38:00 +02:00
Aleix Pol
c8a1f48151 GlobalShortcutsTest: No need to make the test longer than it needs to be 2021-05-11 12:38:00 +02:00
Aleix Pol
8cbc03b3be GlobalShortcutsTest: Support running the test without xwayland 2021-05-11 12:38:00 +02:00
Aleix Pol
a977ba3311 GlobalShortcutsTest: Fix testNonLatinLayout
Have it switch back from the Russian layout, otherwise the rest of tests
are run with this one and fail as they produce weird shortcuts.
2021-05-11 12:38:00 +02:00
Vlad Zahorodnii
282e0d1c4d autotests: Port the tests to new xdg-shell helpers 2021-05-11 05:26:51 +00:00
Bhushan Shah
4e7c6b57a6 platforms/drm: put double tap timer behind config option
This feature was implemented in commit a66eb1a5b9 earlier

Double tap wake up is not a feature to be implemented at compositor
level but rather at the hardware/kernel level. Double tap timer here
means when screen is turned off, libinput will continue to poll the
touchscreen for new events.

double-tap-to-wakeup is generally interrupt at driver/hardware level
which have ability to wake system up even from the sleep.

Provide a option to disable the double tap timer on kwin side for
devices which makes use of suspend since when in suspend kwin can not
wake device up, and that provides confusing user experience.
2021-05-11 00:47:21 +00:00
Aleix Pol
8cfa30803b Fix InternalWindowTest::testDismissPopup
We were expecting a tooltip to be closed when clicking its
transientParent, but it's explicitly not something we are after. We
close popups when we click either other clients or the actual client on
the decoration.

This change makes it so we end up clicking another window instead of the
parent one that is unrelated.
2021-05-11 00:05:37 +00:00
Vlad Zahorodnii
9577423dfa Remove most_recently_raised micro optimization
This micro optimization is simply not worth having. raiseOrLowerClient()
is not in any hot path, besides that raiseClient() is not the only place
where a window can be raised above other windows. In addition to that,
the most_recently_raised check in raiseOrLowerClient() doesn't take into
account whether the cached window is on the current activity.
2021-05-10 19:49:34 +00:00
Aleix Pol
a3d32fa836 Ensure we start our tests with wayland already initialised
When debugging modifier_only_shortcut_test in _waylandonly mode I saw
that it was failing, among other things, because some aspects were not
initialised.

This changes every test we have to run the new
Test::initWaylandWorkspace() that calls waylandServer()->initWorkspace()
but also makes sure that WaylandServer::initialized is emitted before we
proceed.
2021-05-10 12:33:43 +00:00
Vlad Zahorodnii
7261bbb230 Fix bad QObject::connect() argument
This fixes the warning that's printed when InputMethod tries to connect
the frameGeometryChanged signal of a null toplevel.
2021-05-09 22:45:27 +00:00
l10n daemon script
213c98213a 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-09 01:20:52 +00:00
l10n daemon script
baf3ddea72 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-08 01:17:47 +00:00
Aleix Pol
c544d4f297 slide effect: remove redundant code 2021-05-08 00:37:52 +00:00
Vlad Zahorodnii
77091f7fcb Remove manual discardWindowPixmap() calls in InternalClient
SurfaceItemInternal will discard the current pixmap if the buffer size
changes. Also, one of the goal of the scene redesign is to keep things
such as this out of Toplevel subclasses.
2021-05-07 17:34:31 +00:00
Bhushan Shah
119b00f896 inputmethod: use output geometry for positioning keyboard when locked
otherwise it will take the panel strut in account when positioning
inputmethod on lockscreen and that will not be positioned correctly.
2021-05-07 14:18:57 +00:00
Vlad Zahorodnii
aeca1af4ac Propagate correct maximize mode to decorations
When the maximize mode changes from MaximizeFull to either
MaximizeHorizontal or MaximizeVertical, (max_mode & MaximizeFull) will
evaluate to true because MaximizeFull is defined as bitwise OR between
MaximizeHorizontal and MaximizeVertical.
2021-05-07 14:18:04 +00:00
Aleix Pol
b9b349caa2 Mark deprecated API as deprecated
We'll hardly port away from it if it's just on the documentation. At the
moment they're used all over the place.

If they didn't have a replacement, they should be undepreprecated.
2021-05-07 13:11:26 +00:00
l10n daemon script
64b4caae95 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-07 01:17:26 +00:00
Vlad Zahorodnii
018177b576 Limit VRR policy in support information only to Wayland session
Adaptive sync is only supported on Wayland.

BUG: 436623
2021-05-05 16:55:18 +03:00
Jan Grulich
caaabf84df Screencast: use dma-bufs only when client explicitly asks for it 2021-05-05 10:01:49 +02:00
Vlad Zahorodnii
5739603145 autotests: Fix kglobalaccel integration
Starting with 48c3376927e5e9c13377bf3cfc8b0c411783e7f3 in kglobalaccel,
KGlobalAccel won't work in desktop environments other than Plasma.

We need to set XDG_CURRENT_DESKTOP=KDE to ensure that global shortcuts
still work.
2021-05-05 09:16:58 +03:00
Vlad Zahorodnii
a0fc0277a7 wayland: Make fullscreen mode updates async
Currently, the fullscreen state is update synchronously, but it needs to
be done in asynchronous fashion.

This change removes some tests as they don't add any value, testFullscreen()
covers them all.
2021-05-05 06:11:42 +00:00
Vlad Zahorodnii
62500acd1a effects/fullscreen: Rewrite the effect using ES6 features
This is to keep the fullscreen effect in sync with the maximize effect.
2021-05-05 06:08:42 +00:00
Friedrich W. H. Kossebau
7b36c6443e Port away from ECMSetupVersion's deprecated *_VERSION_STRING CMake variable
GIT_SILENT
2021-05-04 23:45:34 +00:00
Aleix Pol
4aefbdd175 --warning 2021-05-04 23:07:16 +02:00
Xaver Hugl
5bd938f0f0 platforms/drm: release gbm buffers before eglDestroySurface
BUG: 436500
2021-05-04 17:36:09 +00:00
Adriaan de Groot
49fcadb185 Fix build on 32-bit systems
The added comment explains it all, really: you can't fit a 32-bit
unsigned into a 32-bit (signed) time_t, but we don't care.
2021-05-04 12:34:07 +00:00
Xaver Hugl
bd4a8be319 platforms/drm: fix DrmOutput::updateMode 2021-05-04 10:01:55 +00:00
Vlad Zahorodnii
073b6efc14 wayland: Fix focus follows mouse policy
We want to update the input focus only if the pointer is moved. Due to
that, AbstractClient::enterEvent() checks the last seen pointer position
to decide whether the window needs to be focused.

The issue is that when the pointer moves from a decoration to a surface,
the cached pointer position will be updated to the current pointer
position, and thus the check in AbstractClient::enterEvent() will fail.

We need to update the cached pointer position only if there is a focused
decoration.
2021-05-04 09:41:22 +00:00
Vlad Zahorodnii
b4987a9100 3rdparty: Synchronize xcursor.c with upstream 2021-05-04 09:40:29 +00:00
Nate Graham
85d9efcec7 [kcmkwin/kwindecoration] Make a bit more room for the decoration buttons 2021-05-03 21:42:05 -06:00
Nate Graham
2157e83bfb [kcmkwin/kwindecoration] Use clearer text for "Menu" decoration button 2021-05-03 21:35:27 -06:00
l10n daemon script
84c2e4662e 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-04 01:16:46 +00:00