Commit graph

17344 commits

Author SHA1 Message Date
Vlad Zahorodnii
8e176c8b0d Don't use MESA_EGL_NO_X11_HEADERS
Summary:
With recent Mesa updates (19.2.1), MESA_EGL_NO_X11_HEADERS doesn't have
any effect. So, let's include fixx11h.h instead.

Test Plan: I am able to build kwin once again.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D24840
2019-10-24 18:57:30 +03:00
Kai Uwe Broulik
2ce1d99221 [kcmkwin/kwindecoration] Elide "theme default border size" CheckBox
Otherwise the layout explodes.
Unfortunately it seems Layouts don't shrink the items within even if there's not enough room at all, so I need this fillWidth + maximumWidth workaround.

Differential Revision: https://phabricator.kde.org/D24885
2019-10-23 13:48:21 +02:00
l10n daemon script
71c3f063bb 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-10-23 09:01:14 +02:00
Jonathan Riddell
7c58a1dc94 Update version number for 5.17.1
GIT_SILENT
2019-10-22 15:39:47 +01:00
Roman Gilg
0d67a0b48a Fix non-atomic output init
Summary:
The initial blank needs to happen after the output device has been
initialized to get the current mode size.

Also we can't assert in legacy mode on the page flip pending since
a page flip can also be the result of a CRTC blank using a different.

BUG: 412684
FIXED-IN: 5.17.1

Test Plan: Full Plasma session

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D24829
2019-10-22 11:28:08 +02:00
Vlad Zahorodnii
982fefd389 [aurorae] Fix visibility of Context Help button
Summary:
providesContextHelp is a property of DecoratedClient, not Decoration.

BUG: 413145
FIXED-IN: 5.17.1

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D24851
2019-10-22 11:21:52 +03:00
l10n daemon script
6789573d88 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-10-20 08:55:01 +02:00
l10n daemon script
05d5656712 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-10-19 09:16:12 +02:00
Kai Uwe Broulik
2497f901d7 [effects/startupfeedback] Scale application icon size with cursor size
KWin doesn't use Qt scaling and as such the icon remains tiny.
Instead, make it follow the cursor size as the user is likely to have larger cursors on high dpi.

Differential Revision: https://phabricator.kde.org/D24714
2019-10-17 19:04:14 +02:00
Fabian Vogt
4982dfd5f5 glx: Don't use sRGB configs on llvmpipe with depth 16
Summary:
This is necessary to keep openQA working, which uses LLVMpipe as a
renderer on a Cirrus device that operates in depth 16.

LLVMpipe advertises 24/32 bit sRGB configurations on this setup, but
they cannot be presented.

CCBUG: 408594

Test Plan: Compile tested only.

Reviewers: fvogt, #kwin, zzag

Reviewed By: fvogt, #kwin, zzag

Subscribers: romangg, sbergeron, fvogt, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D22203
2019-10-15 16:07:01 +02:00
David Edmundson
446e23af5a [aurorae] Fix crash on KCM teardown with Qt5.14
Summary:
Context behaviour subtly changed in Qt5.14 which has exposed some
questionable things in this KCM.

Auorae::Decoration is a context property of the loaded QML.

QObject::~QObject signals it's own deletion before deleting children.
This means the bindings of loaded QML update in particular

aurorae.qml
   DecorationOptions {
        id: options
        deco: decoration
    }

DecorationOptions has a pointer to the previously set decoration which
is now dangling, and we crash.

Rather than adding more guards and smart pointers in DecorationOptions,
this patch deletes the QQmlContext before deleting the context
properties that we expose.

It also moves unreferring the shared qmlcontext we inherit from till
after we've deleted the child context, because it didn't make sense.

Test Plan:
Opened KCM
Closed the KCM
didn't crash

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D24594
2019-10-15 12:40:55 +01:00
David Edmundson
82f4e03d7a Merge branch 'Plasma/5.12' into Plasma/5.17 2019-10-15 12:40:42 +01:00
David Edmundson
5d4be83de0 [tabbox] Correctly set global short on kwin tabbox
Summary:
We need to set both the current autoload shortcut and the default
shortcut. setGlobalShortcut is a convenience method for both.

Otherwise clicking defaults in the keys KCM will discard the shortcut
forever.

BUG: 407000

Test Plan:
wiped kglobalshortcutsrc to get a clean slate
restarted kwin
alt+tab
hit defauts in the kwin KCM
could still alt+tab

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D24647
2019-10-15 12:39:57 +01:00
l10n daemon script
b967dec72d 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-10-15 09:08:47 +02:00
Roman Gilg
1bd2f8ba63 [platforms/drm] Disable transformations
Summary:
Rotation in the past was not working in the DRM backend reliable. Now on 5.17
it even freezes the KWin session, so for now we need to just disable it trying.

Test Plan:
Tried to change Rotation with KScreen. Nothing happened but session was still
usable afterwards.

Reviewers: #kwin

Subscribers: ngraham, jriddell, bshah, zzag, apol, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D24112
2019-10-13 15:52:31 -04:00
Jonathan Riddell
549517293f Update version number for 5.17.0
GIT_SILENT
2019-10-10 12:57:14 +01:00
l10n daemon script
9f8deb0448 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-10-10 09:07:20 +02:00
Marco Martin
8d847bd0ff don't allow to resize or move fullscreen windows
Summary:
add the same check of the Client class: if a window
is fullscreen, is not movable nor resizable

Test Plan:
Doesn't have any visible regression over normal usage,
this partially tackles a bug that can be seen in plasma mobile:
if the placement is "maximizing", then asking windows to be
shown as fullscreen has no effect and they will always be shown as a normal
maximized window.

this now doesn't happen anymore.. most of the times,
 as there must be some race condition
as a concause of the problem

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D24515
2019-10-09 14:31:35 +02:00
l10n daemon script
b1b675e50a 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-10-08 08:56:12 +02:00
l10n daemon script
10ade3e9c7 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-10-07 08:37:26 +02:00
Alexey Min
6ee6cc0293 [platforms/hwcomposer] Fix build failure after D23495
In file included from /build/src/kwin-5.16.90/plugins/platforms/hwcomposer/hwcomposer_backend.cpp:21:
    /build/src/kwin-5.16.90/plugins/platforms/hwcomposer/hwcomposer_backend.h:58:11: error:
    'QSize KWin::HwcomposerOutput::pixelSize() const' marked 'override', but does not override
       58 |     QSize pixelSize() const override;
          |           ^~~~~~~~~

Fixes dbb2cede08

Reviewed-by: Bhushan Shah <bshah@kde.org>
2019-10-01 14:31:16 +03:00
l10n daemon script
b7ea14d363 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-29 09:19:57 +02:00
l10n daemon script
c790c50292 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-29 08:51:18 +02:00
David Edmundson
3ba33e4b58 Use lambdas for queued invocation of composition suspending
Summary:
Qt's metaobject is rather sensitive with scope resolution.

Foo::Bar and Bar don't always match to a Qt metaobject, even if they
refer to the same thing to a compiler. Here we register
X11Compositor::SuspendReason but Q_ARG uses SuspendReason and they don't
match. This leads to a runtime failure where the method isn't invoked.

Rather than fixing metaobject usage, port the whole thing to lambdas
which does better compile time checking and is generally nicer to read.

BUG: 412353

Test Plan:
Ran xprop to block compositing. Compositing was blocked.
Grepped source code for Q_ARG use

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D24244
2019-09-26 16:09:16 +01:00
Vlad Zahorodnii
086428754e [nightcolor] Print a debug message upon receiving new location from kded module
Summary:
This can be useful for debugging whether Night Color manager actually
receives new location data from colorcorrectlocationupdater kded module.

CCBUG: 412211

Test Plan:
Run kwin with QT_LOGGING_RULES="kwin_colorcorrection.debug=true"

Run from the terminal the following two commands
    qdbus org.kde.kded5 /kded unloadModule colorcorrectlocationupdater
    qdbus org.kde.kded5 /kded loadModule colorcorrectlocationupdater

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D24236
2019-09-26 12:10:26 +03:00
Vlad Zahorodnii
03d782310b [nightcolor] Add missing const qualifiers
Summary: Mark some immutable variables with const to improve code readability.

Test Plan: Compiles.

Reviewers: #kwin, davidedmundson, romangg

Reviewed By: #kwin, davidedmundson, romangg

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D24235
2019-09-26 12:10:16 +03:00
Vlad Zahorodnii
c265c7f2c6 [nightcolor] Use local time in Automatic and Location mode
Summary:
Currently Night Color doesn't handle time zones very well. For example,
if the user's time zone is UTC-8, then computed timings of sunrise and
sunset (in UTC) will be a bit gibberish as sunset occurs before sunrise
rather than vice versa.

This change switches relevant parts of Night Color to local time in
order to fix expectations about the order of morning and evening in
updateSunTimings() method as well to simplify the code a bit (dealing
with UTC and local time can be painful sometimes).

CCBUG: 412211

Reviewers: #kwin, romangg

Reviewed By: #kwin, romangg

Subscribers: romangg, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D24153
2019-09-26 11:31:01 +03:00
l10n daemon script
8ba7bc4281 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-26 09:24:52 +02:00
l10n daemon script
3e7d9cd1ab 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-26 08:55:53 +02:00
l10n daemon script
c07f685ced 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-24 09:01:00 +02:00
l10n daemon script
d411a798d9 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-23 08:54:34 +02:00
l10n daemon script
1306992802 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-22 09:10:11 +02:00
l10n daemon script
16bb1ec9b0 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 09:14:26 +02: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
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