Commit graph

18852 commits

Author SHA1 Message Date
Vlad Zahorodnii
678944ceb8 xwayland: Remove mysterious Q_FALLTHROUGH macros
We cannot fall through to the next case because `reinterpret_cast`ing
incompatible events is dangerous.
2020-07-29 12:11:57 +00:00
Chaojiang Luo
def9817a7e fix:Check image map nullptr error
The map may be failed, we should check the image map is succeed first.

Signed-off-by: luochaojiang <luochaojiang@uniontech.com>
2020-07-29 12:11:17 +00:00
Xaver Hugl
901a9a2373 make the panelAutoHideHideRequested callback also handle panels set to "windows can cover" 2020-07-29 11:25:43 +00:00
Aleix Pol
03b12d1dfc drm: Use introspection to print enums
Removes a bit of code and allows to list the supported
transformations on the same line, which is useful to be able to
grep over the output.
2020-07-29 10:39:47 +00:00
Vlad Zahorodnii
a7b922bfce screencast: Don't include platformsupport headers
These headers are meant to be used only by platform and scene plugins.
2020-07-28 21:50:26 +03:00
Vlad Zahorodnii
2103b999e7 screencast: Address minor issues 2020-07-28 18:38:49 +00:00
adrien faveraux
76b9fb15ea Apply 1 suggestion(s) to 1 file(s) 2020-07-28 13:32:04 +00:00
Adrien Faveraux
08722ff386 adapt shadow to Kwayland server Changes 2020-07-28 13:32:04 +00:00
Adrien Faveraux
69920044f7 Adapt dpms to Kwayland Server changes 2020-07-28 14:03:38 +02:00
Adrien Faveraux
b690858e3f adapt VirtualDesktop to Kwayland Server Changes 2020-07-28 11:53:26 +00:00
Vlad Zahorodnii
bac8d70c6d Fix build 2020-07-28 14:35:08 +03:00
Adrien Faveraux
b0f7dcee98 adapt xdg foreign to Kwayland Changes 2020-07-28 11:24:23 +00:00
Adrien Faveraux
16c7b29c3b adapt Idle to Kwaylans Server Changes 2020-07-28 11:02:08 +00:00
Adrien Faveraux
e6ba54a730 adapt idle inhibit to KWayland change 2020-07-28 10:47:25 +00:00
Aleix Pol
02fc40fa4a Make sure we don't leak the QPlatformFontDatabase using smart pointers
Found it when running KWin on ASAN
2020-07-28 08:19:41 +00:00
l10n daemon script
e15004ff98 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"
2020-07-28 06:11:46 +02:00
Vlad Zahorodnii
a17a86999b Emit clientAdded for wayland clients
Emit the clientAdded() signal also for Wayland clients in order to unify
the API of the Workspace class for different client types.
2020-07-27 15:01:07 +00:00
Vlad Zahorodnii
b4e271c664 Synchronize xcursor.c 2020-07-27 15:00:13 +00:00
Vlad Zahorodnii
1330abc93d Provide hotspot in the device independent pixels
Currently, the trend is to get the coordinates of the hotspot and map it
to the device independent pixels at the call site.

This change makes the KXcursorSprite return the coordinates of the hotspot
in the device independent pixels to reduce the amount of duplicated code.
2020-07-27 15:00:13 +00:00
Vlad Zahorodnii
487e2d9fb6 Hide Xcursor private data behind d pointers
Hide all private behind a d pointer as one step closer to upstreaming of
KXcursorTheme and KXcursorSprite.
2020-07-27 15:00:13 +00:00
Vlad Zahorodnii
29064f088d screencast: Address minor issues 2020-07-27 13:43:05 +00:00
Vlad Zahorodnii
5a73f4a350 screencast: Move creation of the global to manager
We want to turn screencasting into a plugin eventually.
2020-07-27 13:43:05 +00:00
Aleix Pol
4eda4d2b5d drm: prevent cursor buffer leakage
Use smart pointers to make sure we don't dereference valid pointers.
2020-07-27 09:29:11 +00:00
Aleix Pol
edb6159396 drm: we must not call showCursor when softwareCursor is on
Otherwise we'll show a dangling cursor but otherwise the cursor will be
updated by other code paths, so we end up with a weird cursor in the
middle of the screen that doesn't move.
2020-07-27 09:29:11 +00:00
Benjamin Port
9225848fb0 When maximizing a window raise client and gain focus
BUG: 418938 FIXED-IN: 5.20
2020-07-27 09:26:25 +00:00
Benjamin Port
0ec34afdcc On wayland, prevent changeMaximize to raise client 2020-07-27 09:26:25 +00:00
Aleix Pol
a051baf1a9 screencasting: still build if memfd isn't available
BUG: 424607
2020-07-24 16:59:11 +02:00
David Edmundson
0a40880a31 Delete empty files 2020-07-24 13:45:27 +01:00
Aleix Pol
27951dc9e7 Only define PipeWire_FOUND if it's found 2020-07-24 02:06:45 +02:00
David Edmundson
83aa8dccd2 [virtualdekstops] Drop multi-head from VirtualDesktopManagement
Kwin's VirtualDesktop saved a different configuration per X screen. This
messes up with a recent refactor of our startup as now we load
virtualdesktops before the X11 screen number is set and we load from the
group "Desktops-screen--1" then save to another place.

For a wayland session it doesn't make sense to have such a strong X
tie-in. We may as well just tidy this up.

Multihead has been deprecated for a decade. There is absolutely no way
Plasma supports it. Worst case if someone magically is using mutlihead
they just get syncronised virtual desktops.

BUG: 424571
2020-07-23 22:33:14 +00:00
Aleix Pol
9438a2e1b1 Disable screencasting if there's no pipewire 0.3
Hopefully fixes the CI
2020-07-23 23:33:30 +02:00
Vlad Zahorodnii
e7b8a5ad5e Remove remote-access leftovers
We've switched to PipeWire for screen casting \o/.
2020-07-23 18:19:49 +03:00
Aleix Pol
4ddefd37bd screencasting: Remove deprecated RemoteAccessManager interface
In favour of zkde_screencast_unstable_v1
2020-07-23 13:14:31 +02:00
Aleix Pol
02042908aa screencasting: implement wayland output streaming for egl and wayland backends 2020-07-23 13:14:31 +02:00
Aleix Pol
42e543c5b2 screencasting: implement intefraces to create dmabuf textures 2020-07-23 13:14:22 +02:00
Aleix Pol
38eb72efe3 screencasting: integrate zkde_screencast_unstable_v1
Includes a PipeWire implementation that will send the relevant streams
to the processes that need them.
2020-07-23 13:14:22 +02:00
Aleix Pol
27ea1b9527 screencasting: Expose necessary information to implement efficient screencasting 2020-07-23 13:14:22 +02:00
Aleix Pol
57e19874b7 drm_fourcc.h: only typedef uint32_t on the platforms it's needed
On linux we have it defined on some headers. If we do hardcode it
ourselves build will fail when linux/types.h is included afterwards.
2020-07-23 13:14:22 +02:00
Aleix Pol
4c267c261e Adapt to changes in the PlasmaWindowManagement interface 2020-07-23 13:14:22 +02:00
Aleix Pol
29a2b2a355 Make it possible to specify KWin::GLTexture mutability
Some features will rely on it and complain that GLTexture decided to use
glTexStorage
2020-07-23 13:14:22 +02:00
Aleix Pol
ff65bec92c Introduce a GLTexture::toImage helper class 2020-07-23 13:14:22 +02:00
Aleix Pol
1ef90d9c90 Add API to easily find Toplevels from their internal Id 2020-07-23 13:14:22 +02:00
Aleix Pol
fbbf96751b Workspace::findToplevel should iterate through allClients
Not just x11 ones.
2020-07-23 13:00:26 +02:00
l10n daemon script
a1c0d43deb 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"
2020-07-23 06:10:20 +02:00
Vlad Zahorodnii
555885072d Check if we successfully restored input focus
In rare cases, Workspace::restoreFocus() may fail, for example when the
most recently activated client is about to be destroyed or unmapped.

If it happens that we cannot restore the focus, then mark the window in
FocusIn event as active.

CCBUG: 424223
2020-07-22 12:29:41 +00:00
Vlad Zahorodnii
4921acf45a Grab all possible keyboard modifiers for window commands
BUG: 424272
FIXED-IN: 5.19.4
2020-07-22 12:28:22 +00:00
Cyril Rossi
3609a029ea KCM KWin Options setting ActiveMouseScreen set proper default value
Fix regression that was introduced by a mismatch in the default value of
ActiveMouseScreen option between kwin.kcfg and kwinoptions_settings.kcfg

BUG: 424389


(cherry picked from commit c853f8313a213a0f7d0f98f662f7e98849d547ca)
2020-07-22 10:37:30 +00:00
Vlad Zahorodnii
80a31ab4b7 Make setFrameGeometry() re-entrant for X and internal clients
If AbstractClient::setFrameGeometry() is called from a slot connected
directly to the frameGeometryChanged() signal, then is there a good
chance that kwin will fall into an infinite recursion. However, that's
the case with only X11 and internal clients.

The root cause of the infinite recursion is that both X11Client and
InternalClient compare the new geometry against the geometry before
update blocking. In order to fix the bug, we simply need to ensure that
updateGeometryBeforeUpdateBlocking() has been called before we start
emitting the frameGeometryChanged() signal.

Furthermore, a couple of tests were added to ensure that we won't hit
this subtle bug again.
2020-07-22 05:51:23 +00:00
Aleix Pol
ef81ae3f9f Resize maximised windows upon workspace change
Don't issue a frameGeometry update until we have fully processed which
geometry we want.

BUG: 423596
2020-07-21 12:03:12 +00:00
Aleix Pol
7f1abd5dad Allow testing transformations on windowed KWin 2020-07-21 12:03:12 +00:00