Commit graph

23356 commits

Author SHA1 Message Date
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
Marco Martin
a0385c330b updateAllowedActions when going in/out fullscreen
when going in/out of fullscreen call updateAllowedActions to notify the
decoration of eventual allowed actions changed. this makes the shade
button reappear as needed

BUG:458844
2022-09-08 19:45:55 +00:00
David Edmundson
7927b17d40 Avoid rounding issues in Surface damage tracking
When a buffer is damaged via damage_buffer we have to map things to
logical space. This mapping can involve floating numbers, most notably
with the X11 override, right now that's via a QRegion which is always
integer. For damage we always want to round outwards to the larger
space, not to the nearest space.
2022-09-08 16:18:12 +01:00
Vlad Zahorodnii
33827bbdbe autotests: Fix internal connection teardown
This might be the root cause of random ASAN errors in testQuickTiling.

From commit 617291c6974d232ee99c4c49e891ce16863e3d6e:

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.

i.e. the EventQueue object must be destroyed last to ensure avoid hitting
dangling pointers.
2022-09-08 10:16:35 +00:00
Vlad Zahorodnii
e40bdc9016 autotests: Simplify tearing down ConnectionThread
It should be enough to call QObject::deleteLater() and wait until the
connection thread stops spinning its event loop.
2022-09-08 10:00:20 +00:00
Kai Uwe Broulik
63258ab076 kcmkwin/kwintabbox: Remove API not supported by KWin core
WindowThumbnailItem in scripting doesn't support any of the
'brightness', 'saturation', 'clipTo' anymore, so it makes
no sense to support it in the KCM's preview.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
2022-09-08 06:43:02 +00:00
Yuri Chornoivan
354c0e350f Fix minor typos 2022-09-08 08:43:44 +03:00
Natalie Clarius
1598cecc8e doc/windowbehavior: improve help page for window behavior kcm
- add missing entries for focus delay and multiscreen behavior
- add missing entries for window placement modes maximized and under mouse
- add missing entries for mouse actions
- remove entry for removed "display window geometry when regeometrizing" option
- reword explanation for window raising
- extend explanations for window placement
- hint at screen edges kcm in movement section
- hint at window rules in advanced section
- add more keywords
- some small wording, typographical and formatting changes
2022-09-07 19:01:28 +00:00
Vlad Zahorodnii
3d1b3c9c66 backends/drm: Store hardware and virtual outputs in two different lists
Currently, we effectively almost everywhere need DrmOutput outputs,
DrmVirtualOutput outputs are needed only in a couple of places. There's
not a lot that we gain from storing real and virtual outputs in one
list, it adds unnecessary casting, etc. Ideally, virtual outputs must
come from a different backend, the current approach is not scalable.
2022-09-07 17:40:51 +00:00
Nate Graham
f73cb8f1e5 effects/windowview: fade Searchfield in and out just like background
The Overview effect manipulates the opacity of the desktop bar and
search field along with that of the blurred background so that they
all fade in and out in sync, but Window View does not, leading to a
discrepancy between them that looks weird.
2022-09-07 13:27:53 +00:00
Marco Martin
31d1f885ce Restore the crossfade effect
This enables again the crossfade between the old window picture and the new one in the maximize and morphingpopup effects.
It does that with the OffScreenEffect redirect() feature.

BUG:439689
BUG:435423
2022-09-07 10:16:36 +00:00
Volker Krause
b7f950a5a6 Don't generate Metal and D3D shaders
Not relevant for KWin.
2022-09-07 07:26:03 +00:00
Vlad Zahorodnii
9c4bcb92c3 backends/drm: Don't sort DrmBackend::m_outputs
This std::sort() function traces its origin back to
cbbd684430. The sort step was necessary to
ensure that we get same configuration hash regardless the order in which
outputs were connected.

On the other hand, our KWinKScreenIntegration code already does that so
it seems excessive to sort outputs the second time.
2022-09-06 17:54:52 +03:00
Vlad Zahorodnii
d8ea87a9ea Add dummy placeholder output type
Placeholder outputs are not rendered so they don't need render data.
Also, this simplifies the control flow when the last real output is
removed. The Platform::screensQueried signal won't be emitted inside a
Platform::screensQueried slot.
2022-09-06 10:36:33 +00:00
Volker Krause
192a57e2e1 Port thumbnail item to use Qt Shader Tools for Qt 6 2022-09-06 10:12:37 +00:00