Commit graph

16518 commits

Author SHA1 Message Date
Vlad Zagorodniy
769f2659dd [effects] Make Scale and Glide effects Wayland-friendly
Summary:
The Scale effect and the Glide effect have to animate only ordinary
windows(i.e. the ones that are considered to be apps).

On X11, in order to distinguish ordinary windows from combo box popups,
popup menus, and other popups, those effects check whether given window
is managed.

On Wayland, there is no concept of managed/unmanaged windows.

XDG Shell protocol defines 2 surface roles:
* xdg_toplevel;
* and, xdg_popup.

The former can be used to implement typical windows, the ones that can
be minimized, maximized, etc.

The latter can be used to implement tooltips, popup menus, etc. Thus,
that's a good criteria to filter popup windows.

CCBUG: 398100

Reviewers: #kwin, graesslin, davidedmundson

Reviewed By: #kwin, graesslin, davidedmundson

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D15117
2018-10-09 11:04:35 +03:00
Vlad Zagorodniy
66a91f0861 [effects/slidingpopups] Fix jumpy transition between In and Out animations
Summary:
If a window is being slided in and for some reason it gets closed, the
window will be slided out. The problem is that there is a jump between
the slide in animation and the slide out animation.

The reason for that is we cancel the slide in animation when the slide
out animation is started.

It makes sense to cancel previously active animations because they have
different durations. But visually, it doesn't look good.

TimeLine tries to preserve progress value when changing duration. Thus,
let's utilize that to fix the jump.

This change matters only with animation speed factor > 1.0.

CCBUG: 264276

Test Plan: Manually.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: abetts, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D15626
2018-10-08 14:14:14 +03:00
David Edmundson
2d3431aede Expose AbstractClient's colorScheme as a property
Summary:
This exposes colorScheme as a property which is then usable by kwin
scripts.
Wanted by T9769.

Test Plan:
Michail to test in a script.

Reviewers: #kwin, zzag, graesslin

Reviewed By: #kwin, zzag, graesslin

Subscribers: mvourlakos, zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D15913
2018-10-08 09:35:56 +01:00
l10n daemon script
5aeba9da59 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"
2018-10-08 07:59:39 +02:00
l10n daemon script
e60c878647 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"
2018-10-08 06:07:21 +02:00
Vlad Zagorodniy
ca3cbbce84 [colorcorrection] Make GammaRamp non-copyable
Summary:
GammaRamp deletes an array in the destructor thus we have to either
declare our own copy constructor and copy assignment operator or
delete them both.

GammaRamp looks more like an identity rather than a value so both copy
constructor and copy assignment operator were deleted.

Test Plan: Compiles.

Reviewers: #kwin, romangg

Reviewed By: #kwin, romangg

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D16023
2018-10-07 20:57:57 +03:00
David Edmundson
29a49f8656 [wayland] Use pending maximize mode in decoration updates
Summary:
The change to make maximize mode asynchronous featured the comment

>Things are a bit complex with borders. Technically we
>shouldn't update them till we get a response, but we also need to have
>the correct geometry of the full size window in our request. For now
>they behave as before, updating when we request the change.

We call setNoBorder when we request the geometry but decoratedClient
also checks the maximise mode, in order to follow the scheme above we
need this to operate on the requested state not current state.

X is unaffected.

This fixes the borders being restored correct after maximize/restore.

Test Plan:
Chose a theme with visible borders
Maximised a window and back
They restored

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D15991
2018-10-07 17:52:34 +01:00
Vlad Zagorodniy
d95b65480f Delete unused function
Summary:
The function was introduced in 2d99ef918b.

It's not used anywhere plus we don't need it anymore because
AbstractClient::isActiveFullscreen checks main clients.

Test Plan: Compiles.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D16022
2018-10-07 19:51:06 +03:00
l10n daemon script
dc707c5c4e 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"
2018-10-07 08:03:19 +02:00
l10n daemon script
c244ee5e3e 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"
2018-10-07 06:07:19 +02:00
Martin Flöser
cefc15e573 Ignore modifier mouse actions when the pointer is constrained
Summary:
If the pointer is constrained all mouse events should go to the window.
Also our Alt+click. To use Alt+click nevertheless one can just unconfine
the window.

CCBUG: 399375

Test Plan: Run the adjusted autotest before and after change

Reviewers: #kwin, #plasma

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D15982
2018-10-06 18:05:32 +02:00
l10n daemon script
e16334b3f2 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"
2018-10-06 05:50:39 +02:00
David Edmundson
e327cce4bc [wayland] Asyncronously update maximise flags
Summary:
A window maximising is an async operation. We work out what size we want
the client to be, then request the client to update. The window isn't
really maximised until we get that new buffer with the new size.

This patch splits the requested, pending and current state, updating as
appropriate.

Things are a bit complex with things like borders. Technically we
shouldn't update them till we get a response, but we also need to have
the correct geometry of the full size window in our request. For now
they behave as before, updating when we request the change.

X code is untouched.

This hopefully fixes maximise animations on wayland as now we update the
geometry before emitting maximisedChanged.

Test Plan:
Maximised a window with the button and double clicking title bar.

I get only the following events on maximise/restore:
19:51:39.156 KWin::EffectsHandlerImpl::slotGeometryShapeChanged geometry
shape changed QRect(47,24 640x509) QRect(0,0 716x573)
19:51:39.157 KWin::EffectsHandlerImpl::slotClientMaximized slot client
maximised true true

19:51:40.522 KWin::EffectsHandlerImpl::slotGeometryShapeChanged geometry
shape changed QRect(0,0 716x573) QRect(47,24 640x509)
19:51:40.522 KWin::EffectsHandlerImpl::slotClientMaximized slot client
maximised false false

BUG: 382698

Reviewers: #kwin, romangg

Reviewed By: #kwin, romangg

Subscribers: romangg, zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D15150
2018-10-05 18:35:24 +03:00
David Edmundson
65b8ba1770 [wayland] Syncronise pending geometry with acked configure requests
Summary:
When we want to change a client's size and position together we have to
request the client becomes a new size and only then move the window to
the new location.

Currently we process the new position the next time the buffer updates,
but with no guarantee that it has actually tried to resize/whatever yet.
The client could be providing a new buffer just because the contents
have changed.

XDGShell has an acked serial designed to keep everything precisely in
sync. A surface represents the last configure that was acked.

This patch tracks the pending position for each configure and applies it
accordingly.

WL_shell does not have this mechanism, so behaviour is kept the same as
before.

----

This is a pre-requisite to syncing maximisedState/isFullScreen with the
configure request.

Potentially we could remove the isWaitingForResizeSync checks when
resizing and it will still resize smoothly.

Test Plan:
Relevant unit test still passes with the client responding
Resized a window from the left edge with WLShell and XDGShellV6

Reviewers: #kwin, romangg

Reviewed By: #kwin, romangg

Subscribers: romangg, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D15135
2018-10-05 17:35:23 +03:00
David Edmundson
413bd53aac Merge branch 'Plasma/5.14' 2018-10-05 14:40:46 +01:00
David Edmundson
0b7778f964 [plugins/qpa] Add explanatory comment 2018-10-05 14:38:55 +01:00
David Edmundson
6ebfa59331 [plugins/qpa] Don't crash on Qt5.12 OpengGL::makeCurrent
Summary:
QOpenGLContext was changed to call platform->makeCurrent before it
called setCurrentContext.

Because we bind window FBO and ultimately that calls
QOpenGlContext::format we need Qt to know which context is current so it
can tell us the format.

This matches the QtWayland EGL code.

BUG: 399392

Test Plan:
Switched virtual desktop with the OSD (previously reliably crashed)
Now it doesn't

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D15957
2018-10-05 14:04:09 +01:00
l10n daemon script
85bc931d72 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"
2018-10-05 05:58:38 +02:00
Vlad Zagorodniy
0e50a9d55c Merge branch 'Plasma/5.14' 2018-10-04 21:41:38 +03:00
Vlad Zagorodniy
e9fd57285f [effects/zoom] Set wrap mode for cursor texture
Summary:
With the Oxygen cursor theme, a visual glitch can appear in the
bottom-left corner of the cursor when the screen is zoomed in.

The reason for that is we're using GL_REPEAT for GL_TEXTURE_WRAP_S
and GL_TEXTURE_WRAP_T. So, when the linear filter samples neighboring
texels in the bottom, it can sample some texels from the top (because of
GL_REPEAT).

To fix that, we have to set the wrap mode to GL_CLAMP_TO_EDGE.

BUG: 338254
FIXED-IN: 5.14.0

Test Plan:
Before:
{F6303912}

After:
{F6303913}

Tried other cursor themes(Breeze and Adwaita), everything looks okay.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D15949
2018-10-04 21:40:49 +03:00
Vlad Zagorodniy
5181e999f8 [autotests] Extend test tables of SlidingPopupsTest
Summary:
Check that the Sliding Popups effect grabs windows no matter in what
order it and the Scale effect are loaded.

Test Plan: Ran the test.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D15729
2018-10-04 21:38:54 +03:00
David Edmundson
a10647edf5 Disable fade effect during fullscreen effects
Summary:
This means that if one opens/closes a window whilst present windows (for
example) is active we don't have two effects meddling with the opacity.

Like glide and scale this disables if it's invoked during an active full
screen effect, but it does not cancel animations that are running when a
full screen effect is launched.

Test Plan:
Windows still fade normally as before
Ran sleep ; dolphin with present windows / cube
Present windows fades windows itself so it's hard to see any difference
But it's more technically correct

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D15933
2018-10-04 13:05:51 +01:00
David Edmundson
12cc080945 [libkwineffects] fix typo in property name 2018-10-04 13:05:12 +01:00
Jonathan Riddell
263100b0c2 Update version number for 5.14.80
GIT_SILENT
2018-10-04 12:39:02 +01:00
Jonathan Riddell
b3e3cf861f Update version number for 5.14.0
GIT_SILENT
2018-10-04 12:25:07 +01:00
Jonathan Riddell
232d2ae24d Update version number for 5.14.0
GIT_SILENT
2018-10-04 12:13:35 +01:00
l10n daemon script
d6e4096d76 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"
2018-10-04 05:56:51 +02:00
David Edmundson
1c6927f64f Bump libkwineffects SO version for 5.15 2018-10-04 00:57:44 +03:00
David Edmundson
99b33e7428 [libkwineffects] Expose getting/setting activeFullScript to scripted effects
Summary:
Getter is exposed as a property on scripted effect in a way that hides
pointers from the scripting side.

Setter is implicitly handled as a property of newly created animations
and holds the activeFullScreenEffect whilst any of them are active. Like
existing effects it remains up to the effect author to avoid the
problems of multiple full screen effects. The RAII lock pattern is
somewhat overkill currently, but it's the direction I hope we can take
EffectsHandler in next API break.

BUG: 396790

--

This patch is against the QJSEngine port, though it's not conceptually a
requirement.

Test Plan: Unit test

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D14688
2018-10-04 00:57:44 +03:00
l10n daemon script
21c5b95529 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"
2018-10-03 06:13:05 +02:00
Vlad Zagorodniy
6cac594acb [effects/slide] Simplify logic that forces blur and background contrast
Summary:
The "Force" part in WindowForceBackgroundContrastRole and WindowForceBlurRole
is confusing. If WindowForceBlurRole is set on a window, background
behind it won't be blurred.

By setting WindowForceBlurRole we tell the Blur effect "that's fine to
do your business behind transformed windows."

The Slide effect only translates windows, it doesn't distort them, etc.
So, we can set WindowForceBackgroundContrastRole and WindowForceBlurRole
for all windows.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D15707
2018-10-02 19:54:37 +03:00
Vlad Zagorodniy
6f5b3fbe40 [effects/slidingpopups] Do not add full window repaint in windowDeleted slot
Summary:
Full window repaints issued by the Sliding Popups effect can hide bugs in
other effects that animate the disappearing of windows (e.g. Scale).

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D15822
2018-10-02 19:51:52 +03:00
Vlad Zagorodniy
2872e37709 [kcmkwin/tabbox] Update window thumbnails
Test Plan:
Preview the Thumbnails task switcher:
{F6293654}

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D15831
2018-10-02 19:47:58 +03:00
Vlad Zagorodniy
4271b73d22 Add .arclint
Summary: Ran `arc lint --everything`

Reviewers: #kwin, bshah, davidedmundson, graesslin

Reviewed By: #kwin, bshah, davidedmundson

Subscribers: romangg, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D14427
2018-10-02 19:44:07 +03:00
l10n daemon script
4bcd809664 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"
2018-10-02 05:58:17 +02:00
l10n daemon script
972108e585 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"
2018-09-30 05:55:57 +02:00
l10n daemon script
4b24a538fc 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"
2018-09-29 08:55:05 +02:00
l10n daemon script
0b8453c62f 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"
2018-09-29 08:22:49 +02:00
l10n daemon script
9f9e9f796b 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"
2018-09-29 06:04:44 +02:00
Vlad Zagorodniy
e822d27cbe [effects/cube] Update cubecap texture
Summary: Current cubecap texture is an old KDE logo. Let's use something newer.

Test Plan:
Before:
{F6282237}

After:
{F6282239}

Before:
{F6282372}

After:
{F6282375}

Reviewers: #kwin, #plasma, #vdg, davidedmundson

Reviewed By: #kwin, #plasma, davidedmundson

Subscribers: davidedmundson, ngraham, broulik, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D15726
2018-09-28 21:20:11 +03:00
Vlad Zagorodniy
72ad5dc894 [effects/slide] Delete redundant checks
Summary:
If isActive() returns false, neither paintScreen nor paintWindow nor
postPaintScreen will be called.

So, `if (m_active)` checks are redundant.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D15708
2018-09-28 20:21:24 +03:00
Vlad Zagorodniy
78ce54f88a [effects] Make scripted effects GHNS-able
Summary:
Currently, if one wants to install a scripted effect from the KDE Store,
the effect won't show up in the Desktop Effects KCM. The reason for that
is kpackagetool5 doesn't know where to install effects (they have to be
installed under ${DATA_DIR}/kwin/effects).

Another problem is that even if the scripted effect is installed in the
right directory (e.g. ~/.local/share/kwin/effects), it won't be listed in
the Desktop Effects KCM because it doesn't have a desktop file in
kservices5 dir. Please notice that the effect will be "visible" for KWin, i.e.
you can enable it by editing kwinrc.

This diff addresses those 2 problems by:
* Adding a PackageStructure plugin for effects (so they are installed
  under kwin/effects/);
* Using KPackage::PackageLoader to get list of scripted effect in the
  Desktop Effects KCM.

Test Plan:
* Installed an effect from the KDE Store, it appeared in the Desktop Effects
  KCM;
* Removed it.

Reviewers: #kwin, mart, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: ngraham, davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D15372
2018-09-28 20:17:30 +03:00
Vlad Zagorodniy
1de9648a89 [effects/showpaint] Use a shortcut to toggle the effect
Summary:
The Show Paint effect is useful when debugging repaint regions issued by
effects. The only headache with it is necessity to enable/disable it.
Consider the following workflow:

* Do some change to an effect;
* Compile KWin (or the effect);
* Go to System Settings and enable the Show Paint effect;
* Test effect, check repaint regions, etc;
* Disable the Show Paint effect;
* Go to the step 1.

This workflow is really exhausting. Also, when testing repaints in a
nested compositor, things become quite messy.

Because purpose of this effect is to debug repaints (and because this
effect is not meant for daily usage), I think that's fine to change
how it's activated.

This patch improves the workflow by changing the way how this effect
gets activated. Instead of enabling/disabling it, one can just use a shortcut
to activate or deactivate the effect.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: broulik, davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D15703
2018-09-28 20:12:22 +03:00
Vlad Zagorodniy
fa6fa27935 [effects] Move the Desktop Cube Animation effect to its own directory
Summary: Just little tidying.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D15725
2018-09-28 20:07:32 +03:00
Jonathan Riddell
838bd060c6 Update version number for 5.12.7
GIT_SILENT
2018-09-25 10:29:06 +01:00
Vlad Zagorodniy
9ad3f1c672 [autotests] Register KWin::Deleted* in SlidingPopupsTest
Summary:
QSignalSpy is not happy about KWin::Deleted*:

    QWARN  : SlidingPopupsTest::testWithOtherEffectWayland(wobblywindows, slide)
    QSignalSpy: Unable to handle parameter 'deleted' of type 'KWin::Deleted*' of
    method 'windowClosed', use qRegisterMetaType to register it.

Test Plan: Ran the test, haven't noticed any warnings.

Reviewers: #kwin, broulik

Reviewed By: broulik

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D15730
2018-09-24 18:09:28 +03:00
Vlad Zagorodniy
12bd16968f [effects/blur] Add missing override keywords
Test Plan: Compiles.

Reviewers: #kwin, broulik

Reviewed By: broulik

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D15712
2018-09-24 15:42:22 +03:00
Vlad Zagorodniy
646032a99d [effects/morphingpopups] Use enumerators from the DataRole enum
Summary:
Use Effect.WindowForceBackgroundContrastRole and Effect.WindowForceBlurRole
instead of integers to improve readability.

Reviewers: #kwin, broulik

Reviewed By: broulik

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D15709
2018-09-24 15:41:13 +03:00
l10n daemon script
eedccae16f 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"
2018-09-23 07:36:20 +02:00
l10n daemon script
fe430b12e8 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"
2018-09-23 05:47:31 +02:00