Commit graph

19083 commits

Author SHA1 Message Date
Nate Graham
57b6091bd5 [effects/presentwindows] Activate even if only one window is open
Requested by VDG.

BUG: 428301
FIXED-IN: 5.22
2021-02-02 14:59:17 +00:00
Vlad Zahorodnii
f5925e2f17 wayland: Introduce internal popup event filter
The event filter allows dismissing the user actions menu by clicking
anywhere outside of it.

BUG: 428408
2021-02-02 14:09:44 +00:00
Xaver Hugl
30464e5c8b Implement direct scanout for the gbm backend 2021-02-02 13:26:43 +00:00
Aleix Pol
66f87138b1 Make it possible to restart kwin_wayland from a command line argument
A recent patch made it possible to restart KWin when it crashes, this
opens the possibility to do it for development purposes. So far it could
be done using `killall -9 kwin_wayland`. This patch embraces this
functionality under --replace so it's a bit more documented and under
its own semantics.
It is done by returning the process with 133 exit code and picking that
code specifically as a wish to restart.
2021-02-02 12:20:13 +00:00
Vlad Zahorodnii
e7dc64028c GIT_SILENT: kdecorations: Port away from Q_ENUMS to Q_ENUM
Q_ENUMS has been deprecated since Qt 5.5.
2021-02-02 09:55:56 +02:00
l10n daemon script
1d8ebfa475 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"
2021-02-02 07:28:08 +01:00
Vlad Zahorodnii
76effae5ca platforms/x11: Disable swap events by default on Intel
Some users reported performances issues after recent compositing
scheduling changes, in particular animations being laggy.

The issue is that sometimes it may take more than a vblank interval for
a buffer swap to complete. Previously, compositing was driven by a
timer and it wasn't synchronized to vblanks. If some frame is running
late, the compositor will just start painting a new frame, i.e. the
screen will be rendered triple buffered.

This change disables the swap events code path on Intel to restore the
previous behavior. Unfortunately, that may add an extra frame of latency.

The swap events code path can be enabled explicitly on Intel by setting
the KWIN_USE_INTEL_SWAP_EVENT environment variable to 1.
2021-02-01 18:51:59 +00:00
Vlad Zahorodnii
6aea213c84 platforms/x11: Build own vsync monitors only when GLX backend is built
The SGIVideoSyncVsyncMonitor and OMLSyncControlVsyncMonitor use GLX,
thus they should be compiled only if the GLX backend is built.
2021-02-01 18:49:16 +00:00
Vlad Zahorodnii
ffc013292f platforms/x11: Don't monitor vblanks on the root window
This makes scrolling in Firefox, which also monitors vblanks on the root
window, laggy.
2021-02-01 18:49:16 +00:00
Vlad Zahorodnii
b338c4cb0e platforms/x11: Move GLXFBConfig selection code in a separate file
This allows reusing the GLXFBConfig selection code.
2021-02-01 18:49:16 +00:00
Vlad Zahorodnii
4dcb3c495c effects/highlightwindows: Re-implement as AnimationEffect
On Wayland, the highlight window effect is not guaranteed to work all
the time because it uses the opacity to determine if the animation has
completed.

This change rewrites the highlight window effect using AnimationEffect
API to make it work both on X11 and Wayland. The implementation is based
on how the translucency effect works.
2021-02-01 13:07:11 +00:00
Xaver Hugl
f8d9b3bc6c Actually use a linear buffer format for multi-GPU
BUG: 431968
2021-02-01 11:28:28 +00:00
Xaver Hugl
2c6d19fec1 Only release shared buffers right before the next frame
BUG: 425586
2021-02-01 11:26:42 +00:00
David Edmundson
ed793dca21 Add option to enable XWayland debug 2021-02-01 09:14:17 +00:00
Vlad Zahorodnii
230b560ffc autotests: Fix TestXdgShellClient 2021-02-01 09:59:02 +02:00
Vlad Zahorodnii
21eee7de18 autotests: Fix TestDbusInterface
Activities had been exposed via the dbus interface in
6eda92a0fd.
2021-02-01 09:30:58 +02:00
Nicolas Fella
99947c8bd8 Use versionless Qt cmake target
This makes it easier to build against both Qt5 and Qt6

GIT_SILENT
2021-01-30 17:18:21 +01:00
Aleix Pol
46adeb79ec input methods: improve closing process
Make sure it's destroyed when kwin shuts down, make sure we don't start
it, for example because it crashed when we killed it like maliit does.
2021-01-29 17:11:14 +00:00
Laurent Montel
88b6076b2f GIT_SILENT: dont use deprecated cmake variable 2021-01-29 11:34:52 +01:00
Vlad Zahorodnii
b2d120a4dd Lower message severity of self test log messages
It is reported that the self test produces false positives with some
drivers. At quick glance, there is nothing in particular extremely wrong
with the test. Since not a lot can be done about the test except making
changes in drivers, the severity of the log messages should be lowered
to avoid polluting logs.
2021-01-28 20:00:05 +00:00
Aleix Pol
92c00d1dc3 screencasting: generate the composed textures with the proper size
Don't neglect the scale of the buffer for windows that we are rendering
on the spot.
Otherwise we will be offering a smaller size to what we are generally
using. More importantly, the ScreencastManager expects the buffers
scaled. This causes glitches when the stream starts otherwise as the
first frame triggers a resize.

CCBUG: 428594
2021-01-28 18:24:40 +00:00
Aleix Pol
38e656ba7e screencast: Properly report the initial size of windowed streams
Otherwise we'll be triggering a resize request first thing and never
hear back from the stream until a new frame is requested (which is often
rare when looking at a thumbnail).

BUG: 428594
2021-01-28 18:24:40 +00:00
Arjen Hiemstra
a53100dd55 ColorDevice: Always update on creation
ColorDevice gets recreated when outputs get removed and added back. This
means the output can be in an unknown state that does not match the
values in ColorDevice. So ensure we update after creating the device to
set it to a known proper state.
2021-01-28 17:25:08 +00:00
Vlad Zahorodnii
d074b47aab Fix logical error
It makes more sense to access position() if positionValid() returns true.
2021-01-28 17:18:43 +00:00
Vlad Zahorodnii
3e739ff877 Simplify InputDeviceHandler::updateDecoration() 2021-01-28 17:14:25 +00:00
Yuri Chornoivan
afcd2e031b Minor documentation formatting fixes 2021-01-28 17:47:15 +02:00
Vlad Zahorodnii
3788a8285d Remove QPointer from function prototypes in some input code
As it was pointed out in 6acf35e4cc, it is
better to return raw pointers than qpointers because returning a qpointer
is equivalent to constructing a new one.
2021-01-28 16:49:29 +02:00
Vlad Zahorodnii
a78754b695 Fix recorded render time when glXSwapBuffers() blocks
If glXSwapBuffers() blocks, the render loop will also record how long
kwin was blocked. Obviously, we don't want that.
2021-01-28 12:55:10 +00:00
David Edmundson
e6c1735bdc Restore default key repeat mode
Key repeat is the default we had in 5.20, albeit under a different key.
This changes for the key repeat was reverted elsewhere, but we need to
adjust the wayland default.
2021-01-28 09:36:11 +00:00
Xaver Hugl
90007b906b Change qpainter connect for initOutput to outputEnabled 2021-01-27 19:17:59 +00:00
David Edmundson
14ef991553 Initialise SessionState
It was used undefined
2021-01-27 14:48:38 +00:00
Vlad Zahorodnii
8681a69f47 Remove redundant usesOverlayWindow() method
Whether an overlay window is used for compositing can be determined by
checking the return value of overlayWindow().
2021-01-27 13:57:56 +00:00
Vlad Zahorodnii
8209cca810 wayland: Fix (mouse precedence) focus policies on desktop switch
If user has switched between virtual desktops, only X11 windows will be
taken into account when kwin decides what window has to be activated on
the new desktop.

With this change, Wayland clients will be considered too.
2021-01-27 13:56:46 +00:00
David Edmundson
ca81be6635 Fix the systemd wayland boot
Plasma-workspace currently starts kwin_wayland before afterwards
continuing to spawn the full session, through whatever mechanism.

We ultimately want to just have systemd manage everything all at once,
but this was not realised in time for 5.21 due to a problem of
propogating environment variables.

By removing this file we go to a working state with the option enabled,
and can build on it for the next release.

BUG: 432189
2021-01-27 13:47:56 +00:00
Peter Wilding
1f006e2184 Updated version to 5.21. Rewrote the whole article to be more descriptive. 2021-01-27 11:46:02 +00:00
Peter Wilding
5f05369c6d Rewrote Task Switcher help to describe all options and how they work in detail. 2021-01-27 11:46:02 +00:00
Méven Car
b7539d06b9 Add TestOutputManagement::testOutputDeviceRemoved
Test the mock VirtualBackend
2021-01-27 08:18:57 +00:00
Xaver Hugl
9f4a1433e4 Also initialize properties when not using AMS
BUG: 431981
2021-01-26 21:23:52 +01:00
Vlad Zahorodnii
7a997bc4ec Disable debug log messages for KWIN_UTILS by default
According to data/org_kde_kwin.categories, only warning messages or more
severe messages should be printed by default.
2021-01-26 10:50:57 +02:00
Vlad Zahorodnii
5eaf46c248 wayland: Don't call updateDecoration() for popups
After lowering the message severity for the KWIN_CORE logging category,
it has been found that the Workspace calls the updateDecoration() method
for every mapped popup surface.

Since the XdgPopupClient doesn't implement that method, a warning message
is printed every time a popup is mapped.

Given that XdgToplevelClient updates the decoration when needed, we can
remove the call to the updateDecoration() method.
2021-01-26 06:53:17 +00:00
Vlad Zahorodnii
33cf87f0ab x11: Update decoration input shape
We need to update the input shape; otherwise it won't be possible to
resize X11 windows without bottom and side borders.
2021-01-26 06:52:43 +00:00
Xaver Hugl
66daa862c1 Also set geometry restore to the new screen if maximizing 2021-01-25 19:37:06 +00:00
Xaver Hugl
fa92aef9a8 Move the geometry restore stuff for fullscreen into a new method 2021-01-25 19:37:06 +00:00
Vlad Zahorodnii
3305089ab3 kwineffects: Fix detection of Radeon GPUs 2021-01-25 17:55:08 +02:00
Vlad Zahorodnii
44176c6a8c Lower default severity of logging categories
Warning messages are not the kind of messages that should be ignored,
they indicate that something is off or wrong.

Also, this makes triaging bugs easier as we no longer have to ask people
to run kwin with the QT_LOGGING_RULES environment variable set.
2021-01-25 14:03:14 +02:00
Vlad Zahorodnii
3753d4d18d wayland: Update decoration on surface commit
This ensures that we process the destruction of the xdg decoration on
the next surface commit.

BUG: 431824
2021-01-24 23:52:27 +00:00
Vlad Zahorodnii
ed5dfa1691 Don't use "no border" property to determine if Deleted was decorated
With xdg-toplevel windows, the value of the "no border" property can be
sometimes out of sync with the fact whether the window is decorated. This
may result in Deleted windows being frameless.

In order to address that issue, we need to store the current value of
AbstractClient::isDecorated() during the construction of Deleted.
2021-01-24 23:52:27 +00:00
l10n daemon script
30c87f1bdf 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"
2021-01-24 07:05:52 +01:00
Vlad Zahorodnii
52118d94eb wayland: Fix crash when all outputs are disconnected
If all outputs have been disconnected, the screensQueried() signal won't
be emitted and Screens::count() and Screens::size() won't be updated.

The signal is not emitted to ensure that kwin is initialized properly when
there are no outputs.

Unfortunately, this breaks repaint scheduling code as it doesn't take
into account that the Screens class may lie in rare cases.

The drm backend should probably create a placeholder screen in case all
physical outputs have been disconnected, but in meanwhile, let's work
around this issue by porting the scene to the output api in the Platform.
2021-01-23 12:12:59 +00:00
Ismael Asensio
231d96c5c6 kcm/kwinrules: Add hint about ignore geometry
Some applications set their own geometry after start,
which overrides the initial rule settings for placement:
position, size and initial placement.

This happens now more often, after introducing the
"Remember app last position" feature for KXMLgui apps.

There is a mechanism to avoid that, by Forcing the rule property
"Ignore geometry", but it is unknown to many users.

This MR adds a hint when some rule properties might not be
respected by the application, so users can set this property
and hopefully avoid bug reports.

BUG: 428781
2021-01-22 18:18:38 +01:00