Commit Graph

17925 Commits (bc1991706c66a53f970fdcd576bcb35e70c9b7f1)

Author SHA1 Message Date
Vlad Zahorodnii 63b24b559a [effects/maximize] Use windowFrameGeometryChanged
Summary:
Use windowFrameGeometryChanged rather than windowGeometryShapeChanged
because we are interested only in frame geometry changes.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D26905
2020-02-12 10:52:26 +02:00
Vlad Zahorodnii 0253add426 [effects/thumbnailaside] Use windowFrameGeometryChanged
Summary:
Use windowFrameGeometryChanged rather than windowGeometryShapeChanged
because we are interested only in frame geometry changes.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D26906
2020-02-12 10:52:26 +02:00
Vlad Zahorodnii 37b8023f71 [effects/presentwindows] Use windowFrameGeometryChanged
Summary:
Use windowFrameGeometryChanged rather than windowGeometryShapeChanged
because we are interested only in frame geometry changes.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D26907
2020-02-12 10:52:26 +02:00
Vlad Zahorodnii f7891ee252 [effects/desktopgrid] Use windowFrameGeometryChanged
Summary:
Use windowFrameGeometryChanged rather than windowGeometryShapeChanged
because we are interested only in frame geometry changes.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D26908
2020-02-12 10:52:26 +02:00
Vlad Zahorodnii b3b5a54859 [effects/snaphelper] Use windowFrameGeometryChanged
Summary:
Use windowFrameGeometryChanged rather than windowGeometryShapeChanged
because we are interested only in frame geometry changes.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D26909
2020-02-12 10:52:26 +02:00
Vlad Zahorodnii 00f4f88f65 Expose frameGeometryChanged signal to effects
Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D26864
2020-02-12 10:52:26 +02:00
Vlad Zahorodnii 15af09c70a Introduce Toplevel::frameGeometryChanged signal
Summary:
Currently we have two signals that are emitted when the Toplevel's geometry
changes - geometryShapeChanged() and geometryChanged(). The former signal
is used primarily to invalidate cached window quads and the latter is
sort of emitted when the frame geometry changes. But it's not that easy. We
have a bunch of connects that link those signals together...

The worst part about all of this is that the window quads cache gets
invalidated every time a geometry update occurs, for example when user
moves a window around on the screen.

This change introduces a new signal and deprecates the existing geometryChanged
signal. frameGeometryChanged is similar to geometryChanged except that it is
emitted when an _actual_ geometry change has occurred.

We do still emit geometryShapeChanged signal. However, in long term, we
need to get rid of this signal or come up with something that makes sense
and doesn't require us to waste computational resources.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, romangg, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D26863
2020-02-12 10:52:26 +02:00
David Edmundson 3dbfa6a325 Return early if close button accepts input event
Summary:
Otherwise we close the effect whenever the close is pressed which is a
behavioural change.

That in turn leads to bigger bugs

BUG: 415155

Test Plan:
Ran effect
Clicked on the "Whitespace" of the dash
Clicked on the close

Now matches desktopgrid code

Reviewers: #kwin, zzag, ngraham

Reviewed By: #kwin, zzag, ngraham

Subscribers: ngraham, zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27333
2020-02-12 10:03:39 +02:00
Vlad Zahorodnii dd96e444dd Merge branch 'Plasma/5.18' 2020-02-11 19:56:29 +02:00
Vlad Zahorodnii b94a78c47d [libkwineffects] Detect more AMD GPUs with GFX9 (Vega) chips
Summary: ASIC family names are taken from Mesa's source code.

Test Plan: Compiles.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, romangg, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27176
2020-02-11 19:56:18 +02:00
Vlad Zahorodnii 2f506cd3c1 Put the resize effect in charge of scheduling repaints
Summary:
If the frame geometry is changed in any away, for example if the client
has been moved, resized, or both, setFrameGeometry() will schedule a layer
repaint for the visible geometry before and after the update.

When there is a resize effect, we only send requests to the client window
to render contents at the new size. setFrameGeometry() is not called and
therefore no layer repaints are scheduled.

Only the resize effect knows what parts of the window or the screen must
be repainted and thus it must be responsible for scheduling repaints.

A full repaint in AbstractClient::performMoveResize() is scheduled mostly
for historical reasons.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27167
2020-02-11 12:51:26 +02:00
l10n daemon script 78c0095a5d 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"
2020-02-11 05:59:16 +01:00
l10n daemon script 49b5e227fb 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"
2020-02-09 09:36:06 +01:00
l10n daemon script e5546c9236 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"
2020-02-09 05:53:12 +01:00
Heiko Becker 7d8a7e701b Merge remote-tracking branch 'origin/Plasma/5.18' 2020-02-08 14:12:47 +01:00
Heiko Becker 6d8f3732c1 Require kdecoration >= 5.18.0
Summary:
To successfully build kwin needs 13e6459a3baeebe6a7b594efd995b88f6dd7524e
in kdecoration. Otherwise it fails with: "previewclient.h:93:11: error:
'QSize KDecoration2::Preview::PreviewClient::size() const' marked
'override', but does not override QSize size() const override;"
So this is not a new requirement but just an update to the build system
to reflect the actual requirements.

Test Plan: Builds fine with the newly required version

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27242
2020-02-08 13:38:22 +01:00
Marco Martin baebfb7f7e actually draw drag icons in the mouse cursor during drags
Summary:
paint together the cursor image and the extra dnd image if available
on X11 with QDrag::setHotspot is possible to control their relative
position, which doesn't seem to have a wayland protocol correspondence
so their relative position are controlled just by the hotspot of the cursor itself

Test Plan:
folder graphics from dolphin is painted correctly
{F8086937}

Reviewers: #plasma, #kwin, davidedmundson

Reviewed By: #plasma, #kwin, davidedmundson

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27174
2020-02-06 15:47:57 +01:00
Jonathan Riddell e70b30d572 Update version number for 5.18.0
GIT_SILENT
2020-02-06 12:52:26 +00:00
Aleix Pol b9423a033c Send a Qt::Key_PowerDown when long pressing the power button
Summary:
This will be useful to be able to show a menu on long press and just
lock the screen on normal press, especially useful on phones and
tablets.

Test Plan:
Could not test much because on laptops doesn't work. Would need more
investigation. discussed further on the plasma mailing list.

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: z3ntu, davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D26899
2020-02-06 12:12:48 +01:00
Tobias Fella 6fe7f9281a Make the virtual keyboard disappear when locking the screen
Summary: Previously, the virtual keyboard did not close when locking the screen, instead blocking part of the lockscreen while not actually working. This patch actually makes the keyboard close before locking

Test Plan: Open virtual keyboard -> Lock Screen -> No keyboard shown

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, apol, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27172
2020-02-06 10:34:03 +01:00
Méven Car 3f7fa8e47b kcms/kwinoptions : convert Advanced part to KConfigXT
Reviewers: ervin, #kwin, bport, crossi, zzag

Reviewed By: #kwin, zzag

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27171
2020-02-06 09:06:41 +01:00
Vlad Zahorodnii 90489bde27 Merge branch 'Plasma/5.18' 2020-02-05 22:28:40 +02:00
Vlad Zahorodnii ab9a9c8428 [libkwineffects] Detect AMD Navi GPUs
Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27168
2020-02-05 22:27:15 +02:00
Méven Car b6ab50e6b7 kcms/kwinoptions : convert Moving part to KConfigXT
Test Plan: Behavior unchanged

Reviewers: ervin, #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27164
2020-02-05 15:05:22 +01:00
Guo Yunhe bdd20f61e6 Simplify HTML markups
Summary: Simplifed HTML markups are easier to translate.

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27089
2020-02-03 14:56:57 +02:00
Vlad Zahorodnii 84f0d51f40 Rename popupPosition to popupRect
Summary: popupPosition implies that it is a QPoint, which is false.

Test Plan: Compiles.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27125
2020-02-03 14:53:06 +02:00
Vlad Zahorodnii 432787e036 Use Q_ASSERT in XdgShellClient::transientPlacement()
Summary: This simplifies CFG.

Test Plan: Compiles.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27124
2020-02-03 14:39:34 +02:00
Vlad Zahorodnii 85c099936e Use QRect::moveRight() and QRect::moveBottom() in XdgShellClient::transientPlacement()
Summary: It's more intuitive.

Test Plan: Relevant tests pass.

Reviewers: #kwin

Subscribers: davidedmundson, broulik, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27050
2020-02-03 14:07:48 +02:00
Vlad Zahorodnii 98634e0193 Merge branch 'Plasma/5.18' 2020-02-03 14:01:53 +02:00
Vlad Zahorodnii 56d5f3a4f6 [x11] Fix visual artifacts during interactive resize
Summary:
When a window is being interactively resized, its contents may jump. The
reason why that happens is because KWin renders partially resized client
window. Composite extension spec says that a window will get a new pixmap
each time it is resized or mapped. This applies to the frame window, but
not to the client window itself. If the client window is resized,
off-screen storage for the frame window won't be reallocated. Therefore,
KWin may render partially resized client window if the client doesn't
attempt to be in sync with our rendering loop. Currently, the only way
to do that is to use extended frame counters, which are not supported by
KWin.

So, in order to fix visual artifacts during interactive resize, we need
somehow forcefully re-allocate off-screen storage for the frame window.
Unfortunately, Composite extension doesn't provide any request to do
that, so the only option we have is to resize the frame window.

BUG: 415839
FIXED-IN: 5.18.0

Reviewers: #kwin

Subscribers: davidedmundson, ngraham, alexde, fredrik, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D26914
2020-02-03 13:56:35 +02:00
Arjen Hiemstra 665bff70e5 Merge branch 'Plasma/5.18' 2020-02-03 12:27:56 +01:00
Arjen Hiemstra 9b3d9e58a4 ScreenEdge: Do not use localtime for measuring duration
Summary:
QDateTime::fromMSecSinceEpoch uses Qt::LocalTime by default. This involves an
expensive localtime conversion. So instead force things to use UTC, as there
is no need for timezone information when tracking durations.

This is especially noticeable on Bedrock Linux, which uses a Fuse mounted
/etc, which is slower than a plain /etc and causes quite some slowdown there.
See https://github.com/bedrocklinux/bedrocklinux-userland/issues/140 for
details.

Test Plan: The screenedge unit test still passes.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: zzag, anthonyfieroni, davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27114
2020-02-03 12:26:17 +01:00
Vlad Zahorodnii c9c3c3ad65 Introduce coding-conventions.md
Summary:
Hopefully, the new document makes it clear when one can use QRect::right()
and QRect::bottom().

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27060
2020-02-03 12:45:47 +02:00
Vlad Zahorodnii 6dd6bdb57d [wayland] Implement resize_x/resize_y constraint adjustment
Summary:
Since we send the initial configure event after placing xdg-popups, we
can finally implement resize_x and resize_y constraint adjustments.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27049
2020-01-31 12:17:45 +02:00
l10n daemon script 9ca27c6690 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"
2020-01-31 09:47:38 +01:00
l10n daemon script 40dfbb82a7 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"
2020-01-31 05:53:55 +01:00
Vlad Zahorodnii ea8e28337e Merge branch 'Plasma/5.18' 2020-01-29 17:15:59 +02:00
Vlad Zahorodnii 76297196e8 [scripting] Expose Workspace::sendClientToDesktop()
Summary:
BUG: 416093
FIXED-IN: 5.18.0

Test Plan: Only compile-time check.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D26988
2020-01-29 17:14:41 +02:00
Vlad Zahorodnii 74e04949d7 Merge branch 'Plasma/5.18' 2020-01-29 13:11:32 +02:00
Vlad Zahorodnii c43b25bd55 Fix minor issues in XdgShellClient::updateClientOutputs
Fix minor coding style issues and drop redundant qAsConst (const
containers don't detach).
2020-01-29 13:04:51 +02:00
Vlad Zahorodnii 35fe3cb6c5 Drop Toplevel::decorationRect()
Summary: It's identical to Toplevel::rect().

Test Plan: Compiles.

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D26971
2020-01-29 12:58:54 +02:00
Vlad Zahorodnii 07553d209d s/m_xdgShellSurface/m_xdgShellToplevel/g
Summary: m_xdgShellSurface represents an xdg-toplevel, not an xdg-surface.

Test Plan: Compiles.

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D26975
2020-01-29 12:58:54 +02:00
Vlad Zahorodnii 2cf832cf29 [wayland] Get rid of some duplicated code
Summary:
We duplicate ping code in a few places. This change introduces a dedicated
method for sending ping events to an xdg-toplevel. In long term, it can be
used for sending "test" ping messages at random interval.

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D26974
2020-01-29 12:58:54 +02:00
l10n daemon script ec2204fbe1 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"
2020-01-29 09:28:27 +01:00
l10n daemon script 64786630a5 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"
2020-01-29 05:45:29 +01:00
Vlad Zahorodnii 3399a7db8a Document AbstractClient::isResize() and AbstractClient::isMove() 2020-01-28 22:18:57 +02:00
Vlad Zahorodnii c36a5bf423 Merge branch 'Plasma/5.18' 2020-01-28 22:01:03 +02:00
Vlad Zahorodnii 34fc962ff1 Move definition of X11Client::damageNotifyEvent() to x11client.cpp
One step closer to the bright future where one can disable X11 support
at build time.
2020-01-28 21:58:00 +02:00
Vlad Zahorodnii 68ef6bcd7a Rename X11Client::getSyncRequest() to X11Client::syncRequest()
Getter methods should not have "get" prefix.
2020-01-28 21:46:09 +02:00
Vlad Zahorodnii a073a79a97 Merge branch 'Plasma/5.18' 2020-01-28 18:42:35 +02:00