Commit Graph

16291 Commits (6072b0cd6c370749f28418f22a1284de5aba3462)

Author SHA1 Message Date
David Edmundson 7b65aa9199 [libkwineffects] Remove broken copy constructor of AniData
This doesn't copy everything, it misses the ID which breaks
everything.

Given it's just a direct copy of members the auto-generated one does a
better job
2018-07-31 12:29:00 +01:00
l10n daemon script d143036702 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-07-31 05:47:10 +02:00
Vlad Zagorodniy cb820d8966 [effects] Move the Wobby Windows effect to the Candy category
Summary:
The Wobby Windows effect is more a "candy" rather than a standard effect,
so it makes more sense to move it to the Candy category.

Test Plan:
Opened the Desktop Effects KCM, the Wobby Windows effect is in the Candy
category:

{F6160383, layout=center, size=full}

Reviewers: #kwin, #plasma, #vdg, ngraham, broulik

Reviewed By: #plasma, #vdg, ngraham, broulik

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D14455
2018-07-30 11:59:44 +03:00
Vlad Zagorodniy 89b3da58fc [effects] Edit description of the Logout effect
Reviewers: #kwin, broulik

Reviewed By: broulik

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D14461
2018-07-30 11:59:17 +03:00
Vlad Zagorodniy d8288012f0 [effects] Edit description of the Glide effect
Reviewers: #kwin, broulik

Reviewed By: broulik

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D14460
2018-07-30 11:58:40 +03:00
Vlad Zagorodniy 756d4e6e3f Use explicit Chain type in the focus chain
Summary: The explicit Chain type makes code more cleaner.

Test Plan: Still compiles.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D14431
2018-07-30 11:23:43 +03:00
l10n daemon script 6adc20dca6 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-07-30 07:40:40 +02:00
l10n daemon script d51ad9f787 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-07-30 07:15:27 +02:00
l10n daemon script 85eec90c23 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-07-30 05:27:08 +02:00
Vlad Zagorodniy c7298b24e6 [effects] Put Window Aperture and eye On Screen in an exclusive category
Summary:
Having these two enabled doesn't make sense. Also, Window Aperture + eye
On Screen looks really weird.

Test Plan:
Opened the Desktop Effects KCM, both the Window Aperture effect and the
eye On Screen effect are in an exclusive category:

{F6160394, layout=center, size=full}

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

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

Subscribers: ngraham, davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D14456
2018-07-29 17:46:14 +03:00
Roman Gilg 054ccc3898 Use locked cursor position hint
Summary:
Listen for cursor position hint changes and set cursor position to the hint
on unlock if a valid position hint was set.

Test Plan: With pointer constraints test app.

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: graesslin, kwin

Tags: #kwin

Maniphest Tasks: T4693

Differential Revision: https://phabricator.kde.org/D14176
2018-07-27 17:19:33 +02:00
Alistair Francis d7a1e33683 [kcmkwin/kwindecoration] Add missing QT include
Summary: Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D14173
2018-07-26 10:04:41 -07:00
Alistair Francis d723ce2c40 [kcmkwin/kwindecoration] Add missing QT include
Summary: Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D14173
2018-07-26 10:01:41 -07:00
Vlad Zagorodniy 6a7e780d74 [effects] Rewrite the Glide effect
Summary:
There are several reasons why I "re-wrote" the Glide effect:
* it doesn't work correctly because it suffers from undesired perspective distortions: {F5914378}
   The worst part is that windows are distorted so much on multiple monitor setups that it's hard to say whether that's glide animation.
* window close animation is not quite intuitive: if the close button is
  located at the top and I click it, I would expect that window is
  rotated around the bottom edge, not the top; (IMHO)
* it's too much distracting when working on something for quite good
  amount of time: e.g. when editing photos, which involves a big number
  of different dialogs;
* there are issues with deletion of QTimeLine;
* windows are not gracefully released if some other effect grabs them;
* its code doesn't follow common coding style in KWin.

So, the "new" Glide effect is more subtle, it's possible to have
different rotation edges for window open/close animations, it doesn't
animate special windows(like audio volume feedback), the code is simpler
and readable. Yet, there are some issues with QTimeLine, which are
common to all effects in KWin anyway.

### Demos

{F5889803}
//Window Open Animation//

{F5889804}
//Window Close Animation//

{F5889805, layout=center, size=full}
//KCM//

CCBUG: 394245

Test Plan:
* Enabled the Glide effect
* Closed System Settings
* Opened it again

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

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

Subscribers: ngraham, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D13338
2018-07-24 22:10:10 +03:00
René J.V. Bertin df802d49a1 Require KDecoration >= 5.13.0 .
Differential Revision: https://phabricator.kde.org/D14320
2018-07-24 13:58:10 +02:00
Vlad Zagorodniy 7785c19f11 [effects/slidingpopups] Use single QHash to store animations
Summary:
This patch intends to simplify "management" of animations and reduce
QHash abuse.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D14096
2018-07-23 16:34:29 +03:00
Vlad Zagorodniy 82ab1d1ecd [effects/slidingpopups] Unconditionally force background contrast
Summary: Force background contrast same way blur is forced.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D14092
2018-07-23 16:33:53 +03:00
l10n daemon script 8dfd4c04dd 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-07-23 07:12:23 +02:00
l10n daemon script 3b3aa82f58 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-07-23 05:24:40 +02:00
l10n daemon script 3eaf1a9972 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-07-22 07:44:41 +02:00
Vlad Zagorodniy 9cff6c21f3 [effects/slide] Fix coding style
Summary:
Kdelibs coding style states the following about whitespace placement:

> For pointers or references, use a single space before '*' or '&', but not after

Source: https://community.kde.org/Policies/Kdelibs_Coding_Style#Whitespace

Also, putting a whitespace after ! is not common in KWin.

Test Plan: Switched between virtual desktops.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D14260
2018-07-21 14:44:37 +03:00
Vlad Zagorodniy 59e3e21c47 [effects/sheet] Drop IsSheetWindow hack
Summary:
When the Sheet effect was written, isModal worked only for Client
windows, not Deleted windows:

    bool EffectWindowImpl::isModal() const
        {
        if( Client* c = dynamic_cast< Client* >( toplevel ))
            return c->isModal();
        return false;
        }

so the Sheet effect had to track windows by using WindowInfo class, e.g.

    class WindowInfo
        {
        public:
            bool deleted;
            bool added;
            bool closed;
        };

the biggest drawback of that method is that WindowInfo for each modal kept around
as long as those modals existed. It also was adding little overhead, e.g.

    void SheetEffect::paintWindow( EffectWindow* w, int mask, QRegion region, WindowPaintData& data )
        {
        if( windows.contains( w ) && ( windows[ w ].added || windows[ w ].closed ) )

Things changed with a8160b3c31afa1db24084147ad4ce50cf3c0314a. With that
commit, WindowInfo kept only for modals that are currently being
animated, but isModal still worked only with Client windows, so
IsSheetWindow hack had been introduced.

Long story short: we don't need IsSheetWindow hack anymore because
isModal now works with Deleted windows.

Test Plan: Pressed Ctrl+O in Kate.

Reviewers: #kwin, graesslin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D14246
2018-07-21 10:44:18 +03:00
Roman Gilg afc80f8bd5 Call workspaceEvent and updateX11Time only once per event
Summary:
On Wayland processXcbEvents calls workspaceEvents and updateX11Time but this
is already done in the native event filter.

Test Plan:
Manual test shows Xwayland still works and constant calls to
XcbEventFilter::nativeEventFilter are processed.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D14215
2018-07-20 18:15:56 +02:00
David Edmundson 5575a5274c Merge branch 'Plasma/5.13' 2018-07-19 09:41:44 +01:00
David Edmundson a362a67989 Don't remove outputs during page flip
Summary:
To do so leaves a dangling pointer on our pageFlipHandler

BUG: 396272

Test Plan: Wobbled a window whilst plugging a monitor in and out

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: anthonyfieroni, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D14210
2018-07-19 09:41:08 +01:00
David Edmundson 9f2f6d9657 Don't remove outputs during page flip
Summary:
To do so leaves a dangling pointer on our pageFlipHandler

BUG: 396272

Test Plan: Wobbled a window whilst plugging a monitor in and out

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D14210
2018-07-18 16:05:59 +01:00
Vlad Zagorodniy 653e98d5ac [libkwineffects] Deprecate Outline feature
Summary:
KWin had Outline effect during KDE SC times, which had been removed in
KDE SC 4.11. With that effect, also showOutline and hideOutline signals
had been removed, making it impossible to write effects that show
outline. Yet, Outline enum value had been left.

Even though the Outline feature is useless nowadays, in order to keep API
compatibility, let's just deprecate it.

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D14188
2018-07-17 18:09:31 +03:00
Roman Gilg f0ba436c72 Explicitly disable pointer constraints on TabBox invocation
Summary:
Pointer constraints should become disabled when the TabBox is invoked. Since
the current client stays activated while TabBox is enabled and currently can
not be deactivated with the risk of regression as discussed in D13758, disable
all pointer constraining explicitly and enable it again when the TabBox is
closed.

Test Plan: Manually in Wayland session.

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: kwin

Tags: #kwin

Maniphest Tasks: T8923

Differential Revision: https://phabricator.kde.org/D14142
2018-07-16 10:43:25 +02:00
Vlad Zagorodniy dc541452f1 Merge branch 'Plasma/5.13' 2018-07-15 23:05:30 +03:00
Vlad Zagorodniy 1e4703a719 [wayland] Confine pointer to screen geometry
Summary:
If the new pointer position is "off screen", PointerInputRedirection
just ignores that new position. So, pointer remains on its previous
position. In some particular cases, like reaching default panel, it
degrades desktop experience because one have to slowly move pointer in
order to reach what he/she wants.

This change addresses that problem by confining the new pointer position
to screen geometry.

BUG: 374867
FIXED-IN: 5.13.4

Test Plan: Ran tests

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D14036
2018-07-15 23:05:11 +03:00
l10n daemon script 18507d7129 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-07-15 07:03:16 +02:00
l10n daemon script 7f398af180 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-07-15 05:21:01 +02:00
Vlad Zagorodniy 4aa19c2e91 [effects/magiclamp] Eliminate unnecessary reallocations
Summary:
The maximum size of `newQuads` is known in advance, so we can avoid
unnecessary reallocations when adding transformed window quads to
`newQuads`.

Test Plan: Minimized/unminimized System Settings.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D14117
2018-07-15 01:41:37 +03:00
Vlad Zagorodniy 049c6e0966 [effects/slidingpopups] Use range-based for loops
Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D14086
2018-07-14 22:06:28 +03:00
Vlad Zagorodniy a63c9ab319 [effects/slidingpopups] Reserve enough memory for filtered quads
Summary: That's to avoid unnecessary reallocations.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D14085
2018-07-14 22:04:25 +03:00
Vlad Zagorodniy 461aace55f [effects/slidingpopups] Fix possible segfault
Reviewers: #kwin, mart, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D14087
2018-07-13 19:56:19 +03:00
Vlad Zagorodniy 4e1e22c76d [effects/slidingpopups] Simplify math in setupAnimData
Summary:
Also, this change fixes "possible bug" when sanitizing offset for
East/South(Right/Bottom) location.

QHash abuse will be fixed in the follow-up patches.

Reviewers: #kwin, mart, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D14088
2018-07-13 14:31:21 +03:00
Vlad Zagorodniy 2d1afb809c [effects/slidingpopups] Delete unused prePaintScreen method
Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D14091
2018-07-13 11:08:31 +03:00
l10n daemon script 67826c1a68 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-07-13 07:09:05 +02:00
l10n daemon script 2b657feb29 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-07-13 05:26:08 +02:00
l10n daemon script ff646f2bc0 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-07-12 07:30:51 +02:00
l10n daemon script 8dd23c5054 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-07-12 07:07:30 +02:00
l10n daemon script 835181f3ca 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-07-12 05:15:22 +02:00
Vlad Zagorodniy d0ceaf4c70 [effects/slide] Clean up
Summary:
* Reorder and sort includes
* Use EffectWindowList
* Fix namespace comments

(this change doesn't add any useful features or bug fixes)

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D13979
2018-07-11 17:06:59 +03:00
Vlad Zagorodniy c69a16b914 Merge branch 'Plasma/5.13' 2018-07-11 16:42:09 +03:00
Vlad Zagorodniy 0c3047a8f1 [effects/desktopgrid] Don't change activities
Summary:
If the Desktop Grid effect doesn't use the Present Windows effect to
layout windows, windowAt helper can return a window that doesn't belong
to current activity because it doesn't check whether that window belongs
to current activity.

This change addresses that problem by adding corresponding check.

BUG: 301447
FIXED-IN: 5.13.4

Test Plan:
//Unchecked "Use Present Windows effect to layout the windows".//

* Switched to activity #1
* Switched to virtual desktop #1
* Launched Konsole and maximized it(to increate hit area)
* Switched to activity #2
* Switched to virtual desktop #2
* Launched Dolphin and maximized it
* Activated the Desktop Grid effect, clicked on virtual desktop #1 (activity #2 is still active)
* Switched to activity #1
* Activated the Desktop Grid effect, clicked on virtual desktop #2 (activity #1 is still active)

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D14046
2018-07-11 16:39:48 +03:00
Vlad Zagorodniy 91e69e3fbd [libkwineffects] Use more std::transform in implementation part
Summary: These two should have been in D13821 but I missed them somehow.

Test Plan:
* Ran `qdbus org.kde.KWin /Effects loadedEffects`

* Ran the following Python script

```lang=python
import dbus

bus = dbus.SessionBus()

effects_object = bus.get_object('org.kde.KWin', '/Effects')
effects_iface = dbus.Interface(
    effects_object,
    dbus_interface='org.kde.kwin.Effects'
)

names = (
    'slide',
    'pizza',
    'cube'
)

supported_statuses = effects_iface.areEffectsSupported(names)

for name, supported in zip(names, supported_statuses):
    print("%s: %s" % (name, supported))
```

Got the following output:

```
slide: 1
pizza: 0
cube: 1
```

Reviewers: #kwin, mart

Reviewed By: #kwin, mart

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D14002
2018-07-11 02:43:39 +03:00
Vlad Zagorodniy 81d851f6aa [libkwineffects] Use std::copy
Summary: Don't use raw loop, use an algorithm from STL to copy effect pairs.

Test Plan: Effects are still working.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D14004
2018-07-10 17:22:14 +03:00
Bhushan Shah 45ecac676d Update version number for 5.13.3
GIT_SILENT
2018-07-10 09:39:02 +00:00
Vlad Zagorodniy f48cf072f9 [kcmkwin/kwindesktop] Use PackageLoader to get effect metadata
Summary:
`KPluginInfo(KService::Ptr)` is deprecated in favor of using plugin
loaders.

Test Plan:
* Go to System Settins -> Desktop Behavior > Virtual Desktops
* Open Switching tab
* Select Fade desktop
* Click the info button

Reviewers: #kwin, apol, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D13851
2018-07-06 17:15:23 +03:00