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:
on X11, setFullScreen is always called after Placement::place()
so they always have the correct geometry.
on wayland, the window if is shown directly as fullscren,
is set fullscreen in init() then place() is evecuted, potentially
moving it to a wrong position and potentially even size (which happens
with maximiziong placement strategy)
so instead of place() the client needs to be explicitly set at
fullscreen geometry
Test Plan:
fullscreen windows always appear with the proper geometry
autotests still pass
Reviewers: #kwin, #plasma, davidedmundson
Reviewed By: #kwin, #plasma, davidedmundson
Subscribers: zzag, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D24542
Summary: Only report about them when they're requested for the first time.
Test Plan: Been using it for a few days
Reviewers: #kwin, zzag
Reviewed By: #kwin, zzag
Subscribers: zzag, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D24535
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
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
Summary:
Everything is already multiplied in the buffer, we want to copy the
source directly.
Test Plan:
Looked at something with EffectQuickView and alpha
It now matched what it should be
Reviewers: #kwin, zzag
Reviewed By: #kwin, zzag
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D24368
Summary:
In order to properly implement xdg_surface.set_window_geometry we need
two kinds of geometry - frame and buffer. The frame geometry specifies
visible bounds of the client on the screen, excluding client-side drop
shadows. The buffer geometry specifies rectangle on the screen that the
attached buffer or x11 pixmap occupies on the screen.
This change renames the geometry property to frameGeometry in order to
reflect the new meaning assigned to it as well to make it easier to
differentiate between frame geometry and buffer geometry in the future.
Reviewers: #kwin
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D24334
Summary:
Configure xdg-toplevel only through setGeometry method, so it's easier
to reason about how geometry is handled in XdgShellClient.
Reviewers: #kwin
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D24329
Summary:
Move unrelated code out of XdgShellClient::addDamage() into a separate
method.
Reviewers: #kwin
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D24328
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:
There's no point for calling discardShape from the destructor of a
Scene::Window subclass because window quads cache will be destroyed
automagically by QScopedPointer.
Reviewers: #kwin
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D24317
Summary: getShadow is not a getter method as it doesn't return a shadow.
Test Plan: Compiles.
Reviewers: #kwin, romangg
Reviewed By: #kwin, romangg
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D24298
Summary:
EffectQuickView/Scene is a convenient class to render a QtQuick
scenegraph into an effect.
Current methods (such as present windows) involve creating an underlying
platform window which is expensive, causes a headache to filter out
again in the rest of the code, and only works as an overlay.
The new class exposes things more natively to an effect where we don't
mess with real windows, we can perform the painting anywhere in the view
and we don't have issues with hiding/closing.
QtQuick has both software and hardware accelerated modes, and kwin also
has 3 render backends. Every combination is supported.
* When used in OpenGL mode for both, we render into an FBO export the
texture ID then it's up to the effect to render that into a scene.
* When using software QtQuick rendering we blit into an image, upload
that into a KWinGLTexture which serves as an abstraction layer and
render that into the scene.
* When using GL for QtQuick and XRender/QPainter in kwin everything is
rendered into the internal FBO, blit and exported as an image.
* When using software rendering for both an image gets passed directly.
Mouse and keyboard events can be forwarded, only if the effect
intercepts them.
The class is meant to be generic enough that we can remove all the
QtQuick code from Aurorae.
The intention is also to replace EffectFrameImpl using this backend and
we can kill all of the EffectFrame code throughout the scenes.
The close button in present windows will also be ported to this,
simplifiying that code base.
Classes that handle the rendering and handling QML are intentionally
split so that in the future we can have a declarative effects API create
overlays from within the same context. Similar to how one can
instantiate windows from a typical QML scene.
Notes:
I don't like how I pass the kwin GL context from the backends into the
effect, but I need something that works with the library separation. It
also currently has wayland problem if I create a QOpenGLContext before
the QPA is set up with a scene - but I don't have anything better?
I know for the EffectFrame we need an API to push things through the
effects stack to handle blur/invert etc. Will deal with that when we
port the EffectFrame.
Test Plan: Used in an effect
Reviewers: #kwin, zzag
Reviewed By: #kwin, zzag
Subscribers: zzag, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D24215