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
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
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
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
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
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
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
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
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
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>
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
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
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
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
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
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
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.
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
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
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