Commit graph

23242 commits

Author SHA1 Message Date
Xaver Hugl
fa538edc74 waylandserver: don't emit windowRemoved if it's not been added yet
This can happen when a client destroys the window before it ever got ready
for painting
2022-09-16 17:13:34 +00:00
ivan tkachenko
574b51f095
Amend "effects/Overview: Use SearchField from PlasmaExtras"
This commit amends 4eefd27f61.

Changes were pushed to the wrong branch, so the MR got merged not in its
final state.
2022-09-16 19:40:26 +03:00
ivan tkachenko
3af565b616
Amend "effects/private: Merge two state machines into one with substates"
This commit amends 9897afa55f.

Changes were pushed to the wrong branch, so the MR got merged not in its
final state.
2022-09-16 19:40:18 +03:00
ivan tkachenko
96a8980861
effects/Overview: Add "pressed" effect to desktop bar 2022-09-16 18:02:56 +03:00
ivan tkachenko
4eefd27f61
effects/Overview: Use SearchField from PlasmaExtras 2022-09-16 18:02:55 +03:00
ivan tkachenko
4a6879e6ee
effects/Overview: Move delegate handlers to the bottom close to each other 2022-09-16 18:02:55 +03:00
ivan tkachenko
329731be2d
effects/private: Encapsulate DND management, and clean up the store
Use methods with semantic naming instead of raw data manipulation, and
make sure to perform clean up of DND data, so it won't haunt us back
later e.g. when a window delegate is recreated not because of a drag
of itself but due to a desktops rearrangement.
2022-09-16 18:02:55 +03:00
ivan tkachenko
1f0a0c893a
effects/private: Nuke an unnecessary loop
Yes, Marco, there is a more efficient way.
2022-09-16 18:02:55 +03:00
ivan tkachenko
d3a5a72a46
effects/private: Fix crash when shutting down desktop grid and overview
Because of const/non-const issues, iterator got invalidated in the loop,
which led to a crash.

Cases that trigger it: interaction with a thumbnail while the effect is
returning to initial state and shuts down. For example, slightly
dragging and releasing a thumbnail such that both TapHandler & DragHandler
would react and play each their own transition (yes, it's another bug);
or by pressing Escape key while dragging.
2022-09-16 18:02:54 +03:00
ivan tkachenko
9897afa55f
effects/private: Merge two state machines into one with substates
Having one state machine instead of two somehow simplifies the code and
makes it less fragile.

The new property `substate`, which replaces `thumbSource.state` still
supports imperative assignments that are so important for Drag&Drop,
and still triggers state updates. However, now a substate may not
become an active state: that behavior didn't make sense in previous
iterations, and has led to a glitch where a window won't resize during
return-to-initial animation. The glitch happened because two state
transitions were starting almost-simultaneously (and by Murphy's law in
the worst possible order, of course), and both animations were playing,
but one animation was supposed to to a property that is managed by the
other. But since QtQuick animations cache their from/to values before
they start, the dependent transition essentially didn't animate at all.
2022-09-16 18:02:53 +03:00
Vlad Zahorodnii
74af27dc55 Add missing QPointer
The Compositor is destroyed after the Workspace, so the placeholder has
shorter lifespan. We need to guard the destructor of EffectScreenImpl
from accessing a dangling pointer. For what it's worth, the destructor
of EffectScreenImpl was written with QPointer in mind, but it was never
added.
2022-09-16 11:44:53 +00:00
Marco Martin
e853f5fe07 Don't check for workspace->initializing()
the existence of Window is bound to the one of workspace so it
will always be there.
We also need to check the window sizes before workspace is done
initializing,
otherwise when KWin restarts and there are maximized windows, they won't
be resized to take panels into account and will always span the full
screen.
2022-09-16 09:57:07 +00:00
Xaver Hugl
1a902b1dec backends/drm: supress warning for disconnected connector
It just pollutes the log with useless information
2022-09-16 01:43:08 +02:00
Albert Astals Cid
11aadee41c Fix libqaccessibilityclient dependency
libqaccessibilityclient sadly doesn't have the concept of a stable
branch
2022-09-15 21:24:36 +00:00
Aleix Pol Gonzalez
fdf2011b34 Wayland backend: Don't crash when terminating
Remember to release all resources before the wayland socket goes:
- release the seat as we give up a seat
- release the ssdManager
- release the output decoration with the output itself
Otherwise they leak and stay dangling.
2022-09-15 16:43:04 +00:00
Aleix Pol
d7cba6b625 Fix handling of different signals (SIGTERM et al) by using KSignalHandler
When debugging something I realised that SIGTERM was always making KWin
crash like I'd never seen it crash. It turns out we are calling
QApplication::exit() on the signal handler which is highly forbidden as
the handler preempts the process altogether.
Use KSignalHandler instead which takes this issue into account.
2022-09-15 15:35:03 +00:00
Jonathan Esk-Riddell
48f684ca73 Update version number for 5.26.80
GIT_SILENT
2022-09-15 13:57:28 +01:00
Marco Martin
7addb06b0f Snap to shaded windows
Allow snapping to a shaded window

BUG:375740
2022-09-15 10:51:28 +00:00
Jonathan Esk-Riddell
8516faa6ad Update version number for 5.25.90
GIT_SILENT
2022-09-15 11:49:43 +01:00
Jonathan Esk-Riddell
d053efde4c Update kf5 version requirement to 5.98.0
GIT_SILENT
2022-09-15 11:10:15 +01:00
Vlad Zahorodnii
106d061255 autotests: Remove WaylandTestApplication::continueStartupWithScreens step
Makes startup sequence similar to the one in kwin_wayland.
2022-09-15 06:56:13 +00:00
Vlad Zahorodnii
be784ba5d2 effects/windowview: Fix "active class" mode
Each screen has its own WindowHeap. So setting WindowHeap.activeClass
won't be visible on other screens.

In order to address that limitation, we could monitor
Workspace.activeClient property.

BUG: 455974
2022-09-15 06:39:08 +00:00
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