Commit graph

23470 commits

Author SHA1 Message Date
Xaver Hugl
bc964ffd37 effects: increase animation speed for overview, windowview and desktop grid
It's now set to 300ms, which is what the old effects used. This should provide
a smooth looking animation without making it unnecessarily slow
2022-09-14 17:19:31 +02:00
David Edmundson
8ba77139e3 Fix truncation in quad clipping
Transforms may not be on the logical grid in the case of CSD clients
with scaling.
2022-09-14 14:21:33 +00:00
Xaver Hugl
eccfbbd6fd backends/drm: turn all outputs on when new output is hotplugged
Otherwise only the new output is turned on, which is a bit weird
2022-09-14 12:58:39 +02:00
Vlad Zahorodnii
6d3f00e82c autotests: Remove QVERIFY(signalSpy.isValid())
We use the PMF syntax so the isValid() check is unnecessary as the
compiler will notify about wrong signal at compile time. It makes
writing autotests feel less boilerplaty.
2022-09-14 09:21:29 +00:00
Vlad Zahorodnii
98b8a5d4ba autotests: Use PMF syntax in QSignalSpy 2022-09-14 09:21:29 +00:00
Arjen Hiemstra
817d13d8c0 Ensure move() calls in placement move in integer values
Otherwise we run the risk of placing windows at floating coodinates,
which leads to interpolated rendering which doesn't look nice.

BUG: 457143
2022-09-14 09:00:47 +00:00
Vlad Zahorodnii
b001741634 autotests: Add tests that check geometry restore after sending a window to another output 2022-09-14 11:01:34 +03:00
Vlad Zahorodnii
0dc4293059 autotests: Add basic test cases for testing placement tracker 2022-09-14 10:19:20 +03:00
Vlad Zahorodnii
7b7a179396 autotests: Add more test cases in OutputChangesTest
It adds more test cases in OutputChangesTest, particularly swapping
outputs.

Swapping outputs is an interesting case because outputs can temporarily
overlap so workspace()->outputAt() can return wrong output and the
window is going to stick to wrong output.
2022-09-14 06:17:58 +00:00
Vlad Zahorodnii
a1e1d72f4b backends/drm: Emit Platform::outputsQueried signal after removing virtual output
It's needed so the Workspace can react to output removal.
2022-09-13 18:53:47 +00:00
Marco Martin
9965ca7fc0 Reset the count while the user keeps moving the mouse
re-trigger the edge *only* if the user keeps the mouse still for at
least edges()->reActivationThreshold() - edges()->timeThreshold()

so that the user has to actually keep moving.
if the user keeps moving the cursor in the direction of the edge, it
wion't continuously retrigger it

BUG:457280
2022-09-13 17:26:09 +00:00
Marco Martin
5dd8bf8e8b Manage Drag in a TapHandler which accepts also touch
the Drag attached was set to active in a taphandler which didn't
accept touch, breaking drag and drop on wayland+touch
moving the logic on the other handler makes it work everywhere
2022-09-13 13:38:55 +02:00
ivan tkachenko
ed4f5d3e7e
Overview: Hide "Delete Desktop" button while dragging a window
It's not relevant, and only gets in the way by flashing here and there.
2022-09-13 11:05:57 +03:00
ivan tkachenko
94e4c529cb
Overview: Place mask source inside actual OpacityMask component
Just to keep them close to each other.
2022-09-13 11:05:57 +03:00
ivan tkachenko
d6ee83bf90
Overview: Center-align edited desktop name 2022-09-13 11:05:55 +03:00
Aleix Pol
d268ac449e tablet: destroy resources when they are asked to
CCBUG: 458793
2022-09-13 06:41:04 +00:00
l10n daemon script
ed811a7810 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"
2022-09-13 01:46:02 +00:00
ivan tkachenko
6d0f27161c
effects/desktopgrid: Encourage developers explore the code instead 2022-09-13 01:49:27 +03:00
ivan tkachenko
b01ea99c01
effects/desktopgrid: Restore position correctly when dropping a window
This required a bit of a magic on the WindowHeap side to store and
restore global position of a WindowHeapDelegates' window thumbnails.

An additional property bool animationEnabled on a delegate level enables
the heap to restore position without playing unneeded initial animation,
just like the heap itself.

Windows that are being dragged or already returning form a drop are
positioned higher than others on a z-stack.

BUG: 453995
2022-09-13 01:49:27 +03:00
ivan tkachenko
9b282672a2
effects/private/ExpoLayout: Expose updatePolish to QML via forceLayout()
This is consistent with QtQuick library types like Grid and Flow. It
might come in handy when imperatively adding or removing children.
2022-09-13 01:49:26 +03:00
ivan tkachenko
b30302e342
effects/private: Move highlight inside thumbnail component
..so that they always match in size, regardless of different
  combinations of drag&drop and animation states.

And also fix selected property to use id-qualified access.
2022-09-13 01:49:25 +03:00
Oliver Beard
2a6c9f7f7c runner: Use larger pixmap
This avoids a low-quality icon being visible in search results lists.
2022-09-12 22:24:03 +00:00
Xaver Hugl
5f886d72cf backends/fakeinput: port away from QObject memory management 2022-09-12 20:55:32 +00:00
Xaver Hugl
b0c852aa76 backends/wayland: port away from most remaining manual memory management 2022-09-12 20:55:32 +00:00
Xaver Hugl
297971006b backends/x11: port away from most remaining manual memory management 2022-09-12 20:55:32 +00:00
Natalie Clarius
5412ccb71c plugins/nightcolor: show osd in preview 2022-09-12 22:15:38 +02:00
Vlad Zahorodnii
9c56adf8f2 autotests: Hopefully stabilize testInputMethod 2022-09-12 08:32:06 +00:00
Vlad Zahorodnii
d1de19e212 Make Workspace process batched output updates
Currently the Workspace processes output updates as they occur, e.g.
when the drm backend scans connectors, the Workspace will handle
hotplugged outputs one by one or if an output configuration changes the
mode of several outputs, the workspace will process output layout
updates one by one instead of handling it in one pass. The main reason
for the current behavior is simplicity.

However, that can create issues because it's possible that the output
layout will be temporarily in degenerate state and features such as
sticking windows to their outputs will be broken.

In order to fix that, this change makes the Workspace process batched
output updates. There are several challenges - disconnected outputs have
to be alive when the outputsQueried signal is emitted, the workspace
needs to determine what outputs have been added or removed on its own.
2022-09-12 08:03:48 +00:00
Vlad Zahorodnii
e0945886ed Rename Platform::screensQueried() to Platform::outputsQueried()
It makes the vocabulary consistent. We use the word "output" more than
"screen."
2022-09-12 08:03:48 +00:00
Vlad Zahorodnii
dbef4fa3f0 backends/drm: Rework GPU removal
The proposed way to handle unplugged gpus allows us to ensure that
removed outputs' lifetime can be extended to the moment when the
Platform::outputsQueried signal is emitted.

Besides that, it's possible to extend this code a bit further to make
sure that output updates are batched when hotplugging multiple gpus,
e.g. after resuming, etc.
2022-09-12 08:03:48 +00:00
Vlad Zahorodnii
383b054e5c effects: Stop highlighting WindowHeapDelegate when the effect is deactivated
It makes the deactivation animation look less weird when activating a
window in the overview effect using keyboard.
2022-09-12 06:44:54 +00:00
Volker Krause
a7c8735f4f Add libqaccessibilityclient dependency 2022-09-11 10:58:41 +00:00
Vlad Zahorodnii
38600a6235 Revert "Merge gesture structs/enums"
This reverts commit d29c7a6c2b.

It was pushed with unreviewed changes and not fully resolved issues.
2022-09-11 13:14:11 +03:00
Vlad Zahorodnii
db1ec66eb1 Revert "Move gesture direction to base class"
This reverts commit 634182d489.

It was pushed with unreviewed changes and not fully resolved issues.
2022-09-11 13:14:10 +03:00
Vlad Zahorodnii
e3df43c701 Revert "Add new gestures and improve naming clarity in gesture.h"
This reverts commit bc15b72e3d.

It was pushed with unreviewed changes and not fully resolved issues.
2022-09-11 13:14:08 +03:00
Vlad Zahorodnii
d23781d87a Revert "Clarify interface and improve documentation in gesture"
This reverts commit 6c0ed14800.

It was pushed with unreviewed changes and not fully resolved issues.
2022-09-11 13:14:02 +03:00
Vlad Zahorodnii
74da80763f Revert "Rename GestureDirection to GestureType"
This reverts commit 5de6c507db.

It was pushed with unreviewed changes and not fully resolved issues.
2022-09-11 13:13:37 +03:00
Eric Edlund
5de6c507db Rename GestureDirection to GestureType 2022-09-11 00:09:44 +00:00
Eric Edlund
6c0ed14800 Clarify interface and improve documentation in gesture
Separate trigger progress and semantic progress in gesture.
Move effect activation and desktop switching over to semantic progress.
Allow semantic progress to exceed 1 for overshoot in animations.
2022-09-11 00:09:44 +00:00
Eric Edlund
bc15b72e3d Add new gestures and improve naming clarity in gesture.h
I've added VerticalAxis, HorizontalAxis, DirectionlessSwipe and BiDirectionalPinch gestures directions.
These are all combinations of other gesture directions that semantically work well together.
I've implemented these gestures as well as changed some labels and improved documentation,

Also,
Add vector signal to SwipeGesture
2022-09-11 00:09:44 +00:00
Eric Edlund
634182d489 Move gesture direction to base class 2022-09-11 00:09:44 +00:00
Eric Edlund
d29c7a6c2b Merge gesture structs/enums
- Now only 1 GestureDirection enum
- Now only 1 registerGesture() call
- The 4 kinds of gesture (Pinch/Swipe) and (Touchpad/Touchscreen) in globalshortcuts.h/cpp are merged into 1 GestureShortcut
- Change from range to set of finger counts in gestures

No behavior should change, just a refactor.
2022-09-11 00:09:44 +00:00
ivan tkachenko
fe1f720307
effects/outputlocator: Show connector name for monitors with identical everything
See also: https://invent.kde.org/plasma/kscreen/-/merge_requests/129

BUG: 450344
2022-09-10 13:19:38 +03:00
Natalie Clarius
2ebbe42aae kcm/kwinrules: fix broken help page link 2022-09-09 15:27:19 +00:00
Natalie Clarius
b2e7a24ab4 kcm/kwineffects: fix broken help page link 2022-09-09 15:27:19 +00:00
Natalie Clarius
d2ec8ac643 kcm/kwindesktop: fix broken help page link
BUG: 458767
2022-09-09 15:27:19 +00:00
Mikhail Vinogradov
45486ce515 tabbox: don't hide panels when highlighted as the only item in the tabbox
When we have 0 opened apps, tab box only shows "Show Desktop". That element is a
special entry in the alt+tab list for minimizing all windows. When highlighting
it, panels temporarily become hidden, which does not make sense to do when it is
the only item in the tab box. In this case, do not temporarily hide the panels.
2022-09-09 13:39:14 +00:00
Vlad Zahorodnii
287ad9561d scripting: Add null window guard in WorkspaceWrapper::clientArea()
Workspace::clientArea(clientAreaOpt, Window*) expects a valid pointer.

BUG: 458598
2022-09-09 06:10:56 +00:00
Aleix Pol
006ee8b87a inputmethod: Allow forcing the display of the input method
This makes it possible to show the input method when using a client that
doesn't support Wayland input methods (e.g. Xwayland).

This adds 2 dbus API entry points:
- activeClientSupported property: That tells us if the current client
doesn't support text-input-v*
- forceActivate method: forces the activation of the input method. This
configures the input method in a state that we can use to forward the
input method's keystrokes to the client, emulating a hardware keyboard.

BUG: 4399911
2022-09-08 23:30:16 +02:00
Xaver Hugl
d659f4bfd7 workspace: don't crash without outputs
BUG: 458892
2022-09-08 22:46:17 +02:00