20641 Commits (2c6821fdcac8b087bced28d38f16bdd9bca92bcc)
 

Author SHA1 Message Date
Vlad Zahorodnii 4d7f1d1358 wayland: Rename wayland_fd arg to wayland-fd
This make argument naming consistent, for example we have xwayland-fd
arg, which has a dash instead of underscore.
3 years ago
David Edmundson f4b870977b Re-enable systemd managed kwin
This was blocked on environment variables issues which are now resolved
3 years ago
David Edmundson b3f5f9764f [kwin_wrapper] Sync kwin env after spawning 3 years ago
Vlad Zahorodnii bf7bdf0be8 Setup touchpad shortcuts and input event filters only on Wayland
They work only on Wayland.
3 years ago
Vlad Zahorodnii 88d423ddcf Unify focus abstractions for internal and wayland windows
This simplifies focus related logic a bit. Instead of differentiating
between wayland and internal window focus, simply maintain window focus
that works both with regular wayland windows as well as the ones created
by kwin.
3 years ago
Vlad Zahorodnii aba9440780 Move AbstractClient::isInternal() to Toplevel 3 years ago
Ismael Asensio 2797c64eea kcm/tabbox: Make the preview show desktop if the option is selected
The thumbnail that represents the "desktop" in the switcher preview
is taken from the default wallpaper, and it will update automatically
as it changes in future versions of Plasma.

The current one is also added along the other thumbnails as a fallback.

BUG: 309401
FIXED-IN: 5.24
3 years ago
Vlad Zahorodnii 356fff9920 autotests: Fix testScreens
Currently, the test doesn't pass due to Xwayland encountering a protocol
error.

That protocol error occurs because the xdg-output is destroyed before
the wl_output.

This change moves the ownership of the xdg-output to wl-output so they
are destroyed together.
3 years ago
Xaver Hugl 8d08306c48 backends/drm: support dmabuf-feedback
dmabuf-feedback allows the compositor to give the clients better feedback on what
formats and modifiers they should use, and for which device they should allocate.
This way they can reallocate for scanout whenever the compositor tells them to,
which makes direct scanout work for a lot more devices and applications.
3 years ago
Vlad Zahorodnii 3d0bdc56a4 Remove mysterious s_cursorUpdateBlocking boolean flag in pointer_input.cpp
From what I can tell, it's not really needed.
3 years ago
Vlad Zahorodnii e44eeaafcf Remove redundant updateFocusMousePosition() call
InputDeviceHandler will call it when needed.
3 years ago
Vlad Zahorodnii d3342c6897 Append "pointer" to AbstractClient::{enterEvent,leaveEvent}
KWin handles several types of pointing input devices, e.g. mice,
tablets, etc.

As is, enterEvent and leaveEvent are very ambiguous. This change
prepends "pointer" to those methods to make it explicit that they handle
pointer enter/leave events.
3 years ago
Vlad Zahorodnii a93d24f4b0 Remove impossible case in PointerInputRedirection::cleanupInternalWindow()
If an internal window is hidden, the corresponding InternalClient will
be destroyed and input focus will be updated.
3 years ago
Vlad Zahorodnii a02ca08d45 Make focus setters in InputDeviceHandler work as expected 3 years ago
Vlad Zahorodnii 9741b1db2f Remove unused InputDeviceHandler::atChanged signal 3 years ago
Vlad Zahorodnii d957e99365 Improve variable names in InputDeviceHandler 3 years ago
Xaver Hugl f097440eb4 backends/drm: don't cache formats
While it could be useful with tiled displays, the isFormatSupported and
supportedModifier functions can be called before prepareModeset, so where
m_formats is still empty. Additionally they're neither in a hot path nor
performance critical.
3 years ago
Xaver Hugl 1f79f421b4 backends/drm: only enforce modifiers default for surface creation
Whether or not we want to use explicit modifiers for our surfaces doesn't
matter for what format+modifiers drm planes support. This way direct scanout
works by default, without having to explicitly enable modifiers
3 years ago
Xaver Hugl 33f3a13a1a wayland: show cursor if stylus is in proximity
While a stylus is in proximity we want to show its cursor. In this commit
it only gets shown on move because for a still unknown reason the position
is out of date before the first move event.

BUG: 443921
3 years ago
Aleix Pol 5f16757090 libinput: Make sure we don't crash if we start without an output 3 years ago
Aleix Pol 4dca6408c2 tablet: Provide the position when proximity-in hits 3 years ago
Vlad Zahorodnii 4a69ca4146 Remove pointer focus handling in TabletInputRedirection
Handling pointer focus in TabletInputRedirection makes no sense and it
messes with state set by PointerInputRedirection, which is really bad.
3 years ago
Xaver Hugl 15993fa6bb backends/drm: fix KWIN_DRM_NO_AMS env var
It currently makes the session not start at all
3 years ago
Arjen Hiemstra e5ca5df0c5 autotests: Use a shared library for the integration test framework
Ever since the effects were changed to static, each test of the
integration tests includes all the effects. The result of this is that
when doing a debug build each test is now 60MiB or more. With the amount
of tests, this results in ~8 GiB of diskspace used just for KWin's
binary output directory, which is rather excessive.

Since the tests all share a common framework library, we can change that
library to a shared library and that way avoid linking all the effects
into each test.

Most of this is shuffling around some link libraries in the integration
test CMakeLists, however, I needed to export the Xwayland class as it is
used by one of the tests but wasn't exported.
3 years ago
Vlad Zahorodnii cbad78a360 Kill Toplevel::screenScale()
Tracking AbstractOutput properties in Toplevel is not extensible. Since
DecorationItem is the only one who needs Toplevel::screenScale(), make
it track the output device pixel ratio.
3 years ago
Vlad Zahorodnii 1f318a2245 effects/zoom: Rework how cursor texture is managed
Update the cursor texture on demand to avoid changing the current opengl
context in the middle of compositing cycle.

CCBUG: 445412
3 years ago
Vlad Zahorodnii 95caa51536 autotests: Add breeze-icons to .kde-ci.yml
Some tests need it, e.g.

FAIL!  : TestXdgShellClient::testDesktopFileName() Compared values are not the same
   Actual   (c->icon().name())         : ""
   Expected (QStringLiteral("wayland")): "wayland"
3 years ago
Vlad Zahorodnii eba4ab10e1 autotests: Add breeze to .kde-ci.yml
Some tests need it, e.g.

FAIL!  : TestDontCrashUseractionsMenu::initTestCase() 'kwinApp()->setStyle(QStringLiteral("breeze"))' returned FALSE. ()
   Loc: [/builds/plasma/kwin/autotests/integration/dont_crash_useractions_menu.cpp(57)]
3 years ago
Vlad Zahorodnii 57f8faeb41 autotests: Fix TestPluginEffectLoader
PluginEffectLoader was changed so that it queries and loads all effects
immediately.
3 years ago
Vlad Zahorodnii dcd9a7b9ea autotests: Use Smart placement by default
Many tests were written with the smart placement in mind and fail now
because the default placement policy was changed to "centered"
3 years ago
l10n daemon script 3bb3c604c8 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"
3 years ago
l10n daemon script 20e5fc62b1 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"
3 years ago
Nicolas Fella 1d95dd3eaf Add GitLab CI 3 years ago
Vlad Zahorodnii dc3d0444e4 Drop Screens::displaySize()
It's the same as the workspace geometry, i.e. the bounding geometry of
all outputs.
3 years ago
Vlad Zahorodnii 3ad7bf01c8 Allow specifying scene geometry
The main motivation behind this change is to decouple the scene a bit
further from Screens, which is also obsolete.
3 years ago
l10n daemon script e20c9e7099 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"
3 years ago
Vlad Zahorodnii 4a1d5ea53c backends/drm: Improve PauseDevice/ResumeDevice signal handling
systemd takes care of setting and dropping master permissions when
sending PauseDevice and ResumeDevice signals.

When the ResumeDevice signal is received, the relevant drm device should
already have master permissions set up.

On the other hand, when the active property changes, there's still a
chance that systemd haven't granted drm master permissions to us.
3 years ago
Xaver Hugl 3a5cb1c441 backends/drm: only set pageflipPending when wanted
It shouldn't be set when the pipeline wants to be disabled. Whenever that
happens it will wait forever for the pageflip that doesn't come
3 years ago
Arjen Hiemstra dda45a7829 Overview: Only trigger middle click close with mouse/pen
For some reason, while touch doesn't have a middle button, the
taphandler for middle click close still triggered on tap. So make it
explicitly only support mouse/pen so we exclude touch events.

BUG: 445755
3 years ago
Vlad Zahorodnii 9f93358bc1 backends/drm: Notify about failed frames if there are actually pending frames
In case a modeset needs to be performed, the drm backend will test all
pipelines to ensure that new mode won't cause any bandwidth issues on
other outputs, etc.

To do that, it may delay presenting frames. If the new configuration
doesn't work, it needs to notify about failed frames.

However, the relevant code that notifies the RenderLoop about failed
atomic commits doesn't check if there's actually a pending modeset
present.

When switching between VTs, systemd can revoke master permissions from
kwin. To make things even more trickier, kwin can try to present a frame
in that short time span.
3 years ago
Vlad Zahorodnii d92bbdb2be effects/overview: Load close button in WindowHeap on demand
For many windows it will be invisible, so there's little point for
creating it ahead of time. Another reason for loading the close button
on demand is that Plasma components are typically heavy.
3 years ago
Vlad Zahorodnii 4881dd63a7 kwineffects: Make OffscreenQuickView generate double click events
Currently, MouseArea.doubleClicked doesn't work in QtQuick effects.
Luckily, the overview effect doesn't use it, but it's still worth making
sure that it works as expected regardless of whether it's a kwin effect.

With this change, the OffscreenQuickView will keep track of the last
mouse press event. If the second button press occurs within the mouse
double click interval, the OffscreenQuickView will generate a
QEvent::MouseButtonDblClick event, similar to what QGuiApplication would
normally do when processing window system events.
3 years ago
Vlad Zahorodnii 00273f10ff scripting: Use Toplevel::isOnOutput() in ClientFilterModel
This way, the ClientFilterModel will work as expected if there are
overlapping/cloned outputs.
3 years ago
David Edmundson 0f71b27c71 Ensure binary effects are loaded before cleints
The current code performed two functions:
 - metadata was read async
 - the event loop is spun between each effect loading

After we merged static and binary plugins this caused a problem for
things like blur and background contrast where loading an effect
influences what we advertise as supported. We don't want plasmashell to
have to reload all it's SVGs.

All KDE provided binary plugins are statically bundled so querying for
plugins is super duper fast anyway. It's not the same kbuildsycococa
path that it used to be.

The C++ plugins tend to be considerably faster in their constructor than
scripted counterparts, and if anything should be loaded lazily it can be
handled inside the effect.
3 years ago
Alexander Lohnau 70a2fb877a Register KWin effect macros for moc
Otherwise we get lots of moc warnings about there not being any relevant macro used
3 years ago
Alexander Lohnau b1e121397d GIT_SILENT Make kwin effects namespace not end with trailing slash
For the static plugins an exact string match is required
3 years ago
Alexander Lohnau f61097f3cb Remove now unneeded static effect loader class 3 years ago
Alexander Lohnau 66352bfc87 Utilize KCoreAddons infrastructure for static plugins 3 years ago
Vlad Zahorodnii f1e96676ef Remove boolean trap in AbstractClient::isShown()
Check shaded state where needed.
3 years ago
Ismael Asensio 9b3dfe2158 [WindowThumbnailItem] Expose the client's frameGeometry as implicit size
Set the implicit size of the item to the client frameGeometry size.

This is also more convenient for tabbox usage than accessing it through the
client's property, had a proper notify signal and abstracts it from the
implementation.

It also can be mimicked by the preview ThumbnailItem used in the tabbox KCM,
which has no client property.
3 years ago