Commit Graph

251 Commits (1193b0da771a5d1042bf2aed0a2727f89ddf488e)

Author SHA1 Message Date
Martin Gräßlin 22c91df2ec Add support for global touchpad swipe gestures
Summary:
This change adds global touchpad swipe gestures to the
GlobalShortcutsManager and hooks up the swipe gestures as defined at the
Plasma Affenfels sprint:
 * swipe up: Desktop Grid
 * swipe down: Present Windows
 * swipe left: previous virtual desktop
 * swipe right: next virtual desktop

The main work is handled by two new classes: SwipeGesture and
GestureRecognizer. This is implemented in a way that it can be extended
to also recognize touch screen gestures and pinch gestures.

The SwipeGesture defines what is required for the gesture to trigger.
Currently this includes the minimum and maximum number of fingers
participating in the gesture and the direction. The gesture gets
registered in the GestureRecognizer.

The events for the gesture are fed into the GestureRecognizer. It
evaluates which gestures could trigger and tracks them for every update
of the gesture. In the process of the gesture tracking the
GestureRecognizer emits signals on the Gesture:
 * started: when the Gesture gets considered for a sequence
 * cancelled: the Gesture no longer matches the sequence
 * triggered: the sequence ended and the Gesture still matches

The remaining changes are related to hook up the existing shortcut
framework with the new touchpad gestures. The GlobalShortcutManager
gained support for it, InputRedirection and EffectsHandler offer methods
to register a QAction. VirtualDesktopManager, PresentWindows and
DesktopGrid are adjusted to support the gesture.

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel

Tags: #plasma_on_wayland

Differential Revision: https://phabricator.kde.org/D5097
2017-03-27 17:43:44 +02:00
l10n daemon script b160c5babb 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"
2017-03-25 04:37:53 +01:00
l10n daemon script 8725f2441e 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"
2017-03-22 05:17:38 +01:00
l10n daemon script 0380027611 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"
2017-02-20 07:43:31 +01:00
l10n daemon script 13d389efd1 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"
2016-12-20 13:30:44 +01:00
Martin Gräßlin 75ab998de8 [effects] Clean up saving of DesktopGrid config
Summary:
The DesktopNameAlignment was once set through the kcfg generated file
and once manually. We don't need the manual double save.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3340
2016-11-15 07:19:52 +01:00
Martin Gräßlin 3c6371390d [desktopgrid] Don't manipulate virtual desktop of desktop window
Summary:
Desktop Grid has a feature that right or middle clicking a window toggles
the on all desktop state. If that is done for a desktop window, things
obviously start to fail.

KWin internally allows to change virtual desktop for all windows, even
for windows like the desktop or docks. Changing in KWin core is not a
solution.

Thus a special casing in desktop grid is added to disallow the selection
for desktop windows.

BUG: 372037
FIXED-IN: 5.8.4

Test Plan: Tried right clicking desktop window and other windows.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3253
2016-11-04 09:32:24 +01:00
Martin Gräßlin 079095beea Adding more frameless hints
The internal window can be decorated really broke a few things...
2016-08-11 08:45:41 +02:00
Sebastian Kügler 746fc49bb6 Revert "desktop grid: zoom hovered window"
Summary:
This reverts commit 14d1fdf63f.

The zoom effect is definitely the wrong way, it's broken (can be
triggered without moving the mouse, expands windows outside of their
allotted area (looks like broken sizing/placement), isn't animated so
feels very choppy, isn't using well-known highlight semantics), the
result is that it feels unnatural and jarring. To be honest, when I
looked at it, I was looking for a bug in the code, e.g. margins not
being taken into account. It didn't come up in me that this could be
wanted behavior, until I read the code.

As to the original commit message: The highlight is useless for this
case, as any window can be dragged or activated, highlighted or not.

What *could* work is to somehow intensify the colors, but that again
would have to be animated, and play well with the ongoing desktop-zoom
animation, the mouse pointer location changes relative to the window, so
it's really complex to get right. I thought of this for a while, I don't
think the complexity that has to be implemented is worth the benefit,
because, what does highlighted really mean here? "window is under the
mouse" isn't a useful metric, as we don't know if the user is changing
desktops or rearranging windows, and "window under mouse" changes
depending on the zoom level, "window can be dragged or activated" also
isn't a useful metric, as I can do that with any window, anyway.

Test Plan: Tested with patch applied, desktopgrid windows don't jump around anymore.

Reviewers: graesslin

Reviewed By: graesslin

Subscribers: plasma-devel

Projects: #plasma

Differential Revision: https://phabricator.kde.org/D1209
2016-03-24 14:52:03 +01:00
Kevin Funk 8ea4f4dae7 Port to CMake AUTOMOC
Summary: Run convert-to-cmake-automoc.pl over all .cpp files

Differential Revision: https://phabricator.kde.org/D882
2016-02-01 21:05:36 +01:00
l10n daemon script bd3083e81f 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"
2016-01-30 09:40:55 +00:00
l10n daemon script aff81afd27 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"
2015-12-30 09:40:57 +00:00
Alex Richardson cc29d0d296 Use SERVICE_TYPES parameter to kcoreaddons_desktop_to_json() 2015-12-09 23:42:45 +00:00
Martin Gräßlin 3e007b5198 [effects] Disable more effects while screen is locked
Most of those effects didn't need special screen locking handling on
X11 as they prevented screen locking. On Wayland though, we don't
want the lock screen shown on a cube.

REVIEW: 126122
2015-11-26 08:30:29 +01:00
Thomas Lübking 12b63e2aa7 remove deleted windows from motionmanagers
Eg. if a window is closed while "timeline.currentValue() == 0",
slotWindowClosed() will shortcut exit and not be removed from the
managers, thus dangle around forever.

Maybe there're other ways for a window to be deleted w/o
the closed slot being entered.

CCBUG: 339970
REVIEW: 126034
2015-11-17 21:30:43 +01:00
Thomas Lübking 3b71411112 desktop grid: allow desktop to cross screens
While the main plasma desktop containment does one
desktop per screen, that does not necessarily hold
for other containments, let alone other desktop shells
2015-10-29 23:36:10 +01:00
Thomas Lübking c2acb5ad63 desktop grid: general cleanup
code cleanups and minor fixes
2015-10-29 23:36:10 +01:00
Thomas Lübking 454f704647 desktop grid: set desktop when moving stickies
Notably on presentwindows invocation, there would
be no point in moving the window otherwise itfp
2015-10-29 23:36:10 +01:00
Thomas Lübking 66ed2d39a0 desktop grid: less branches for isOnAllDesktops
just cleanup, no functional change intended
2015-10-29 23:36:10 +01:00
Thomas Lübking 4a439bd3cf desktop grid: brightness doesn't flicker here
May have been fixed interim?
2015-10-29 23:36:10 +01:00
Thomas Lübking 14d1fdf63f desktop grid: zoom hovered window
To indicate that the window is "active" ie. can
be dragged or activated (like in present windows)
There was either a bug or a forum post complaining
about the inability to activate windows from DG
2015-10-29 23:36:10 +01:00
Thomas Lübking d1cf29f6b2 desktop grid: vector instead of qhash for buttons
They're only traversed and QHash is unordered - so
the worst container. Also we have complete control
over the maintained class, so we can just keep the
mapped EffectWindow there
2015-10-29 23:36:10 +01:00
Thomas Lübking c0e61c3e1a desktop grid: offset buttons from screen edge
mostly aesthetical but also to keep them away
from the (potentially) assigned electric border
2015-10-29 23:36:10 +01:00
Thomas Lübking fbfc573a8a desktop grid: add option to hide buttons
one does indeed not change the desktop count
that often...

BUG: 352588
FIXED-IN: 5.5
REVIEW: 125228
2015-10-29 23:36:10 +01:00
Thomas Lübking 4fc9f44d2a desktop grid: use -/+ text buttons
esp. the list-remove icon looks like "delete" and
can cause worries about what happens to the windows

as a bonus, the buttons now follow the DPI. are a
little smaller (presently might fit touch devices? but
is way to huge on "normal" desktops with ordinary DPI)
and the buttons have nice visible animations on pressing

BUG: 354131
FIXED-IN: 5.5
2015-10-29 23:36:10 +01:00
Thomas Lübking 584850f160 ensure to "hide" desktop buttons
before, hiding the buttons relied on the effect
seeing a paint event for the (with a low timeline
value) what's too wonky at least for instant animations
(certain failure) or when effect exits immediatey
(due to screen edge invocation issues or whatever)

BUG: 351869
FIXED-IN: 5.4.2
REVIEW: 124970
2015-09-14 21:01:22 +02:00
Thomas Lübking 57f8c6d5f8 recreate presentwindows grids from desktopgrid
Theory:
----------
because PresentWindowsEffect::screenCountChanged() is shortcut
for "if (!isActive())", but the desktopgrid doesn't call
PresentWindowsEffect::setActive (or at least
PresentWindowsEffect::screenCountChanged), so the effect can
"miss" the increasing screen count change (it sees the signal,
but ignores it) and when desktopgrid calls it, it assumes the
m_gridSizes array is big enough (but it isn't)

Steps:
----------
1. effects are loaded, 1 screen present
2. 2nd screen gets added, but inactive effects ignore that
3. desktop grid gets activated, updates according to screen count,
   calls presentwindows for screen #2
4. presentwindows data is only prepared for one screen from step 1
   => BOOM

BUG: 351724
CCBUG: 326032
FIXED-IN: 5.4.2
REVIEW: 124960
2015-09-14 21:01:01 +02:00
Thomas Lübking c240f7a012 do the hide-is-move dance w/ desktopgrid buttons
the (old) button effect windows used to be unreferenced
with the re-invocation of the effect. because we stopped
deleting/recreating the window, this approach failed and
the effect window was never deleted.

Unreferencing the window at proper occasion (see new hide
location) coked up - guess what - the exact same "texture is
junk" issue as for the QtQuick close button in present windows...

So we resort to the exact same stupid "hide by moving" solution
as we have there.

BUG: 348577
FIXED-IN: 5.4
REVIEW: 124136
2015-08-15 01:35:24 +02:00
Martin Gräßlin b8e433d0a9 [effects] Properly set the componentDisplayName on the KActionCollection
Without the componentDisplayName the shortcut dialog takes the name of
the application e.g. Systemsettings or "KDE Control Module", but we want
it to be KWin.

REVIEW: 124706
2015-08-12 09:40:55 +02:00
Thomas Lübking c56d64b837 desk grid: do not recreate DesktopButtonsViews
Same issue as with present windows closers: qml is slow
Interestingly "hide" means "hide" here and there're also
no visual artifacts.

BUG: 347339
REVIEW: 123668
2015-05-15 23:55:27 +02:00
Thomas Lübking 0b6a804701 break showingDesktop w/ tabbox/PW/DG
This is now crucial, because while before
(the minimized) windows were conditionally
shown, but are now always behind the desktop.
Also, it makes the tabbox more consistent.

BUG: 344083
REVIEW: 122679
2015-04-07 23:59:17 +02:00
l10n daemon script 262da1b7c9 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"
2015-04-07 13:20:00 +00:00
Elias Probst d00d3ea83c
Deprecate kservice_desktop_to_json(), use kcoreaddons_desktop_to_json() instead.
Get rid of deprecation warnings in effects KCM.

REVIEW: 121957
2015-01-16 22:52:26 +01:00
Thomas Lübking 17ca566154 setup desktopgrid for screencount change
prevents segfaults..

CCBUG: 326032

Forward port of 4fe7460e03f5cd4f64d85d20a6d85ce3a66f4ae8 from kde-workspace
2014-06-04 16:30:29 +02:00
Martin Gräßlin 6e1df6ba62 Do not register dbus service org.kde.kwin.Effects
Let's use org.kde.KWin, we have Object and interface to differentiate.
2014-05-15 10:55:29 +02:00
Martin Gräßlin 5e7d1d586c Adjust effects_builtins for new ki18n
* Use ki18n_wrap_ui for ui files
* define TRANSLATION_DOMAIN in CMakeLists.txt
2014-05-05 08:03:54 +02:00
l10n daemon script 7553c411c2 SVN_SILENT made messages (.desktop file) 2014-05-03 08:32:58 +00:00
l10n daemon script 2f28437e24 SVN_SILENT made messages (.desktop file) 2014-05-02 08:51:14 +00:00
l10n daemon script 2838a9b606 SVN_SILENT made messages (.desktop file) 2014-04-29 10:12:33 +00:00
l10n daemon script 15aa971aab SVN_SILENT made messages (.desktop file) 2014-04-29 04:54:44 +00:00
Martin Gräßlin 21a0cda055 [desktopgrid] Use BuiltInEffects to specify the name of the effect proxy
DesktopGrid uses PresentWindows Effect as a proxy effect. Instead of
hard coding the name of the Effect let's use the name resolving provided
by BuiltInEffects.
2014-04-28 14:18:36 +02:00
Martin Gräßlin 7fcecc616c Drop "kwin4_effect_" prefix for BuiltIn Effects
This removes all the hacks to add kwin4_effect_ to the name of the Effect
and adjusts the desktop files of the effect configuration's parent
component.

Note: the scripted effects still start with kwin4_effect_ prefix.

REVIEW: 117367
2014-04-28 13:52:50 +02:00
Martin Gräßlin 4a1bc2ec96 [effects] Drop the .desktop files for the BuiltIn Effects
All KCMs and KWin core use the BuiltInEffects namespace to find and
interact with the effects. There is no information left in the desktop
file which are of usage. Thus they can be removed.
2014-04-28 13:52:43 +02:00
l10n daemon script e1f418f4d0 SVN_SILENT made messages (.desktop file) 2014-04-28 09:00:35 +00:00
l10n daemon script f44575ddbf SVN_SILENT made messages (.desktop file) 2014-04-28 05:16:52 +00:00
l10n daemon script 69c3289c18 SVN_SILENT made messages (.desktop file) 2014-04-27 21:02:43 +00:00
l10n daemon script e6db000065 SVN_SILENT made messages (.desktop file) 2014-04-04 05:29:27 +00:00
l10n daemon script eef56c98b2 SVN_SILENT made messages (.desktop file) 2014-04-03 05:10:09 +00:00
Martin Gräßlin 3bbc9436db [kwin] Add a virtual Effect::requestedEffectChainPosition
This method replaces the X-KDE-ORDERING property in the Effect's desktop
files. This change is a preparation step for integrating the new Effect
Loader which doesn't read the ordering information. Thus it needs to be
provided by the Effect itself so that the EffectsHandler can properly
insert it into the chain.

Also for the built-in Effects on the long run it doesn't make much sense
to install the desktop files. And binary plugin effects will migrate to
json metadata which also doesn't have the KService::Ptr. Thus overall it
simplifies to read this information directly from the Effect.
2014-03-28 14:04:54 +01:00
Martin Gräßlin 77fff7af6a [kwin] Port away from deprected KCoreConfigSkeleton::readConfig
Most is just switched to the ::read(). That should be enough for all the
Effects which have a KSharedConfig::Ptr underneath. If not we just need
to find a good place to put the reload.
2014-03-25 16:29:03 +01:00