Commit graph

19071 commits

Author SHA1 Message Date
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
Vlad Zahorodnii
e8b045ce14 Remove pointless destructor 2021-01-14 22:11:30 +02:00
Vlad Zahorodnii
b5a1eba277 Properly schedule repaints with premature presentation timestamps
The last presentation timestamp might be in the future by a couple of
hundred microseconds.

This may break timestamp aligning code because it assumes that the
last presentation timestamp is less or equal to the current time.

In order to properly handle this case, we have to first compute the
next expected presentation timestamp by advancing the last presentation
timestamp by the amount of vblank interval. If that fails, we can safely
resort to aligning timestamps.

BUG: 431509
BUG: 431449
2021-01-14 20:45:20 +02:00
Vlad Zahorodnii
242439b8af Minor whitespace fixes 2021-01-14 11:40:22 +02:00
Vlad Zahorodnii
e5abd704de Remove stray file and unused variable
It seems like they were introduced by accident while resolving merge
conflicts.
2021-01-14 11:39:33 +02:00
David Edmundson
85d04cf60d Add ftrace markers
This logs to a tracefs filesystem which can be viewed in tools such as
gpuvis to see precise timings of activities in relation to other trace
markers in X or graphic drivers.

This patch is loosely based on D23114. Though modified with thread
safety, support for string building, and a RAII pattern for durations.
Ultimately that expanded it somewhat.
2021-01-14 09:31:59 +00:00
Méven Car
4f744d1bb6 Add TestOutputManagement::testOutputDeviceDisabled test
Allow VirtualBackend to supports Output changes.
2021-01-14 08:21:59 +00:00
l10n daemon script
866dfb4e89 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-14 07:04:00 +01:00
Vlad Zahorodnii
eea823bb67 Remove unused field 2021-01-12 13:06:38 +02:00
Vlad Zahorodnii
0dd79ddb4a Revert "fix: Restore the default properties of dialog window so that the max and min buttons can be customized"
This reverts commit bf5155f82b.

Maximize and minimize function hints provided by some applications are
bogus. This in its turn breaks video games that minimize themselves when
they loose input focus.

Ideally, the window manager should not be concerned about Motif hints
provided by NetWM applications as they set the window type.

BUG: 431450
2021-01-12 10:25:41 +00:00
l10n daemon script
e938a569bc 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-12 06:49:28 +01:00
Andrey Butirsky
8d84fe4b6a fix: KeyboardLayoutTest fails
********* Start testing of KeyboardLayoutTest *********
Config: Using QtTest library 5.15.2, Qt 5.15.2 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 10.2.1 20201016 (Red Hat 10.2.1-6)), fedora 33
PASS   : KeyboardLayoutTest::initTestCase()
PASS   : KeyboardLayoutTest::testReconfigure()
FAIL!  : KeyboardLayoutTest::testChangeLayoutThroughDBus() 'layoutChangedSpy.wait()' returned FALSE. ()
   Loc: [/home/bam/kde/src/kwin/autotests/integration/keyboard_layout_test.cpp(218)]
FAIL!  : KeyboardLayoutTest::testPerLayoutShortcut() 'layoutChangedSpy.wait()' returned FALSE. ()
   Loc: [/home/bam/kde/src/kwin/autotests/integration/keyboard_layout_test.cpp(286)]
PASS   : KeyboardLayoutTest::testDBusServiceExport()
PASS   : KeyboardLayoutTest::testVirtualDesktopPolicy()
PASS   : KeyboardLayoutTest::testWindowPolicy()
FAIL!  : KeyboardLayoutTest::testApplicationPolicy() 'layoutChangedSpy.wait()' returned FALSE. ()
   Loc: [/home/bam/kde/src/kwin/autotests/integration/keyboard_layout_test.cpp(465)]
PASS   : KeyboardLayoutTest::testNumLock()
PASS   : KeyboardLayoutTest::cleanupTestCase()
Totals: 7 passed, 3 failed, 0 skipped, 0 blacklisted, 16447ms
********* Finished testing of KeyboardLayoutTest *********

- currentLayoutChanged signal has changed to layoutChanged
- per cfcf2baae7, the signal is now emitted
  on every layout change
2021-01-11 11:50:34 +00:00
Srevin Saju
68a7daff58
fix: do not use Implicit QML function call
Qt 5.15 introduced new syntax for defining Connections. Fix warnings like this one:
    QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }

follow up of d2f3372749
2021-01-10 13:35:23 +03:00
l10n daemon script
7205c85b98 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-08 06:51:29 +01:00
Andrey Butirsky
c42525693b Remove a basic SNI for keyboard layout
Reverts major part of fe561c5c7d

We now have platform-agnostic QML applet with superior functional, so
this one doesn't needed any more.

CCBUG: 390079
2021-01-07 23:58:15 +00:00
Rosca Alex
c81fe56d7c effects: Add an animation curve to maximize and fullscreen
Replace the default linear easing curve with OutCubic.
2021-01-07 23:51:56 +00:00
Vlad Zahorodnii
49faf6790f Fix a typo 2021-01-07 21:28:00 +02:00
Vlad Zahorodnii
6d20d19fec platforms/x11: Always set swap interval to 1
With the new compositing scheduling, we want the screen to be redrawn as
close as possible to the next vblank. Furthermore, compositing is no
longer driven by a timer. This change removes the NoSwapEncourage swap
strategy as it doesn't make sense now, in addition to that it just does
not work on Wayland.
2021-01-07 13:10:59 +00:00
Vlad Zahorodnii
2e3a6b7253 cmake: Minor cleanups in X11 platform CMakeLists.txt 2021-01-07 12:13:14 +02:00
Vlad Zahorodnii
5bf421ef83 cmake: Specify min version for wayland-protocols 2021-01-07 09:50:55 +00:00
Vlad Zahorodnii
5302094f30 cmake: Link against imported Xinput target 2021-01-07 09:50:24 +00:00
Vlad Zahorodnii
b67f743795 cmake: Drop libkwin's unused Xlib dependencies 2021-01-07 09:50:24 +00:00
Vlad Zahorodnii
c5d97ba04a cmake: Clean up CMakeLists.txt for QPA plugin 2021-01-07 09:49:54 +00:00
Vlad Zahorodnii
3dc00de812 platformsupport: Set PUBLIC include directories
This makes using platform support libs easier.
2021-01-07 09:49:26 +00:00