Commit graph

17615 commits

Author SHA1 Message Date
Kai Uwe Broulik
6429019a0f Merge branch 'Plasma/5.17' 2019-10-17 19:04:40 +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
l10n daemon script
fe27d39b5c 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-17 05:41:38 +02:00
Fabian Vogt
f4c6de8ec4 Merge branch 'Plasma/5.17' 2019-10-15 16:08:36 +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
96701c6702 Merge branch 'Plasma/5.17' 2019-10-15 12:41:39 +01: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
l10n daemon script
26d3905f89 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 05:30:38 +02:00
Roman Gilg
4cd6f9428f Merge branch 'Plasma/5.17' 2019-10-13 15:54:26 -04: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
Marco Martin
10ace126be [wayland] Make sure fullscreen windows aren't repositioned
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
2019-10-11 10:46:43 +02:00
Aleix Pol
08d0c6a3bc Reduce interfaces verbosity
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
2019-10-10 17:31:03 +02:00
Jonathan Riddell
549517293f Update version number for 5.17.0
GIT_SILENT
2019-10-10 12:57:14 +01:00
Jonathan Riddell
9854b9bee5 Update version number for 5.17.80
GIT_SILENT
2019-10-10 12:45:18 +01:00
Jonathan Riddell
27d72437cf Update version number for 5.17.0
GIT_SILENT
2019-10-10 12:40:12 +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
l10n daemon script
382077f872 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 05:36:05 +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
Marco Martin
1a9a49ab7a 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:30:42 +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
3ce9df9f96 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 05:28:33 +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
David Edmundson
81c7330671 [scenes/opengl] Set correct blend mode for EffectQuickView buffers
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
2019-10-02 20:51:47 +01:00
David Edmundson
d2f37a73dd [plugins/scenes] match push/pop shaders in paintEffectQuickView 2019-10-02 20:33:34 +01:00
Vlad Zahorodnii
cd3a38ab5c Fix coding style 2019-10-02 12:57:59 +03:00
Vlad Zahorodnii
78be358746 Document some geometry properties
Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D24338
2019-10-02 11:46:40 +03:00
Vlad Zahorodnii
68cbbb62f0 Don't compute frame extents in packPositionFoo methods
Summary: Use frameMargins() method instead.

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D24336
2019-10-02 11:46:40 +03:00
Vlad Zahorodnii
1f301b2271 Fix coding style issues in window packing code
Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D24335
2019-10-02 11:46:40 +03:00
Vlad Zahorodnii
7d4471eba6 Rename geometry property to frameGeometry
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
2019-10-02 11:46:37 +03:00
Vlad Zahorodnii
45784b70e7 [wayland] Get rid of some code duplication in XdgShellClient constructors
Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D24332
2019-10-02 11:29:08 +03:00
Vlad Zahorodnii
3ff0f3781a [wayland] Fix some coding style issues in setGeometry method
Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D24331
2019-10-02 11:28:53 +03:00
Vlad Zahorodnii
07ded57273 [wayland] Add missing const qualifier in resizeWithChecks
Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D24330
2019-10-02 11:28:36 +03:00
Vlad Zahorodnii
7c3d014f21 [wayland] Use setGeometry in resizeWithChecks
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
2019-10-02 11:28:17 +03:00
Vlad Zahorodnii
84de8d135d [wayland] Process pending state and map the client on commit
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
2019-10-02 11:27:57 +03:00
Alexey Min
493bbdc24a Merge branch 'Plasma/5.17' 2019-10-01 15:34:14 +03: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
Vlad Zahorodnii
39dca35d44 Delete unused include 2019-10-01 11:54:41 +03:00
Vlad Zahorodnii
a03d70c9a6 Delete pointless discardShape method calls
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
2019-09-30 20:14:57 +03:00
Vlad Zahorodnii
4552096c1d Sort headers alphabetically in xdgshellclient.cpp 2019-09-30 18:18:44 +03:00
Vlad Zahorodnii
f93875535c Update my last name 2019-09-29 17:03:25 +03:00
Vlad Zahorodnii
99d3185949 Rename getShadow method to updateShadow
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
2019-09-29 15:26:53 +03:00
Vlad Zahorodnii
c1eafcbce1 Drop Toplevel::hasShadow() method
Summary: Use Toplevel::shadow() instead to check whether a Toplevel has a Shadow.

Reviewers: #kwin, romangg

Reviewed By: #kwin, romangg

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D24297
2019-09-29 15:26:39 +03:00
Vlad Zahorodnii
da1a47f91b Copy internal raster buffer object 2019-09-29 13:31:08 +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
l10n daemon script
9c11835222 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 05:20:56 +02:00
David Edmundson
40b0296d5c [libkwineffects] Introduce API to easily show a QtQuick scene in an effect
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
2019-09-27 16:11:05 +01:00