Commit graph

18944 commits

Author SHA1 Message Date
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
Vlad Zahorodnii
887a859621 wayland: Close layer-shell clients when associated output is disabled
When an output is disabled, it's not necessarily destroyed.
2021-01-22 10:17:45 +00:00
Vlad Zahorodnii
de9af6edce wayland: Arrange layer shell surfaces only on enabled outputs
There should not be any layer shell surfaces on disabled outputs.
2021-01-22 10:17:45 +00:00
David Edmundson
154a38adf5 Test fullscreen in conjuction with sendToScreen 2021-01-22 09:50:52 +00:00
Heiko Becker
44713ac642 Include <fcntl.h> for open()
According to POSIX [1] that's where it is defined.

[1] https://pubs.opengroup.org/onlinepubs/009604499/basedefs/fcntl.h.html
2021-01-21 22:18:33 +01:00
Heiko Becker
7db93b7cd7 Replace uint with unsigned int
Improves portability by avoiding the non-standard 'uint'. For example
this fixes building with musl libc:

".../kwin_wrapper.c:45:9: error: unknown type name 'uint';
    did you mean 'int'?"
2021-01-21 22:00:33 +01:00
Jonathan Riddell
f47ae2c0c5 Update version number for 5.21.80
GIT_SILENT
2021-01-21 13:38:08 +00:00
Jonathan Riddell
6f51a9cc8f Update kf5 version requirement to 5.78
GIT_SILENT
2021-01-21 12:28:31 +00:00
David Edmundson
e6eee5f970 Register unique service name when wayland keyboard interface is in use
A situation meant we want to only enable the new keyboard applet by
default on wayland, using the legacy one from the X11 daemon on X11.

We need a unique service name so that we can use DBus activation on it.
2021-01-21 12:24:07 +00:00
Jonathan Riddell
a0c7f997d4 Update version number for 5.20.90
GIT_SILENT
2021-01-21 12:07:20 +00:00
Vlad Zahorodnii
e370fcb218 Simplify Toplevel::addRepaintFull()
This avoids mapping the visible rect between the window local
coordinates and the global coordinates back and forth.
2021-01-21 10:18:00 +00:00
David Edmundson
b918361acf Avoid race on keyboard layout registering
If a service name exists, the relevant object at that path always
should, otherwise it's technically racey due to DBus running in another
thread.
2021-01-21 09:32:29 +00:00
Vlad Zahorodnii
523ad8e25c effects/zoom: Schedule a repaint when window is damaged
This is needed to make per-screen rendering work correctly.

BUG: 431652
2021-01-21 07:51:19 +00:00
Vlad Zahorodnii
54313d324e effects/magnifier: Schedule a repaint when window is damaged
This is needed to make per-screen rendering work correctly.

BUG: 431652
2021-01-21 07:51:19 +00:00
Vlad Zahorodnii
35e254a8a9 effects/lookingglass: Schedule a repaint when window is damaged
This is needed to make per-screen rendering work correctly.

BUG: 431652
2021-01-21 07:51:19 +00:00
Xaver Hugl
5d548179f8 Fix fullscreen moveresize and set geometry restore to the screen a fullscreen client gets moved to 2021-01-20 19:36:07 +00:00
Méven Car
bd626d9565 ScreenshotEffect: fix lookup of ComparableQPoint keys in QMap
QMap::value() failed to find existing keys when tow ComparablePoint
shared the same x but not the same y.

This commit improves the operator<() to fix that.
2021-01-20 16:50:44 +00:00
Bhushan Shah
57086c341c wayland: fix check for creating input method connection
Previously code was if socket fd is greater then 0, then we start
process, but new code in 05ebe676d2 reversed logic. So this
made it not start input method at all.
2021-01-20 20:52:53 +05:30
Vlad Zahorodnii
69adaf64df wayland: Prevent snapping normal windows to notifications and OSDs
It's annoying.
2021-01-20 14:06:56 +00:00
Andrey Butirsky
26505e14dd refactor: keyboard layout applet: return to Properties-based QML API
As all layouts names are now stored in Property on client side, there is
no need for KeyboardLayoutDBusInterface::getLayoutLongName() method any
more.
2021-01-20 16:39:32 +03:00
Andrey Butirsky
c0d724b538 fix: Clazy detached QVector warning [clazy-range-loop]
warning: c++11 range-loop might detach Qt container (QVector) [clazy-
range-loop]
2021-01-20 16:39:32 +03:00
Andrey Butirsky
071920418d fix: KeyboardLayoutTest fails on updated DBus API
Adress changes in methods:
- setLayout()
- layoutNames()
- layoutChanged() signal
2021-01-20 16:39:32 +03:00
Andrey Butirsky
73aa6fba4a refactor: pass layout in KeyboardLayout::layoutChanged() signal argument
On that signal, we asquare the new layout anyway all over the places.
Better just pass it along with the signal instead.

Also it's in-line with DBus API signal.
2021-01-20 16:39:32 +03:00
Andrey Butirsky
260fa665a2 impr: keyboard layout DBus API: rework to index based
The base handle for layouts in libxkbcommon is an index. Let's follow
this notion in our API to set/get layout, instead of using it's name as
an ID.

On the way, do cleanup. Following methods are removed as not needed any
more:
- Xkb::layoutShortNames()
- Xkb::layoutNames()
2021-01-20 16:39:31 +03:00
Andrey Butirsky
d2da79cb8d fix: keyboard layout applet: no flag if Display Name is set
If user set custom name for the layout, country flag is not displayed.
Instead, Display Name is shown in the applet.

This reveals shortcomings in current DBus API design.
We need more data to pass over DBus to fix this.
Then, multiple improvements are possible:
- fix aforementioned bug
- add flags to context menu
- display correct translated Layout Name in the context menu
- simpler, cleaner DBus API and applet implementation
- etc.
2021-01-20 16:39:31 +03:00
Cyril Rossi
d425e78cab KCM KWinEffects highlight effects that are not in default state
add EnabledByDefaultFunctionRole in EffectsModel
2021-01-20 10:44:21 +00:00
Xaver Hugl
93ee2f6815 Add test for TouchInputRedirection::m_touches 2021-01-18 17:00:47 +00:00
Xaver Hugl
3c23194037 Process TOUCH_CANCEL events from libinput individually
This fixes a bug where cancelled touch sequences get ignored
which results in stuck touch focus.
2021-01-18 17:00:47 +00:00
Xaver Hugl
a4fb852a94 Replace per-device touch slot with global slot
With multiple touch devices the slots could interfere
2021-01-18 17:00:47 +00:00
Méven Car
8bb5b27448 VirtualBackend: make sure the initial dummy VirtualOutput is enabled
Fix tests regressions introduced in 39a1e11958b1ad47d9a516c1cb4bcea852e92a00
2021-01-18 16:57:07 +00:00
Aleix Pol
7ba1937f5c Restart the input method if it crashes 2021-01-18 16:43:05 +00:00
Aleix Pol
05ebe676d2 Introduce a setting to specify an input method
At the moment we are getting the input method from the command line
which is not very handy (but very secure).
This patch changes it so it can be specified from a configuration
setting.

CCBUG: 427972
2021-01-18 16:43:05 +00:00
l10n daemon script
59b1dee55a 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-17 06:42:32 +01:00
Vlad Zahorodnii
907480037a cmake: Don't search for Qt5Sensors 2021-01-15 23:30:25 +02:00
Vlad Zahorodnii
15d6be5c0c cmake: Drop Qt5::Sensors dependency
QOrientationSensor is no longer used by kwin.
2021-01-15 23:27:32 +02:00
Vlad Zahorodnii
19461f4413 cmake: Don't list linked libraries in variables
If a non-existing variable is used, no warning will be printed.
2021-01-15 23:18:20 +02:00
Vlad Zahorodnii
2d1994e066 aurorae: Make direct connection to maximizedChanged signal
If the maximizedChanged connection is queued, several configure events
will be sent. If the client acks the first configure event and later on
acks the second one, the maximize animation will be cancelled due to
"unexpected" geometry change.

Based on the code, there is no clear reason why the connection is queued
in the first place.

CCBUG: 431415
2021-01-15 13:26:49 +00:00
Andreas Hartmetz
667177d6cb Prevent unused variable warnings when building for tests 2021-01-15 13:48:23 +01:00
Vlad Zahorodnii
870a9e4d06 Minor pedantic include fixes in FTraceLogger
Project includes must come first; keep Qt includes together.
2021-01-14 22:18:23 +02:00
Vlad Zahorodnii
e68d06b31b Add missing const keyword 2021-01-14 22:13:21 +02:00