Commit graph

10 commits

Author SHA1 Message Date
Xaver Hugl
a60d8941b6 port more stuff to standard smart pointers 2023-03-20 14:16:37 +01:00
Xaver Hugl
4874066423 port many Qt shared pointers to standard smart pointers
There are a few benefits to using smart pointers from the standard library:
- std::unique_ptr has move semantics. With move semantics, transfer of ownership
can be properly expressed
- std::shared_ptr is more efficient than QSharedPointer
- more developers are used to them, making contributions for newcomers easier

We're also already using a mix of both; because Qt shared pointers provide
no benefits, porting to standard smart pointers improves consistency in
the code base. Because of that, this commit ports most of the uses of QSharedPointer
to std::shared_ptr, and some uses of QScopedPointer to std::unique_ptr
2022-06-04 16:57:29 +00:00
Aleix Pol
cad5ddbab3 xdg_activation_v1: Do not bounce icon if the desktop file was not found
It's annoying and doesn't buy us much.
Additionally, take X-KDE-StartupNotify into account as we are meant to.

BUG: 453940
Tested-by: Merge Service <https://invent.kde.org/plasma/kwin/-/merge_requests/2415>
Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2415>
2022-05-24 13:14:43 +00:00
Aleix Pol
da8ad3201b xdg_activation_v1: Improve internal API
Be explicit about how we only request privileged tokens internally in
KWin.
2022-05-20 16:36:55 +00:00
Aleix Pol
1176f31e0d Support KWindowSystem interface with activation support
Allow internal uses of KWindowSystem to support activating other
clients.

BUG: 453748
BUG: 453785
2022-05-18 13:48:52 +00:00
Aleix Pol
f3ec05c85a wayland: Fix activation when activating surfaces disappear
We track when the user last interacted with a window so that we can
decide on the relevance of newly activated windows.

Fixes network/neochat#524
2022-05-09 00:59:27 +02:00
Vlad Zahorodnii
7096e3ead8 Run clang-format
The .clang-format file is based on the one in ECM except the following
style options:

 - AlwaysBreakBeforeMultilineStrings
 - BinPackArguments
 - BinPackParameters
 - ColumnLimit
 - BreakBeforeBraces
 - KeepEmptyLinesAtTheStartOfBlocks
2022-03-25 13:25:15 +02:00
Aleix Pol
e729478d09 plasma-window-management: Support new activation concepts 2021-08-20 07:05:34 +00:00
Aleix Pol
81f7436fda xdgactivation: Let activation requests through when they come from a window manager
If a client already has powers to move clients around, let them also
activate using the right protocols as well.

This is useful to be able to implement SNI or Notifications where the
shell doesn't get full surface activation when interacting with it.
2021-06-18 00:11:56 +00:00
Aleix Pol
27e043920a xdg_activation_v1 implementation 2021-05-24 17:19:25 +02:00