Summary:
Use #else, otherwise there are two return statements after each other
which doesn't make sense.
Reviewers: #kwin, romangg
Reviewed By: #kwin, romangg
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D23068
This usage of QWeakPointer has been deprecated since Qt 5.0, since it
leads to really confusing API - usually you must never dereference a
QWeakPointer directly, but always go through QSharedPointer, except in
this one case, where it's permissible.
Use QPointer instead, which is clean.
Only keep the QPointer where the object in question may get deleted,
while in the API where it has to be valid, use a regular pointer.
Initializing the pointer explicitly to nullptr makes no sense.
This reverts commit 5c39795b88.
This unfortuntaely introduces the regression on the phone where there's
multiple bugs preset,
- Keyboard can no longer be closed using close button, or removing
focus.
- Opening keyboard makes application get no input events, making it look
like it is crashed/stuck or hung.
I failed to reproduce this bug on desktop unfortunately.
CCMAIL: Aleix Pol <aleixpol@kde.org>
Summary:
With the split of the Compositor class in X11 and Wayland it is unnecessary
to check in X11Compositor if compositing is required since on X it never is.
Test Plan: Compiles.
Reviewers: #kwin, zzag
Reviewed By: #kwin, zzag
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D23032
Summary: Replaces foreach loops with modern for loops and improve code style overall.
Test Plan: Auto tests pass as before and manually in X and Wayland sessions.
Reviewers: #kwin
Subscribers: zzag, kwin
Tags: #kwin
Maniphest Tasks: T11071
Differential Revision: https://phabricator.kde.org/D23011
Summary:
This patch is a first take at splitting up of the Compositor class into
Wayland and X11 child classes.
In this first patch we mostly deal with setup and teardown procedures.
A future goal is to further differentiate the compositing part itself too.
Test Plan: Manually X from VT and Wayland nested. Autotests pass.
Reviewers: #kwin
Subscribers: sbergeron, anthonyfieroni, zzag, kwin
Tags: #kwin
Maniphest Tasks: T11071
Differential Revision: https://phabricator.kde.org/D22195
Summary: This adds support for LinuxDmabufUnstableV1Interface in kwin.
Test Plan: Session starts. `weston-simple-dmabuf-egl` and `weston-simple-dmabuf-drm` execute without errors.
Reviewers: #kwin, #plasma, davidedmundson, mart, graesslin, fredrik
Subscribers: meven, zzag, romangg, anthonyfieroni, plasma-devel, kwin
Tags: #kwin
Maniphest Tasks: T8067
Differential Revision: https://phabricator.kde.org/D10750
Summary:
Apply the KDE HIG, use a form layout, make the desktop file consistent and make the KCM look better.
{F7160251}
{F7149956}
Test Plan: Open the Screen Edges and Touch Screen KCMs.
Reviewers: #kwin, #plasma, #vdg, zzag, ngraham
Reviewed By: #kwin, #plasma, #vdg, zzag, ngraham
Subscribers: ngraham, zzag, #vdg, #plasma, kwin, #kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D22909
Summary:
Tweak spacing and margins, improve the look of headers and descriptions.
{F7155024}
Test Plan: Open the Desktop Effects KCM and hover over a list item.
Reviewers: #kwin, #plasma, #vdg, ngraham
Reviewed By: #vdg, ngraham
Subscribers: ngraham, #vdg, #plasma, kwin, #kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D22914
Summary:
Use the same list style as the Virtual Desktops KCM and Kirigami actions with tooltips.
Also removes the info button. The copyright info can now be accessed by clicking on the item.
BUG: 409693
BUG: 335197
BUG: 335198
Test Plan:
Together with D22827:
{F7138726}
Reviewers: #kwin, #vdg, filipf, GB_2, ngraham, davidedmundson
Reviewed By: #kwin, #vdg, filipf, GB_2, ngraham, davidedmundson
Subscribers: ngraham, GB_2, filipf, kwin
Tags: #kwin, #vdg
Maniphest Tasks: T10273
Differential Revision: https://phabricator.kde.org/D22830
Summary:
The QML Window Decorations KCM uses a fake tab bar with code copied from Plasma-pa, due
to the lack of a real QML tab widget (see https://bugs.kde.org/show_bug.cgi?id=394296).
As a result, we have to manufacture our own by combining a TabBar with a frame in which
the content sits, and any change made to one needs to be applied to the other as well.
The Plasma-pa version just received a minor change in D22533. This patch implements the
same change for the Window Decorations KCM so they don't look inconsistent with one
another.
Test Plan: Before-and-afters are identical to the images in D22533
Reviewers: #kwin, #vdg, filipf
Reviewed By: #vdg, filipf
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D22886
Summary: No need to load the keyboard view as soon as wayland starts. It's not a simple UI and it often will be unused.
Test Plan: played with the keyboard, still worked
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: davidedmundson, graesslin, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D22430
Summary:
When ShellClient tears down, it needs to access RuleBook in order to
discard temporary rules. The problem is that WaylandServer outlives
Workspace and therefore so does ShellClient.
We can't guard against the case when RuleBook::self() is nullptr as it
is vital to discard temporary rules.
This change adjusts termination sequence so all shell clients are
destroyed before Workspace(and thus RuleBook) is gone.
ASAN output:
==19922==ERROR: AddressSanitizer: heap-use-after-free on address 0x606000142060 at pc 0x7fbc0fb878bb bp 0x7ffd7d464520 sp 0x7ffd7d464518
READ of size 8 at 0x606000142060 thread T0
#0 0x7fbc0fb878ba in QList<KWin::Rules*>::detach() /usr/include/qt5/QtCore/qlist.h:172
#1 0x7fbc0fb8538d in QList<KWin::Rules*>::begin() /usr/include/qt5/QtCore/qlist.h:324
#2 0x7fbc0fb808b6 in KWin::RuleBook::discardUsed(KWin::AbstractClient*, bool) /home/jenkins/workspace/Plasma/kwin/kf5-qt5 SUSEQt5.12/rules.cpp:1144
#3 0x7fbc0fe36e32 in KWin::ShellClient::destroyClient() /home/jenkins/workspace/Plasma/kwin/kf5-qt5 SUSEQt5.12/shell_client.cpp:435
#4 0x7fbc0fe7a726 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (KWin::ShellClient::*)()>::call(void (KWin::ShellClient::*)(), KWin::ShellClient*, void**) /usr/include/qt5/QtCore/qobjectdefs_impl.h:152
#5 0x7fbc0fe784c3 in void QtPrivate::FunctionPointer<void (KWin::ShellClient::*)()>::call<QtPrivate::List<>, void>(void (KWin::ShellClient::*)(), KWin::ShellClient*, void**) /usr/include/qt5/QtCore/qobjectdefs_impl.h:185
#6 0x7fbc0fe74de9 in QtPrivate::QSlotObject<void (KWin::ShellClient::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (/home/jenkins/install-prefix/lib64/libkwin.so.5+0x1677de9)
#7 0x7fbc04f27357 in QMetaObject::activate(QObject*, int, int, void**) (/usr/lib64/libQt5Core.so.5+0x2b3357)
#8 0x7fbc074e1970 in KWayland::Server::Resource::unbound() /home/jenkins/workspace/Administration/Dependency Build Plasma kf5-qt5 SUSEQt5.12/kwayland/build/src/server/KF5WaylandServer_autogen/EWIEGA46WW/moc_resource.cpp:142
#9 0x7fbc0766b4b4 in KWayland::Server::Resource::Private::unbind(wl_resource*) /home/jenkins/workspace/Administration/Dependency Build Plasma kf5-qt5 SUSEQt5.12/kwayland/src/server/resource.cpp:68
#10 0x7fbc00bdc2ae (/usr/lib64/libwayland-server.so.0+0x92ae)
#11 0x7fbc00bdc32f in wl_resource_destroy (/usr/lib64/libwayland-server.so.0+0x932f)
#12 0x7fbc0766b53f in KWayland::Server::Resource::Private::resourceDestroyedCallback(wl_client*, wl_resource*) /home/jenkins/workspace/Administration/Dependency Build Plasma kf5-qt5 SUSEQt5.12/kwayland/src/server/resource.cpp:76
#13 0x7fbbff481d8c (/usr/lib64/libffi.so.7+0x6d8c)
#14 0x7fbbff481179 (/usr/lib64/libffi.so.7+0x6179)
#15 0x7fbc00bdfa5f (/usr/lib64/libwayland-server.so.0+0xca5f)
#16 0x7fbc00bdc6d1 (/usr/lib64/libwayland-server.so.0+0x96d1)
#17 0x7fbc00bddc71 in wl_event_loop_dispatch (/usr/lib64/libwayland-server.so.0+0xac71)
#18 0x7fbc07541e50 in KWayland::Server::Display::Private::dispatch() /home/jenkins/workspace/Administration/Dependency Build Plasma kf5-qt5 SUSEQt5.12/kwayland/src/server/display.cpp:148
#19 0x7fbc075432de in KWayland::Server::Display::dispatchEvents(int) /home/jenkins/workspace/Administration/Dependency Build Plasma kf5-qt5 SUSEQt5.12/kwayland/src/server/display.cpp:220
#20 0x7fbc0fe864ca in KWin::WaylandServer::dispatch() /home/jenkins/workspace/Plasma/kwin/kf5-qt5 SUSEQt5.12/wayland_server.cpp:616
#21 0x451ce0 in KWin::WaylandTestApplication::~WaylandTestApplication() /home/jenkins/workspace/Plasma/kwin/kf5-qt5 SUSEQt5.12/autotests/integration/kwin_wayland_test.cpp:91
#22 0x42faa1 in main /home/jenkins/workspace/Plasma/kwin/kf5-qt5 SUSEQt5.12/autotests/integration/globalshortcuts_test.cpp:381
#23 0x7fbc04796bca in __libc_start_main (/lib64/libc.so.6+0x26bca)
#24 0x413ea9 in _start (/home/jenkins/workspace/Plasma/kwin/kf5-qt5 SUSEQt5.12/build/bin/testGlobalShortcuts+0x413ea9)
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D22821
Summary:
For some interfaces, we'll look at the X-KDE-Wayland-Interfaces property in the desktop file to see which interfaces are requested.
Requires D22570.
Reviewers: #plasma, #kwin, davidedmundson
Reviewed By: #plasma, #kwin, davidedmundson
Subscribers: fvogt, zzag, broulik, graesslin, davidedmundson, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D22571
Summary:
So far we were following a bit unique and rare doxygen comment style:
/**
* Contents of the comment.
**/
Doxygen comments with this style look balanced and neat, but many people
that contribute to KWin don't follow this style. Instead, they prefer
more traditional doxygen comment style, i.e.
/**
* Contents of the comment.
*/
Reviewing such changes has been a bit frustrating for me (so selfish!)
and for other contributors.
This change switches doxygen comment style in KWin to a more traditional
style. The main reason for doing this is to make code review process easier
for new contributors as well us.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D22812
Summary: Update tabbox similar to how it's done in KWin/X11.
Reviewers: #kwin
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D21005
Summary:
Currently only SVG-based decoration themes react to border size changes.
QML-based decoration themes on the other hand, for example Plastik, don't
react to such changes, only new windows will have decorations with the
new border size.
BUG: 408035
Reviewers: #kwin
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D22665
Summary:
There is still one small issue that has to be addressed in the future:
xdg-toplevel doesn't have states like MAXIMIZED_VERT or MAXIMIZED_HORZ,
thus Window Rules KCM should display only single maximize rule(not two)
for wayland clients.
Test Plan: The new tests pass.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D19414
Summary:
The first argument in AbstractClient::changeMaximize specifies whether
the maximized state of the client needs to be toggled in horizontal
direction.
Reviewers: #kwin, romangg
Reviewed By: #kwin, romangg
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D22486
Summary:
kwin(28512) QPainter::begin|QPainter::QPainter|KWin::Decoration::Renderer::renderToImage QPainter::begin: Paint device returned engine == 0, type: 3
kwin(28512) QPainter::setRenderHints|QPainter::setRenderHint|KWin::Decoration::Renderer::renderToImage QPainter::setRenderHint: Painter must be active to set rendering hints
kwin(28512) QPainter::setWindow|KWin::Decoration::Renderer::renderToImage|?KWinX11Platform.so? QPainter::setWindow: Painter not active
kwin(28512) QPainter::setClipRect|KWin::Decoration::Renderer::renderToImage|?KWinX11Platform.so? QPainter::setClipRect: Painter not active
Test Plan: seems to happen on startup, at least (when restarting kwin)
Reviewers: graesslin, zzag
Reviewed By: zzag
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D9014