Commit graph

16339 commits

Author SHA1 Message Date
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
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
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
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
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
Igor Poboiko
1115ca8490 [effects/cubeslide] Fix "sticky" windows detection on Wayland
Summary: This is second part of {D15175}, and aimed at fixing Bug 390366.
The problem was that effect relied on isManaged() to detect OSDs and notifications, that should be painted on top of the cube. On Wayland, the desktop window itself is not managed, which made it "sticky".

Instead we use isSpecialWindow() check to explicitly make notifications and OSDs sticky.
It still requires fixing Plasma::Dialog, since it does not set isSpecialWindow() flag correctly.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D15496

BUG: 390366
FIXED-IN: 5.15.0
2018-09-17 22:27:21 +03:00
Laurent Montel
b02d7ff96f Fix compile when we use QT_NO_NARROWING_CONVERSIONS_IN_CONNECT flags 2018-09-17 13:43:18 +02:00
Alexander Potashev
ae21aa7028 i18n: Fix untranslatable table row "Delta"
Test Plan: none

Reviewers: davidedmundson

Reviewed By: davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D15561
2018-09-17 13:43:05 +03:00
Vlad Zagorodniy
91ddeea750 [effects/coverswitch] Port to TimeLine
Test Plan: Compiles and still works.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D15302
2018-09-17 13:35:46 +03:00
David Edmundson
7cd74e7d04 Merge branch 'Plasma/5.14' 2018-09-17 11:40:19 +02:00
David Edmundson
8bba7009bc Fix untranslatable strings in debug_console.ui shortcutdialog.ui
BUG: 398703
Review on bugzilla
2018-09-17 11:39:47 +02:00
l10n daemon script
c7455c7177 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-17 07:34:47 +02:00
l10n daemon script
ce7e79cdd6 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-17 05:41:57 +02:00
Roman Gilg
ff6e9c3b92 Define ShellClient debug output
Summary:
Add a debug format for ShellClients, otherwise the output is always
empty. Also add the nospace qualifier to ShellClient's and Client's
debug output to present it correctly.

Test Plan: Manually.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D15560
2018-09-17 04:11:03 +02:00
l10n daemon script
a77b7a8df7 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-15 07:49:44 +02:00
l10n daemon script
57df948ca1 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-15 06:01:01 +02:00
David Edmundson
fcf9acfec5 Add XDG WmBase support
Test Plan:
Compiled latest GTK
Ran gtk4-demo and used WAYLAND_DEBUG to confirm it used the correct
shell
tested a top level and a popup

Reviewers: #plasma, romangg

Reviewed By: #plasma, romangg

Subscribers: romangg, mart, graesslin, zzag, kwin

Tags: #kwin
BUG: 398614
FIXED-IN: 5.15.0

Differential Revision: https://phabricator.kde.org/D13530
2018-09-14 12:18:47 +01:00
Igor Poboiko
525e96cc18 [effects/cubeslide] Slightly improve readability of the code 2018-09-14 12:52:32 +03:00
Vlad Zagorodniy
9043c092f9 [effects/cubeslide] Always slide desktop window 2018-09-14 12:46:34 +03:00
Igor Poboiko
ca1b5ea107 [effects/cubeslide] Fix visual glitches with Blur / BackgroundContrast effect
Summary:
Bugs occurred because KWin was not very happy when windows were painted during CubeSlideEffect::paintScreen().
Another issue is that blur, although it was supposed to, did not work at all (haven't found appropriate bug on bugzilla).
As well as background contrast effect.

This patch does the following thing:

 - Adopted WindowForceBlur / WindowForceBackgroundContrast logic from SlideEffect, instead of panels/stickyWindows QSets (those become useless anyway)
 - Added shouldAnimate code, which determines whether a window should be animated with the cube (i.e. ordinary windows) or should stick (i.e. panels or pinned windows, if corresponding options are checked in the settings)
 - It paints an additional non-transformed screen, on which it paints only "sticky" windows. This is done because otherwise KWin would apply blur not behind the OSD, but on the same place on moving cube face.
 - (in addition) switched to new Qt5 connect syntax.

Reviewers: #kwin, zzag

Differential Revision: https://phabricator.kde.org/D15175

BUG: 361516
BUG: 362360
FIXED-IN: 5.15.0
2018-09-14 12:36:55 +03:00
David Edmundson
93b3ace067 [effects/fadedesktop] Fade to the correct opacity
Summary:
An opacity animation calls multiplyOpacity not setOpacity, therefore we
want to always fade between 0 and 1, not up to the window opacity.

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D15476
2018-09-14 10:09:32 +02:00
David Edmundson
4ecbacff77 [effects/fadedesktop] Port to explicit animate API
Summary: No behavioural changes

Test Plan:
Set a slow animation speed
Changed desktop

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D15473
2018-09-14 10:09:22 +02:00
Jonathan Riddell
9ebb7978de Update version number for 5.14.80
GIT_SILENT
2018-09-13 18:23:58 +01:00
Jonathan Riddell
84cd9cfc43 Update version number for 5.13.90
GIT_SILENT
2018-09-13 17:33:33 +01:00
Vlad Zagorodniy
213239a0ea [shadow] Rebuild quads after creation of shadow
Summary:
If a shadow is installed for already rendered window, the shadow won't
be initially rendered because we don't rebuild window quad cache.

BUG: 398572
FIXED-IN: 5.14.0

Test Plan: Can't reproduce 398572 anymore.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D15475
2018-09-13 16:20:04 +03:00
David Edmundson
0a2e51db47 Remove duplicated auto backend resolution
Summary:
kwin_wayland now automatically chooses an appropriate backend, such as
DRM, nested wayland or nested X. If nested it will automatically go into
windowed mode regardless of whether --windowed is set and works fine.

Backend choosing logic existed duplicated in older code for kwin_wayland
--windowed, with the subtle unexpected difference that it preferred
running as an X client over running as a wayland cient if both are
present. This simplifies codes and syncs automatic resolution behaviour.

kwin_wayland --windowed with --x11-display  or --wayland-display will
remain the same.

Test Plan:
Ran kwin_wayland with and without --windowed inside another wayland.
Got the same backend chosen
Tested that kwin_wayland (without --windowed) on an X machine worked just fine.

Reviewers: #kwin, mart

Reviewed By: #kwin, mart

Subscribers: mart, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D13658
2018-09-13 10:20:58 +01:00
David Edmundson
d485dfe7ef Avoid crash with on scripted window teardown with threaded quick render loop
Summary:
Qt render loops behave quite differently to each other.

KWin scripting as a workaround for another situation cleans
(17553e5a1f) handles tracking of script
windows by deleting the underlying window handle on hide.

This currently happens before the window gets the hideEvent.

Arguably this is a quirk with Qt, but in the current state:

- QSGThreadedRenderLoop deletes the platform window and cleans up
- We then get the hide() event. This no-ops because there's no window.
   (else branch of     case WM_TryRelease in qsgthreadedrenderloop.cpp)
- We carry on rendering animations despite having no platform
- undefined behaviour

Normally this isn't a problem as typically destruction of the platform window
happens only when a window is being deleted, we're messing with Qt
internals here.

If we make sure the QHideEvent is processed by the render loop first,
things seem fine.

BUG: 397767

Test Plan:
Ran QSG_RENDER_LOOP=threaded
Read output with scenegraph logging rules on

Reviewers: #kwin, broulik

Reviewed By: broulik

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D15025
2018-09-13 10:19:12 +01:00
l10n daemon script
e4ff50624a 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-13 05:57:35 +02:00
Roman Gilg
6072b0cd6c Remove breaking pointer constraints functionality
Summary:
With 2694839099, 0bd5eff862 and f0ba436c72 it is now possible to
unconstrain a pointer by killing the client or deactivating the window, for
example by switching the window via the TabBox.

A user should always be able to do it therefore without needing to explicitly
break the pointer constrain as in the past with the Esc key.

Therefore remove the functionality and also remove the OSD announcing it,
which was often shown at the wrong time.

Test Plan: Manually and auto test adapted.

Reviewers: #kwin, #vdg, hein

Reviewed By: hein

Subscribers: ngraham, hein, kwin

Tags: #kwin

Maniphest Tasks: T8923

Differential Revision: https://phabricator.kde.org/D15234
2018-09-12 22:55:26 +02:00
Vlad Zagorodniy
74994a7fbd [effects/trackmouse] Allow to use both modifiers and shortcut
Summary:
The Track Mouse effect can be toggled either by pressing modifier keys
and moving mouse or by pressing a shortcut. It's not possible to use
the latter and then the former without changing config.

But there is one caveat, in order to use shortcut, you have to uncheck
all modifier keys. This seems to be not very intuitive.

In addition to that, the KCM allows to change shortcut even if there is
some checked modifier.

As the title says, this change makes possible to use both modifier keys
and shortcut to activate this effect without changing config.

KCM:
{F6237308, layout=center, size=full}

BUG: 398124
FIXED-IN: 5.14.0

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

Reviewed By: #kwin, #plasma, #vdg, davidedmundson

Subscribers: broulik, abetts, ngraham, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D15272
2018-09-12 16:37:05 +03:00