Commit graph

17318 commits

Author SHA1 Message Date
Vlad Zahorodnii
4c7dd52728 Delete pointless GRAB_SERVER_DURING_CONTEXT macro
Summary: One could just use XServerGrabber class directly.

Test Plan: Compiles.

Reviewers: #kwin, romangg

Reviewed By: #kwin, romangg

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D24119
2019-09-20 22:44:12 +03:00
Vlad Zahorodnii
5e71c2a608 Move supported window type masks to matching cpp files
Summary:
SUPPORTED_MANAGED_WINDOW_TYPES_MASK and SUPPORTED_UNMANAGED_WINDOW_TYPES_MASK
are used only in client.cpp and unmanaged.cpp, respectively. So, it doesn't
make sense to keep these two in a header file.

Test Plan: Compiles.

Reviewers: #kwin, romangg

Reviewed By: #kwin, romangg

Subscribers: romangg, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D24120
2019-09-20 22:44:12 +03:00
l10n daemon script
86f90aa7cf 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-09-20 05:30:04 +02:00
Vlad Zahorodnii
b8a6fd7c46 Don't initialize QFlags<T> with nullptr
Summary: This looks very odd.

Test Plan: Compiles.

Reviewers: #kwin, romangg

Reviewed By: #kwin, romangg

Subscribers: apol, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D24086
2019-09-19 21:42:34 +03:00
Nate Graham
2dae153558 Improve comprehensibility and consistency of window placement mode names
Summary:
Right now a few of the window placement modes suffer one or more of the following problems:
- Inconsistency between the text shown in the Window Behavior and Window Rules KCMs
- Title does not indicate what it does
- Awkward wording
- Lack of unity in grammatical mood between the different modes

This patch fixes these issues by improving the strings and standardizing on the descriptive mood:
- Smart -> Minimal Overlapping
- Maximizing -> Maximized
- Cascade -> Cascaded
- Zero-Cornered -> In Top-Left Corner

Strings are also unified between the window behavior and window rules KCMs, and docbooks are adjusted accordingly.

Test Plan:
{F7279685, size=full}
{F7279694, size=full}

Reviewers: #kwin, #vdg, ndavis, filipf, zzag, romangg

Reviewed By: #kwin, #vdg, ndavis, filipf, romangg

Subscribers: gladhorn, alexeymin, IlyaBizyaev, broulik, hein, hpereiradacosta, GB_2, alexde, davidedmundson, romangg, cfeck, filipf, zzag, ndavis, kwin, kde-doc-english

Tags: #kwin, #documentation

Differential Revision: https://phabricator.kde.org/D23415
2019-09-19 10:34:39 -06:00
Vlad Zahorodnii
d18fa5217b Merge branch 'Plasma/5.17' 2019-09-19 17:48:35 +03:00
Vlad Zahorodnii
62a7db7028 Use nullptr everywhere
Summary:
Because KWin is a very old project, we use three kinds of null pointer
literals: 0, NULL, and nullptr. Since C++11, it's recommended to use
nullptr keyword.

This change converts all usages of 0 and NULL literal to nullptr. Even
though it breaks git history, we need to do it in order to have consistent
code as well to ease code reviews (it's very tempting for some people to
add unrelated changes to their patches, e.g. converting NULL to nullptr).

Test Plan: Compiles.

Reviewers: #kwin, davidedmundson, romangg

Reviewed By: #kwin, davidedmundson, romangg

Subscribers: romangg, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D23618
2019-09-19 17:48:21 +03:00
Jonathan Riddell
fdf98d6c19 Update version number for 5.17.80
GIT_SILENT
2019-09-19 15:29:30 +01:00
Bhushan Shah
6b610927f4 [platforms/drm] introduce env var to select GPU
Summary:
In some environemnts it is possible that udev detection of primary GPU
fails and it picks the first available card (normally card0). But it is
not desired, and it would be required to use different card (card1).

Introduce environment variable, which when used, will make it possible
to use different card node then one selected by udev.

You can use it like KWIN_DRM_DEVICE_NODE=/dev/dri/card1 kwin_wayland

Test Plan: Tested on the device where card0 was not usable for kms, but card1

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D24051
2019-09-19 15:01:15 +05:30
Jonathan Riddell
48691c406e Update version number for 5.16.90
GIT_SILENT
2019-09-19 10:04:51 +01:00
l10n daemon script
2806d5f625 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-09-19 05:25:09 +02:00
Anton Smerkov
fec0ab818d Emphasize minimization in MinimizeAll script
Summary:
MinimizeAll should work as follows:

> As long as there's something to minimize, do that.
> Otherwise unminimize only the windows we minimized
> on last invocation.

Quote above is from Comment 11 by Thomas Lübking of BUG: 356161.

But current code does not fulfill these duties. Try next case: run minimizeall on some windows, then click on one of windows, then run minimizeall again. All windows would be unminimized!

I have tried to make small changes to original code of main.js, but i can't because i don't understand it.

Thats why i wrote my own version. Then i changed my version to version of zzag, because his code is more simple. I have tested both versions.

BUG: 356161

Reviewers: colomar, #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: romangg, zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D24044
2019-09-18 18:11:28 +03:00
Vlad Zahorodnii
2ad37c449f Port away from deprecated QString::sprintf
Test Plan: Compiles.

Reviewers: #kwin, apol

Reviewed By: apol

Subscribers: apol, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D24045
2019-09-18 16:20:06 +03:00
Vlad Zahorodnii
5ad3c0ee13 Port away from deprecated qVariantFromValue
Summary:
qVariantFromValue is deprecated since Qt 5.14. It's advised to use
QVariant::fromValue instead.

Test Plan: Compiles.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D24042
2019-09-18 16:20:06 +03:00
Vlad Zahorodnii
09b47b5250 Undo some recent cmake changes
Unfortunately linking can be very fragile so let's not break things.
2019-09-18 13:50:52 +03:00
Christophe Giboudeaux
265e6367f7 Fix a link error when building kwin. 2019-09-18 11:45:23 +02:00
l10n daemon script
44aeeedd60 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-09-18 05:37:05 +02:00
Vlad Zahorodnii
dcf91d4321 Cleanup style in CMakeLists.txt files
We have lots of inconsistency at the moment in CMakeLists.txt files. Most
of it is due to kwin being a very old project. This change hopefully fixes
all of it.
2019-09-17 16:03:05 +03:00
Vlad Zahorodnii
c8aa258eba Keep things sorted alphabetically in CMakeLists.txt
Summary:
Currently component names and filenames are partially sorted. This makes adding
new items and finding existing items more difficult.

Test Plan: Compiles.

Reviewers: #kwin, gladhorn

Reviewed By: #kwin, gladhorn

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D24018
2019-09-17 11:43:26 +03:00
l10n daemon script
fd702c3644 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-09-17 05:29:51 +02:00
Vlad Zahorodnii
9d83a4d365 Delete unused forward declaration of Client class 2019-09-16 16:31:09 +03:00
Vlad Zahorodnii
b66dfc3156 Drop checkArea helper
Summary:
So far some placement policies were handling special case when area is
a null rectangle. However, there is no good reason to do that. We can
just pass a valid area rectangle and remove pointless checkArea helper.
Doing so will make the code simpler and more comprehensible.

Reviewers: #kwin, gladhorn

Reviewed By: #kwin, gladhorn

Subscribers: gladhorn, romangg, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D23923
2019-09-16 16:26:58 +03:00
Vlad Zahorodnii
9bbbf1c51f Pass correct area to placeCascaded in cascadeDesktop
Summary: We have to provide placement area for the screen on which the client is.

Reviewers: #kwin, romangg

Reviewed By: #kwin, romangg

Subscribers: romangg, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D23921
2019-09-16 16:26:58 +03:00
Vlad Zahorodnii
bccbb8f3a5 Pass area by const reference to placeFoo methods 2019-09-16 16:26:58 +03:00
Guo Yunhe
87a2100f6a Enable HiDPI rendering for rules dialog and killer dialog.
Summary: Enable AA_UseHighDpiPixmaps application attribute

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D23987
2019-09-16 15:06:35 +03:00
Roman Gilg
5e1348c4b8 [plugins/scenes/opengl] Use linear filter on Wayland
Summary:
With nearest filter fractional scaling is blurry, always use linear filter
instead on Wayland.

Test Plan: Run Plasma session with patch and scale factor 1.9.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Maniphest Tasks: T10481

Differential Revision: https://phabricator.kde.org/D23986
2019-09-16 13:02:40 +02:00
l10n daemon script
da8d16deca 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-09-16 05:20:24 +02:00
Björn Feber
fba443c49d Make Desktop Effects KCM desktop file consistent
Summary: {F7358009}

Test Plan: Hover over the {nav Desktop Effects} KCM in the system settings sidebar.

Reviewers: #kwin, #plasma, #vdg, zzag

Reviewed By: #kwin, #plasma, zzag

Subscribers: #vdg, #plasma, kwin, #kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D23978
2019-09-16 00:04:15 +02:00
Carl Schwan
0757a60858
Fix compile failure window variable doesn't exist
Summary:
Error was:
```
/home/carl/kdesrc/kde/workspace/kwin/plugins/platforms/x11/windowed/x11windowed_output.cpp: In member function ‘void KWin::X11WindowedOutput::initXInputForWindow()’:
/home/carl/kdesrc/kde/workspace/kwin/plugins/platforms/x11/windowed/x11windowed_output.cpp:134:14: error: invalid use of non-static member function ‘xcb_window_t KWin::X11WindowedOutput::window() const’
  134 |     Q_UNUSED(window)
      |              ^~~~~~
In file included from /home/carl/kdesrc/kde/workspace/kwin/plugins/platforms/x11/windowed/x11windowed_output.cpp:20:
/home/carl/kdesrc/kde/workspace/kwin/plugins/platforms/x11/windowed/x11windowed_output.h:50:18: note: declared here
   50 |     xcb_window_t window() const {
      |
```

Reviewers: #kwin, romangg

Reviewed By: #kwin, romangg

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D23957
2019-09-15 13:00:26 +02:00
Vlad Zahorodnii
726e6c1567 Don't initialize QFlags<T> with 0 value
Summary:
clang-tidy has a check that converts all usages of null pointer literals
to nullptr keyword. However, there's a small issue related to QFlags<T>.

Apparently, QFlags<T> has a constructor that takes a pointer and if you
pass 0 to it, clang-tidy will replace 0 with nullptr, e.g.

    NET::States(0) -> NET::States(nullptr)

Even though passing nullptr is totally correct, it looks very weird.

Test Plan: Complies.

Reviewers: #kwin, gladhorn

Reviewed By: #kwin, gladhorn

Subscribers: gladhorn, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D23948
2019-09-15 00:17:53 +03:00
Vlad Zahorodnii
02209aa8a4 [platforms/x11] Get rid of some code duplication in windowed backend
Summary:
We repeat quite a lot of code that finds an output by xcb_window_t and
translates global X11 screen coordinates to output coordinates.

Test Plan: Compiles.

Reviewers: #kwin, gladhorn

Reviewed By: #kwin, gladhorn

Subscribers: gladhorn, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D23947
2019-09-15 00:16:33 +03:00
Frederik Gladhorn
b64e67ce7c Remove disabled TabGroup feature
Summary:
This has been commented out since 2014, I doubt it will come back.
This is a big amount of code, maintenance will be easier without it.

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: romangg, graesslin, kwin

Tags: #kwin, #documentation

Differential Revision: https://phabricator.kde.org/D23069
2019-09-14 10:58:48 +02:00
Frederik Gladhorn
a98b8207eb Fix invalid tabstop
Summary:
Revision 9a59e3fb6c removed the ghns
button, but did not remove the corresponding entry in the tab focus
chain.

Reviewers: #kwin, ngraham, zzag

Reviewed By: #kwin, zzag

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D23936
2019-09-14 10:55:26 +02:00
Frederik Gladhorn
c870a29f91 Remove stray semicolon 2019-09-14 10:14:35 +02:00
l10n daemon script
8461ec49bf 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-09-14 05:25:12 +02:00
Vlad Zahorodnii
ab3d7d5277 [colorcorrection] Fix division by zero
Summary:
m_currentTemp can be equal to targetTemp when resetSlowUpdateTimer is
called. resetSlowUpdateTimer doesn't handle that case, which results
in an FP exception being raised:

    ==20103==ERROR: AddressSanitizer: FPE on unknown address 0x7f40857d5ca6 (pc 0x7f40857d5ca6 bp 0x7ffccd95c330 sp 0x7ffccd95c220 T0)
        #0 0x7f40857d5ca5 in KWin::ColorCorrect::Manager::resetSlowUpdateTimer() /home/jenkins/workspace/Plasma/kwin/kf5-qt5 SUSEQt5.12/colorcorrection/manager.cpp:417
        #1 0x7f40857d521d in KWin::ColorCorrect::Manager::resetSlowUpdateStartTimer() /home/jenkins/workspace/Plasma/kwin/kf5-qt5 SUSEQt5.12/colorcorrection/manager.cpp:388
        #2 0x7f40857d42d5 in KWin::ColorCorrect::Manager::resetQuickAdjustTimer() /home/jenkins/workspace/Plasma/kwin/kf5-qt5 SUSEQt5.12/colorcorrection/manager.cpp:324
        #3 0x7f40857d3ac1 in KWin::ColorCorrect::Manager::resetAllTimers() /home/jenkins/workspace/Plasma/kwin/kf5-qt5 SUSEQt5.12/colorcorrection/manager.cpp:286
        #4 0x7f40857d0311 in KWin::ColorCorrect::Manager::hardReset() /home/jenkins/workspace/Plasma/kwin/kf5-qt5 SUSEQt5.12/colorcorrection/manager.cpp:152
        #5 0x7f40857d038d in KWin::ColorCorrect::Manager::reparseConfigAndReset() /home/jenkins/workspace/Plasma/kwin/kf5-qt5 SUSEQt5.12/colorcorrection/manager.cpp:159
        #6 0x420e75 in ColorCorrectNightColorTest::testConfigRead() /home/jenkins/workspace/Plasma/kwin/kf5-qt5 SUSEQt5.12/autotests/integration/colorcorrect_nightcolor_test.cpp:126
        #7 0x4326b4 in ColorCorrectNightColorTest::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) /home/jenkins/workspace/Plasma/kwin/kf5-qt5 SUSEQt5.12/build/autotests/integration/testColorCorrectNightColor_waylandonly_autogen/include/colorcorrect_nightcolor_test.moc:98
        #8 0x7f407a80a94a in QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const (/usr/lib64/libQt5Core.so.5+0x29694a)
        #9 0x7f40840a8962  (/usr/lib64/libQt5Test.so.5+0x19962)
        #10 0x7f40840a9352  (/usr/lib64/libQt5Test.so.5+0x1a352)
        #11 0x7f40840a9910  (/usr/lib64/libQt5Test.so.5+0x1a910)
        #12 0x7f40840a9cda in QTest::qRun() (/usr/lib64/libQt5Test.so.5+0x1acda)
        #13 0x7f40840a9edb in QTest::qExec(QObject*, int, char**) (/usr/lib64/libQt5Test.so.5+0x1aedb)
        #14 0x432428 in main /home/jenkins/workspace/Plasma/kwin/kf5-qt5 SUSEQt5.12/autotests/integration/colorcorrect_nightcolor_test.cpp:338
        #15 0x7f407a095bca in __libc_start_main (/lib64/libc.so.6+0x26bca)
        #16 0x413ea9 in _start (/home/jenkins/workspace/Plasma/kwin/kf5-qt5 SUSEQt5.12/build/bin/testColorCorrectNightColor_waylandonly+0x413ea9)

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D23914
2019-09-13 10:48:21 +03:00
l10n daemon script
4b83556a4d 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-09-13 05:18:48 +02:00
Vlad Zahorodnii
2adbcf7b1d [effects/windowgeometry] Fix -Wdeprecated-declarations 2019-09-12 22:19:34 +03:00
Nate Graham
356b5c3e2d [kcmkwin/kwineffects] Fix mistake in ListSectionHeader porting 2019-09-12 12:35:52 -06:00
Björn Feber
f40638f46b [kcmkwin/kwineffects] Use new Kirigami ListSectionHeader component
Summary: {F7344129}

Test Plan: Open the {nav Desktop Effects} KCM.

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

Reviewed By: #kwin, #plasma, #vdg, davidedmundson, ngraham

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

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D23913
2019-09-12 20:29:33 +02:00
Vlad Zahorodnii
0962cc661c [autotests] Stabilize testMoveResize 2019-09-12 20:18:14 +03:00
Vlad Zahorodnii
2b73484976 [autotests] Fix filename of placement test 2019-09-12 19:45:53 +03:00
Vlad Zahorodnii
d74a7c8f7a [autotests] Test more placement policies 2019-09-12 19:43:18 +03:00
l10n daemon script
4d06e666b3 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-09-12 05:23:39 +02:00
Vlad Zagorodniy
659754e859 Merge branch 'Plasma/5.12' 2019-09-11 20:46:45 +03:00
Vlad Zagorodniy
444b88aef4 Fix compilation error with Qt 5.9
QImage::sizeInBytes() was introduced in Qt 5.10.
2019-09-11 20:46:04 +03:00
Laurent Montel
9587a6777b We depend against 5.62 2019-09-11 07:55:47 +02:00
l10n daemon script
c8f9a36644 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-09-11 05:36:20 +02:00
Frederik Gladhorn
26b4b6580c Remove unused variable
Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D23829
2019-09-10 14:27:44 +02:00
Vlad Zagorodniy
9ea29e3891 [autotests] Stabilize pointer input test 2019-09-10 15:09:03 +03:00