Commit graph

17175 commits

Author SHA1 Message Date
Vlad Zagorodniy
744e2be3f6 refactor: Minimize use of geom in Toplevel subclasses
Summary:
This change makes easier to refactor geometry handling in the future.
The main motivation for avoiding using geom directly is to make code
more readable and ensure that the geometry is updated only through
designated methods, e.g. setGeometry, plainResize, etc.

Reviewers: #kwin, romangg

Reviewed By: #kwin, romangg

Subscribers: romangg, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D23072
2019-08-10 20:01:16 +03:00
Frederik Gladhorn
00daa8a07e Remove usage of QWeakPointer for QObject for AbstractThumbnailItem::m_parent
Summary:
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.

Reviewers: #kwin, zzag, romangg

Reviewed By: #kwin, zzag, romangg

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D23071
2019-08-10 16:25:12 +02:00
Frederik Gladhorn
348232e682 Remove usage of QWeakPointer for QObject for thumbnails
Summary:
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.

The thumbnails are only referenced in one place, this change is straight-forward.

Reviewers: #kwin, romangg

Reviewed By: #kwin, romangg

Subscribers: romangg, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D23070
2019-08-10 16:24:37 +02:00
Frederik Gladhorn
ef670c3648 Fix ifdefs resulting in dead code
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
2019-08-10 12:27:23 +02:00
Frederik Gladhorn
9002f9b99e Remove usage of QWeakPointer for QObject
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.
2019-08-10 11:18:16 +02:00
l10n daemon script
8f5b781a33 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"
2019-08-10 05:09:50 +02:00
Frederik Gladhorn
5a2ae27474 Remove stray semicolon 2019-08-10 00:24:14 +02:00
Frederik Gladhorn
67b7904d5c Fix typo mkae -> make 2019-08-10 00:23:24 +02:00
Bhushan Shah
d7cfd0012a Revert "Load the keyboard on-demand"
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>
2019-08-09 11:40:22 +05:30
l10n daemon script
18d8555135 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"
2019-08-09 05:37:51 +02:00
Roman Gilg
8e78ccac46 Remove X11Compositor requires compositing check
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
2019-08-08 16:53:23 +02:00
Roman Gilg
91faa589c7 Replace foreach loops and improve code style in composite
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
2019-08-08 14:43:53 +02:00
l10n daemon script
9275deba36 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"
2019-08-08 05:05:39 +02:00
Roman Gilg
1db84a2ba7 Split Compositor class in Wayland and X11 child classes
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
2019-08-07 21:06:53 +02:00
Vlad Zagorodniy
4e078b9eaf Revert "wayland: Terminate client connections before Workspace is destroyed"
Commit 826b9742e9 breaks a lot of other
things. Need further investigation before fixing heap-use-after-free.
2019-08-07 11:21:30 +03:00
l10n daemon script
f1bbe935d3 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"
2019-08-07 05:12:10 +02:00
Roman Gilg
6613327a9c [wayland] Add support for zwp_linux_dmabuf
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
2019-08-06 21:55:45 +02:00
l10n daemon script
c5c2ce7535 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"
2019-08-06 04:59:39 +02:00
Björn Feber
ee05fd4dc7 [kcmkwin/kwindesktop] Improve the look of the Virtual Desktops KCM UI
Summary:
Apply the KDE HIG, make the list headers and desktop file consistent.
{F7164659}

Test Plan: Open the Virtual Desktops KCM.

Reviewers: #kwin, #plasma, #vdg, hein, ngraham

Reviewed By: #plasma, #vdg, hein, ngraham

Subscribers: broulik, ngraham, #vdg, #plasma, kwin, #kwin

Tags: #kwin

Maniphest Tasks: T10862

Differential Revision: https://phabricator.kde.org/D22933
2019-08-05 16:58:21 +02:00
l10n daemon script
143ac41e0b 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"
2019-08-05 04:54:41 +02:00
Björn Feber
6f42e49031 [kcmkwin/kwinscreenedges] Improve the look of the Screen Edges and Touch Screen KCM UI
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
2019-08-04 20:40:18 +02:00
Björn Feber
8a425a466c [kcmkwin/kwineffects] Improve the look of the Desktop Effects KCM list items
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
2019-08-04 15:55:54 +02:00
l10n daemon script
410d47cecb 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"
2019-08-04 05:20:12 +02:00
David Redondo
52eba31ea2 [kcmkwin/kwineffects] Rework the Effects KCM
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
2019-08-03 09:43:22 +02:00
Nate Graham
35f6f79dda [kcmkwin/kwindecoration] Slightly improve tab bar's integration with frame
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
2019-08-01 16:44:28 -06:00
Aleix Pol
5c39795b88 Load the keyboard on-demand
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
2019-08-01 17:21:00 +02:00
Vlad Zagorodniy
826b9742e9 wayland: Terminate client connections before Workspace is destroyed
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
2019-07-31 20:08:50 +03:00
Aleix Pol
f324776137 Allow blacklisting some wayland interfaces
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
2019-07-31 16:09:01 +02:00
l10n daemon script
bb32691980 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"
2019-07-31 05:23:00 +02:00
Vlad Zagorodniy
fda225aa1d autotests: Register Deleted in MoveResizeWindowTest 2019-07-30 22:08:28 +03:00
Vlad Zagorodniy
f395afb9a3 autotests: Rework MoveResizeWindowTest::testResize
ShellClient doesn't send a configure event when a move-resize operation
is finished. The reworked tests exposes the problem.
2019-07-30 22:05:50 +03:00
Kai Uwe Broulik
6e5f93af58 Merge branch 'Plasma/5.16' 2019-07-30 09:24:11 +02:00
Kai Uwe Broulik
93f210e857 [kcmkwin/kwindesktop] Make SpinBox editable
BUG: 410368
FIXED-IN: 5.16.4

Differential Revision: https://phabricator.kde.org/D22819
2019-07-30 09:23:45 +02:00
Vlad Zagorodniy
ffb2d92e9b autotests: Prevent zero page access
X11 clients might outlive Tabbox. Therefore we need to guard against
that case.
2019-07-29 23:45:21 +03:00
Vlad Zagorodniy
e110b126f7 autotests: Fix zero page access
Fix zero page access for real this time.
2019-07-29 23:28:12 +03:00
Vlad Zagorodniy
0a693ce7f1 autotests: Fix zero page access
Relevant output:

==18647==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000048 (pc 0x7fbe27fb2db7 bp 0x7ffdcb6d4030 sp 0x7ffdcb6d4020 T0)
==18647==The signal is caused by a READ memory access.
==18647==Hint: address points to the zero page.
    #0 0x7fbe27fb2db6 in KWin::TabBox::TabBox::isDisplayed() const /home/jenkins/workspace/Plasma/kwin/kf5-qt5 SUSEQt5.12/tabbox/tabbox.h:231
    #1 0x7fbe286dbb85 in KWin::ShellClient::destroyClient() /home/jenkins/workspace/Plasma/kwin/kf5-qt5 SUSEQt5.12/shell_client.cpp:421
    #2 0x7fbe2871f6a2 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
    #3 0x7fbe2871d43f 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
    #4 0x7fbe28719d65 in QtPrivate::QSlotObject<void (KWin::ShellClient::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (/home/jenkins/install-prefix/lib64/libkwin.so.5+0x1677d65)
    #5 0x7fbe1d7cc357 in QMetaObject::activate(QObject*, int, int, void**) (/usr/lib64/libQt5Core.so.5+0x2b3357)
    #6 0x7fbe1fd86970 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
    #7 0x7fbe1ff104b4 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
    #8 0x7fbe194812ae  (/usr/lib64/libwayland-server.so.0+0x92ae)
    #9 0x7fbe1948132f in wl_resource_destroy (/usr/lib64/libwayland-server.so.0+0x932f)
    #10 0x7fbe1ff1053f 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
    #11 0x7fbe17d26d8c  (/usr/lib64/libffi.so.7+0x6d8c)
    #12 0x7fbe17d26179  (/usr/lib64/libffi.so.7+0x6179)
    #13 0x7fbe19484a5f  (/usr/lib64/libwayland-server.so.0+0xca5f)
    #14 0x7fbe194816d1  (/usr/lib64/libwayland-server.so.0+0x96d1)
    #15 0x7fbe19482c71 in wl_event_loop_dispatch (/usr/lib64/libwayland-server.so.0+0xac71)
    #16 0x7fbe1fde6e50 in KWayland::Server::Display::Private::dispatch() /home/jenkins/workspace/Administration/Dependency Build Plasma kf5-qt5 SUSEQt5.12/kwayland/src/server/display.cpp:148
    #17 0x7fbe1fde82de in KWayland::Server::Display::dispatchEvents(int) /home/jenkins/workspace/Administration/Dependency Build Plasma kf5-qt5 SUSEQt5.12/kwayland/src/server/display.cpp:220
    #18 0x7fbe2872b446 in KWin::WaylandServer::dispatch() /home/jenkins/workspace/Plasma/kwin/kf5-qt5 SUSEQt5.12/wayland_server.cpp:616
    #19 0x457e08 in KWin::WaylandTestApplication::~WaylandTestApplication() /home/jenkins/workspace/Plasma/kwin/kf5-qt5 SUSEQt5.12/autotests/integration/kwin_wayland_test.cpp:91
    #20 0x43500b in main /home/jenkins/workspace/Plasma/kwin/kf5-qt5 SUSEQt5.12/autotests/integration/debug_console_test.cpp:530
    #21 0x7fbe1d03bbca in __libc_start_main (/lib64/libc.so.6+0x26bca)
    #22 0x414ed9 in _start (/home/jenkins/workspace/Plasma/kwin/kf5-qt5 SUSEQt5.12/build/bin/testDebugConsole+0x414ed9)
2019-07-29 23:08:52 +03:00
Vlad Zagorodniy
b6e67869e3 autotests: Port QSignalSpies to new connect syntax 2019-07-29 22:59:12 +03:00
Vlad Zagorodniy
50693f4fe8 Cleanup the order of things in workspace.h file 2019-07-29 22:24:43 +03:00
Vlad Zagorodniy
684b4b635e Use more traditional doxygen style
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
2019-07-29 22:06:19 +03:00
Vlad Zagorodniy
f57f583109 Drop unused includes 2019-07-29 21:32:20 +03:00
Vlad Zagorodniy
b3bd9e7e9b [wayland] Update tabbox when a client is added or closed
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
2019-07-29 21:24:21 +03:00
Vlad Zagorodniy
53936854c7 [aurorae] Make QML-based decoration themes react to border size changes
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
2019-07-29 21:23:01 +03:00
Vlad Zagorodniy
702a4ff688 [wayland] Implement maximize rules
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
2019-07-29 20:56:30 +03:00
Vlad Zagorodniy
bbe898243a [wayland] Implement size and position window rules
Test Plan: The new tests pass.

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D19413
2019-07-29 20:56:30 +03:00
l10n daemon script
4d41e877c3 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"
2019-07-23 05:20:30 +02:00
Vlad Zagorodniy
97dbbfbe2c Pass arguments to changeMaximize in correct order
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
2019-07-22 23:28:42 +03:00
David Faure
394d45d1d7 Merge branch 'Plasma/5.16' 2019-07-22 22:12:40 +02:00
David Faure
d72e2bfc55 Fix Qt warnings when rect is invalid, e.g. QRect(0,2111 3840x0)
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
2019-07-22 22:12:29 +02:00
Vlad Zagorodniy
8af2fa73dc Run clang-tidy with modernize-use-override check
Summary:
Currently code base of kwin can be viewed as two pieces. One is very
ancient, and the other one is more modern, which uses new C++ features.

The main problem with the ancient code is that it was written before
C++11 era. So, no override or final keywords, lambdas, etc.

Quite recently, KDE compiler settings were changed to show a warning if
a virtual method has missing override keyword. As you might have already
guessed, this fired back at us because of that ancient code. We had
about 500 new compiler warnings.

A "solution" was proposed to that problem - disable -Wno-suggest-override
and the other similar warning for clang. It's hard to call a solution
because those warnings are disabled not only for the old code, but also
for new. This is not what we want!

The main argument for not actually fixing the problem was that git
history will be screwed as well because of human factor. While good git
history is a very important thing, we should not go crazy about it and
block every change that somehow alters git history. git blame allows to
specify starting revision for a reason.

The other argument (human factor) can be easily solved by using tools
such as clang-tidy. clang-tidy is a clang-based linter for C++. It can
be used for various things, e.g. fixing coding style(e.g. add missing
braces to if statements, readability-braces-around-statements check),
or in our case add missing override keywords.

Test Plan: Compiles.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, apol, romangg, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D22371
2019-07-22 20:03:22 +03:00
Vlad Zagorodniy
eafe7aee65 [colorcorrection] Add "Constant" mode
Summary:
Currently, the Night Color manager supports three operation modes:

* Automatic: in this mode, screen color temperature is computed based on
the current position of the Sun. In order to calculate sunrise & sunset
times, the manager needs coordinates of the user, which are provided by
Plasma;

* Location: this mode is very similar to the Automatic, except one minor
detail: user needs to provide his/her/their location. This mode can be
very useful if coordinates provided by Plasma are incorrect;

* Timings: unfortunately we can't compute timings of the Sun for people
living near Earth poles. This mode allows the user to specify timings of
sunrise and sunset as well the transition time.

This change introduces another mode, called Constant. With this mode the
screen color temperature is constant throughout the day. The new mode
can be useful for people wishing constant screen color temperature or
just for people living near Earth's North or South poles.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: ngraham, davidedmundson, romangg, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D21948
2019-07-22 00:30:39 +03:00