19050 Commits (92d3cb2f224a62ab07fbf3d28bd2ce0ad9b0eef9)
 

Author SHA1 Message Date
Aleix Pol 92d3cb2f22 inputmethod: If the client hides itself, act accordingly 4 years ago
Xaver Hugl 7a937fc7af Ignore fully translucent Toplevels for direct scanout 4 years ago
Nicolas Fella ecd9e1c98d Use imported target for Threads 4 years ago
Nicolas Fella d7ab631e98 Find ECM with KF5 min version
Instead of some randon older version
4 years ago
Nicolas Fella b7e13da70f Merge two CMAKE_MODULE_PATH set calls 4 years ago
Bhushan Shah debea631f3 platforms/drm: inhibit the renderloop when screen is turned off
Otherwise we will continue using gpu resources even when we can not show
any content on screen.
4 years ago
Vlad Zahorodnii e7a5726c8b cmake: Use versionless Qt::Qml imported target
While resolving merge conflicts in a patch that ported kwin away from
QtScriptEngine to QJSEngine, I forgot to switch to versionless imported
targets.
4 years ago
Vlad Zahorodnii 691df1ae00 qpa: Use imported targets for QtCore and QtGui private headers 4 years ago
Nicolas Fella 17381dcf05 Use upstream FindLibinput
It exists since 3.14
4 years ago
Nicolas Fella c777d5a3a7 Raise minimum CMake version to 3.16
As discussed in https://mail.kde.org/pipermail/plasma-devel/2021-February/119329.html

GIT_SILENT
4 years ago
Chaojiang Luo fdc7e976fe screencast: Add OpenGLES support for screencasting
OpenGLES does not support glGetTextureImage, we use glReadPixels to
replace it.
4 years ago
Vlad Zahorodnii d9ec482257 x11: Initialize opacity when starting to track Unmanaged
This is a minor regression that was introduced with the refactoring of
Toplevel::opacity().

Previously, neither X11Client nor Unmanaged had to explicitly initialize
the opacity because it was queried from the net info object in
Toplevel::opacity().

With the refactored version, X11-specific opacity code was removed from
the Toplevel class. When starting to manage a window, the opacity must
be explicitly initialized.

BUG: 432744
4 years ago
l10n daemon script 5f7a2806f0 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"
4 years ago
Xaver Hugl 7cc95d931b Improvements for direct scanout
Instead of cancelling direct scanout if the client buffer is not
fitting, adjust the atomic planes. Also ignore all toplevels from
other screens.
4 years ago
Aleix Pol 4638f2f309 inputmethod: Refactor VirtualKeyboardDBus to have its own InputMethpd
This way we can have it call methods directly instead of connecting to
its signals.
4 years ago
Aleix Pol 63a7b25801 inputmethod: Provide DBus API so the shell can integrate with it
It makes it possible to show if the virtual keyboard is being shown and
if it is to hide it.
4 years ago
Vlad Zahorodnii 6a26540065 wayland: Query pkg-config if Xwayland supports listenfd
-listen <fd> option is deprecated in favor of the -listenfd option. This
change makes kwin query whether Xwayland supports the -listenfd option
at build time. If the pkg-config file is missing, we'll use the old listen
option.
4 years ago
Aleix Pol b409f523f0 Revert "cmake: Get XKB information directly from PkgConfig"
This reverts commit 3c97cecdb0.

It seems to break on the CI and I don't understand why.
4 years ago
Aleix Pol 3c97cecdb0 cmake: Get XKB information directly from PkgConfig
Rather than having it abstracted in a local FindXKB package.
Makes the code more standard and removes a custom finder we ultimately
don't need.
4 years ago
Aleix Pol 618c330ca8 Do not attempt to compare iterators of potentially different containers
I got this crash after leaving my system unattended:
```
0  std::__atomic_base<int>::load(std::memory_order) const (this=0x0, __m=std::memory_order_relaxed) at /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../include/c++/10.2.0/bits/atomic_base.h:426
1  QAtomicOps<int>::loadRelaxed<int>(std::atomic<int> const&) (_q_value=...) at /home/apol/devel/kde5/include/QtCore/qatomic_cxx11.h:239
2  QBasicAtomicInteger<int>::loadRelaxed() const (this=0x0) at /home/apol/devel/kde5/include/QtCore/qbasicatomic.h:107
3  QtPrivate::RefCount::isShared() const (this=0x0) at /home/apol/devel/kde5/include/QtCore/qrefcount.h:101
4  QMap<KWin::Group*, KWin::Layer>::detach() (this=0x7f1b577b7870 <qt_array+48>) at /home/apol/devel/kde5/include/QtCore/qmap.h:357
5  QMap<KWin::Group*, KWin::Layer>::find(KWin::Group* const&) (this=0x7f1b577b7870 <qt_array+48>, akey=<optimized out>) at /home/apol/devel/kde5/include/QtCore/qmap.h:861
6  KWin::Workspace::constrainedStackingOrder() (this=this@entry=0x564b368c6290) at /home/apol/devel/frameworks/kwin/src/layers.cpp:502
7  0x00007f1b5708d027 in KWin::Workspace::updateStackingOrder(bool) (this=0x564b368c6290, propagate_new_clients=false) at /home/apol/devel/frameworks/kwin/src/layers.cpp:110
8  0x00007f1b571629be in KWin::X11Client::setFrameGeometry(QRect const&, KWin::AbstractClient::ForceGeometry_t) (this=0x564b374b4e60, rect=<optimized out>, force=<optimized out>) at /home/apol/devel/frameworks/kwin/src/x11client.cpp:4193
9  0x00007f1b57003fbf in KWin::AbstractClient::blockGeometryUpdates(bool) (this=this@entry=0x564b374b4e60, block=<optimized out>) at /home/apol/devel/frameworks/kwin/src/abstract_client.cpp:871
10 0x00007f1b570054f1 in KWin::GeometryUpdatesBlocker::~GeometryUpdatesBlocker() (this=<optimized out>) at /home/apol/devel/frameworks/kwin/src/abstract_client.h:1334
11 KWin::AbstractClient::checkWorkspacePosition(QRect, int, QRect) (this=0x564b374b4e60, oldGeometry=..., oldDesktop=1, oldClientGeometry=...) at /home/apol/devel/frameworks/kwin/src/abstract_client.cpp:3189
12 0x00007f1b571409e0 in KWin::Workspace::updateClientArea(bool) (this=<optimized out>, this@entry=0x564b368c6290, force=false) at /home/apol/devel/frameworks/kwin/src/workspace.cpp:2234
13 0x00007f1b57138fc6 in KWin::Workspace::updateClientArea() (this=0x564b368c6290) at /home/apol/devel/frameworks/kwin/src/workspace.cpp:2243
14 KWin::Workspace::desktopResized() (this=0x564b368c6290) at /home/apol/devel/frameworks/kwin/src/workspace.cpp:1980
15 0x00007f1b57707806 in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7fff671a2e50, r=0x564b368c6290, this=0x564b372f1860) at ../../include/QtCore/../../../../../devel/frameworks/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:398
16 doActivate<false>(QObject*, int, void**) (sender=0x564b368a0fe0, signal_index=4, argv=0x7fff671a2e50) at /home/apol/devel/frameworks/qt5/qtbase/src/corelib/kernel/qobject.cpp:3886
17 0x00007f1b57707806 in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7fff671a2f30, r=0x564b368a0fe0, this=0x564b368a10f0) at ../../include/QtCore/../../../../../devel/frameworks/qt5/qtbase/src/corelib/kernel/qobjectdefs_impl.h:398
18 doActivate<false>(QObject*, int, void**) (sender=0x564b36775640, signal_index=3, argv=0x7fff671a2f30) at /home/apol/devel/frameworks/qt5/qtbase/src/corelib/kernel/qobject.cpp:3886
19 0x00007f1b4ee2f9c3 in KWin::DrmBackend::updateOutputs() (this=this@entry=0x564b36775640) at /home/apol/devel/frameworks/kwin/src/plugins/platforms/drm/drm_backend.cpp:374
20 0x00007f1b4ee31d54 in KWin::DrmBackend::openDrm()::$_2::operator()() const (this=<optimized out>) at /home/apol/devel/frameworks/kwin/src/plugins/platforms/drm/drm_backend.cpp:328
```
4 years ago
Aleix Pol 3b2b9e01f2 Fix GlobalShortcutsTest::testWaylandClientShortcut() 4 years ago
Aleix Pol e4bed6ea27 Still mark setUnresponsive(false) when the pings arrive late
It usually means that the client was busy and couldn't answer the ping
as early as we'd hoped but there's a good chance the process is healthy
again.
4 years ago
Yuri Chornoivan b5f9d9fda8 Fix disambiguation found by gettext 0.21 4 years ago
l10n daemon script 7b557527f5 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"
4 years ago
Xaver Hugl 1f7e794b82 DrmGpu: add gbm device nullptr check
BUG: 433145
4 years ago
Vlad Zahorodnii 37c145e94b wayland: Fix PrepareForSleep dbus connection
This is a typo. We must use the path of the manager rather than the
session path, which is not initialized yet.
4 years ago
Đoàn Trần Công Danh 5ba3284712 ftrace: use quint32 for context counter
Some old platforms don't have atomic integer supports for 64-bit wise
integer.

As indicated in GPUVis:

	// Erase all knowledge of this ctx so it can be reused

We can reuse numbers after end_ctx, so with we should be fine with
32-bit integer.

Let's use a 32 bit integer for context.
4 years ago
Đoàn Trần Công Danh 5cc062c77c 3rdparty/xcursor: build with _DEFAULT_SOURCE
For both DT_UNKNOWN and DT_LNK.
4 years ago
Đoàn Trần Công Danh 7800f15587 helper: wl-socket: fix build for musl
bind(2) expects its second parameters is a "const struct sockaddr*",
let's cast the "struct sockaddr_un*" to "struct sockaddr*" before
passing into bind(2).

SUN_LEN is a BSD extension that also implemented by GNU, let's define
_DEFAULT_SOURCE before including "sys/un.h".
4 years ago
Vlad Zahorodnii 9977f21980 wayland: Honor NoPlugin option
If decorations are disabled, don't send xdg-toplevel-decoration
configure events requesting ssd mode.
4 years ago
Vlad Zahorodnii 6c9e0781cd Simplify code that destroys plugins and color manager
This reduces some code duplication and ensures that plugins and the
color manager are destroyed while Platform is still valid.
4 years ago
Vlad Zahorodnii e1279e516c wayland: Track already existing subsurfaces in SubSurfaceMonitor
When the monitor is created, the surface may already have child
sub-surfaces. The childSubSurfaceAdded signal won't be emitted for them,
we need to handle this case explicitly.

BUG: 433511
FIXED-IN: 5.21.2
4 years ago
Vlad Zahorodnii 73dd65f452 Fix build 4 years ago
Aleix Pol 65ad7ffb27 inputmethod: do not cover panels with the input method (e.g. virtual keyboard)
This way we can adapt the panels themselves to show useful UX like
hiding the keyboard or switching.
4 years ago
Vlad Zahorodnii 220a1e0441 Add QDebug stream operator for AbstractOutput
This can be useful for debugging purposes.
4 years ago
Vlad Zahorodnii 33ba2974eb effects: Properly copy previous geometry
In QJSEngine, QRect is an Object, which is correct. This means that we
cannot use simple assignment operator to copy geometries, we need to use
standard ways to copy Objects, such as Object.assign() or the spread
operator, which is not available in QJSEngine yet.
4 years ago
Vlad Zahorodnii bd4d17b3a1 Drop QtScript dependency
QtScript is not used anywhere anymore plus it's dropped in Qt 6.
4 years ago
David Edmundson ae6e6dc63c [scripting] Port ScriptedEffects to QJSEngine
Summary:
QScriptEngine is deprecated for years and suffers bitrot.
Plasma hit one super major bug with it in 5.11.0 and has now ported
away.

Main porting notes:
- creating low level functions no longer exists
The old global functions are exposed on the ScriptedEffect instance
and then the QJSValue wrappers of the globalObject are modified to
trampoline the methods at a wrapper level.

- We can then use QJSEngine to automatically do argument error checking
rather than unmarshalling a QJSValue manually which significantly
reduces a lot of code.

- We can't make FPX2 a native type, so these are QJSValue args and
unboxed there.

Long term I want overloads for animate that take int/QSize/QPoint which
are native JS types, but that might be an API break.

Test Plan:
Hopefully comprehensive unit test which passes
Tested fade/fadeDesktop manually.

It's a very invasive change, so I expect some things will be broke
please help test any JS effects.

Reviewers: #kwin, mart, fvogt

Subscribers: fvogt, zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D14536
4 years ago
Vlad Zahorodnii 566d4aa27b scripting: Port Script to QJSEngine
QtScript is not well maintained and deprecated in favor of QJSEngine.
4 years ago
Bhushan Shah 28d2650f24 [platforms/drm] include missing errno.h include
CCMAIL: Xaver Hugl <xaver.hugl@gmail.com>
4 years ago
Xaver Hugl 6703bc9d24 Improve teardown of DrmGpu 4 years ago
Bhushan Shah ae8e69b4bb [platforms/drm] accept both keypress and keyrelease event in filter
We don't want to pass out either of key press or release event to other
filters.
4 years ago
Vlad Zahorodnii 58bee8e38a Fix build 4 years ago
Vlad Zahorodnii 94b63c16f2 autotests: Register virtual keyboard service
Otherwise the input method test seems to fail with the following error

"The name org.kde.kwin.testvirtualkeyboard was not provided by any
.service files"
4 years ago
Bhushan Shah b24fc72969 [platforms/drm] only enable output on key press not release
Otherwise if powerdevil for example is configured to turn screen off on
the power key press, we will turn it right back on when we get key
release event.

Suggested-by: David Edmundson <kde@davidedmundson.co.uk>
4 years ago
Vlad Zahorodnii ea4acb5763 autotests: Make PointerInputTest more robust
According to the spec, when the pointer enters a surface, the contents
of the cursor becomes undefined. The client should call set_cursor() to
make sure that the cursor image is correct.
4 years ago
Vlad Zahorodnii 4061cbc97d Create Xcursor sprites with correct format
"ARGB32" is a typo, it needs to be "ARGB32_Premultiplied."
4 years ago
l10n daemon script 553b6d39c6 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"
4 years ago
Vlad Zahorodnii 33e3b92946 effects/wobblywindows: Allow model geometry and real geometry get out of sync
Currently, the wobbly windows effect assumes that the window data will
be updated on every repaint. However, there are legit cases when the
time diff between frames can be 0, for example when per screen rendering
is on.

If we are unlucky enough and the geometry of the window changes in that
very short moment, the mapping between window quads and the bezier
patch will be wrong. The window will most likely bounce back and forth.

In order to improve handling of that tricky case, this change makes the
computeBezierPoint() function take the "uv" coordinates rather than the
absolute "xy" coordinates of window vertices. This loosens the
connection between the real geometry of the window and the cached bezier
patch, and overall makes the effect's timing code more robust.

This can be also useful if the wobbly windows effect starts accumulating
time diffs and performing the integration step every N msecs with the
purpose of maintaining uniform "wobbliness" across different refresh rates.

BUG: 433187
4 years ago
Vlad Zahorodnii 823692abc1 effects/wobblywindows: Refactor the update loop
This way, the code is more tidier.
4 years ago