Commit graph

15116 commits

Author SHA1 Message Date
l10n daemon script
c0be6a45f0 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-01-21 09:00:54 +01:00
l10n daemon script
add47b39fe 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-01-21 06:45:37 +01:00
Albert Astals Cid
060fadee09 Merge remote-tracking branch 'origin/Plasma/5.9' 2017-01-21 00:17:50 +01:00
Albert Astals Cid
73c7c767ef Merge remote-tracking branch 'origin/Plasma/5.8' into Plasma/5.9 2017-01-21 00:17:14 +01:00
Rafał Szalecki
a43049f688 Fixed initial graying out options in Cube Effect settings
Typically after deselecting "Show caps" option, the associated options "Cap color" and "Display image on caps" are grayed out (triggered by signal). The bug was when Desktop Cube settings were closed and opened again then the options were not grayed out.

Succesfully compiled and tested by deselecting "Show caps" option in Desktop Cube settings, closing the settings window and opening it once again. The options "Cap color" and "Display image on caps" were then grayed out.

REVIEW: 129194
2017-01-21 00:16:30 +01:00
Marco Martin
89117c695d Merge branch 'Plasma/5.9' 2017-01-20 15:35:59 +01:00
Marco Martin
405518c41d use proper packagestructures
Summary:
as the plasmapkg2 utility is dead, scripts and tabboxes couldn't
be installed anymore, as plasmapkg2 was launched with an hardcoded
package type (and had a bunch of custom code for it)
and no packagestructure for the relevant package types existed.

the port of scripts and tabboxes to kpackage in kwin is quite
incomplete and somewhat strange (given the fact that was started by
looking manually for the file as it couldn't link to libplasma)

this makes things a bit better as now scripts and tabboxes have an actual
package structure, making it installable by kpackagetool5.
in the future, the port should be completed and replace all the manual lookup
of files with package::filePath as it should work now given that valid
structures exist

BUG:374766

Test Plan:
tabbox plugins and kwin scripts can be installed from knewstuff
again and can be successfully loaded

Reviewers: #plasma, graesslin, subdiff

Reviewed By: #plasma, graesslin

Subscribers: graesslin, plasma-devel, kwin, #kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D4202
2017-01-20 15:34:56 +01:00
Martin Gräßlin
f2f9aea11e [autotests] Fix LockScreenTest::testKeyboardShortcut
32f4e115e2 broke the test. To my
surprise there was a test using the kwin internal shortcut handling
instead of using KGlobalAccel.

This change adjusts the test to go through KGlobalAccel for testing
the global shortcut.
2017-01-18 20:24:17 +01:00
Martin Gräßlin
d6c0a5414e Split implementation of keyboard layout handling into a dedicated class
Summary:
So far the implementation of keyboard layout handling was split between
KeyboardInputRedirection and Xkb. KeyboardInputRedirection registered
the global shortcut and did the handling for layout switch and config
changes. Xkb did the notification on layout change.

Layout changes can nowadays be detected through an InputEventSpy. It
can only happen after a key change or an explicit layout switch. Thus
it does not need to be in Xkb anymore which allows to reduce Xkb to
only care about the Xkb keymap and state tracking.

This change introduces a new class KeyboardLayout which is an
InputEventSpy and takes over the task of the layout change notification
from Xkb and the layout management from KeyboardInputRedirection. Thus
everything related to management of keyboard layout is together in one
class.

This allows in future to add unit test to it (requires further cleanup
of Xkb to be able to use it and drop the InputRedirection dependency) and
opens the possibility to also take over keyboard layout management on X11
for the Plasma desktop.

Test Plan: Manual testing

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D4135
2017-01-18 17:52:45 +01:00
Martin Gräßlin
437edb45ca Use an InputEventSpy to notify about key and modifier state changes
Summary:
Instead of emitting the key state changed and modifier state changed
signals from the right point before processing the events, let's use
an InputEventSpy to do that. The spies were introduced to be called
directly before the event processing. So the contract still holds.

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D4128
2017-01-18 16:38:30 +01:00
Martin Gräßlin
32f4e115e2 Drop KWin's internal global shortcut handling
Summary:
During the Wayland porting a KWin internal global shortcut handling got
implemented prior to the porting of KGlobalAccel. This allowed to trigger
global shortcuts with a KGlobalAccel still on X11 and unknown to KWin.

Nowadays KWin directly provides KGlobalAccel, thus it's no longer
required. The code was runtime dead as we always have a KGlobalAccel.

Reviewers: #plasma, #kwin

Subscribers: plasma-devel

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D4165
2017-01-17 17:09:42 +01:00
Martin Gräßlin
2904d4a0be Move X11 specific KGlobalAccel handling into the x11-standalone platform
Summary:
InputRedirection has a workaround to add a connect on a QAction which
is used for a global shortcut. This is specific to the X11 platform as
the xtime needs to be updated.

This change adds a new virtual method to the Platform and moves the
implementation into the X11 standalone platform. Thus it does no longer
gets called on Wayland.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D4168
2017-01-17 17:01:32 +01:00
David Edmundson
516eb822dd Merge branch 'Plasma/5.9' 2017-01-17 13:47:15 +00:00
David Edmundson
3ba1d9c405 Parse minimise all borders on the JS side
Summary:

Test Plan:

Reviewers:

Subscribers:

Differential Revision: https://phabricator.kde.org/D4113
2017-01-17 13:46:17 +00:00
Roman Gilg
5baf75d11e Merge branch 'Plasma/5.9' 2017-01-16 19:27:32 +01:00
Roman Gilg
1f69c6ed6e Merge branch 'Plasma/5.8' into Plasma/5.9 2017-01-16 19:19:34 +01:00
Roman Gilg
e019c9f61e [TabBox] Remember current model index on SwitcherItem model set
In case we need to set the SwitcherItem model in
`TabBoxHandlerPrivate::show()`, remember the current index row,
otherwise it gets reset to the first item.

Reviewers: #kwin, graesslin

Tags: #kwin

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

BUG: 333511
2017-01-16 19:11:07 +01:00
l10n daemon script
81a4156faf 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-01-16 07:52:59 +01:00
l10n daemon script
1ddcf8645f 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-01-16 06:10:12 +01:00
l10n daemon script
516ad25658 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-01-15 07:48:05 +01:00
l10n daemon script
6b593b5b53 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-01-15 06:12:16 +01:00
Martin Gräßlin
c36b79345d Merge branch 'Plasma/5.9' 2017-01-13 19:53:04 +01:00
Martin Gräßlin
00c68891c7 Add support for skipCloseAnimation for internal windows
Summary:
We need this to use the new OnScreenNotification in the screenshot
effect.

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D4089
2017-01-13 19:50:50 +01:00
David Edmundson
1453cc352b Merge branch 'Plasma/5.9' 2017-01-13 15:23:04 +00:00
David Edmundson
ddae039802 Correct inital loading of BorderActivate
Summary:
We have a comma separated list:

"".split(',') returns ""
JS decides that's worth itterating over, and we implicitly cast "" to a
number which means we register on screen edge 0 (the top).

We can't use typeof or isFinite because valid entries are still strings
at this point.

Test Plan:
Ran with default config, no longer registered on top edge
Set an edge properly in the KCM. Still worked.

Reviewers: #plasma, mart

Reviewed By: mart

Subscribers: mart, plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D4113
2017-01-13 15:21:15 +00:00
David Edmundson
c9a58d036d Merge branch 'Plasma/5.9' 2017-01-12 21:16:14 +00:00
David Edmundson
84dd7d53ce Add minimize all to screen edges KCM
as dicussed in https://phabricator.kde.org/D2972 but not pushed with it.
2017-01-12 21:15:37 +00:00
Jonathan Riddell
a7fc7c1e64 Update version number for 5.9.90
GIT_SILENT
2017-01-12 15:36:40 +00:00
Jonathan Riddell
4d3f6862bc Update version number for 5.8.95
GIT_SILENT
2017-01-12 11:36:23 +00:00
Roman Gilg
ffa60dfef1 [libinput] Connection helper class for DBus connection
Create auxiliary class for Connection class in order to connect to DBus
from main thread.

Reviewers: #kwin, davidedmundson, graesslin

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D4081
2017-01-12 08:16:04 +01:00
Kai Uwe Broulik
93938d60b8 Restore global menu support
This brings back global menu support in KWin.
The DBusMenu infrastructure is different that we just read the DBus service name and
menu object path from the windows rather than passing around window IDs on DBus which
won't work on Wayland.

Differential Revision: https://phabricator.kde.org/D3089
2017-01-11 10:21:03 +01:00
Martin Gräßlin
e616925fb0 [autotests/integration] Add test case for touch and decoration
The test for touch points is extended for decorated windows and as
the test shows the client pos offset is not considered correctly.

CCBUG: 374778
2017-01-10 19:27:42 +01:00
Roman Gilg
b868df2715 [libinput] Fix threaded Connection DBus object registering
On registering object use the object in the right thread.
Otherwise there are multiple errors.

BUG: 374554

Differential Revision: https://phabricator.kde.org/D4027
2017-01-09 09:07:05 +01:00
l10n daemon script
e322a025f0 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-01-09 06:04:42 +01:00
l10n daemon script
006d127b09 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-01-07 06:37:50 +01:00
Martin Gräßlin
80adfd0274 Fade out OnScreenNotification when moving with the mouse over it
Summary:
This change triggers a fade out animation when the mouse is moved over
the OnScreenNotification, thus revealing the windows underneath. When
moving the mouse out of the OnScreenNotification it gets faded in again.

This is useful for various cases, e.g. when picking a color and the pixel
one wants to pick is underneath the notification, or when trying to kill
a window...

Test Plan: Manual testing in nested setup

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3964
2017-01-04 18:04:15 +01:00
Martin Gräßlin
6a78bd45fe Fix syncing of geometry to internal window when using ::move
Summary:
The OnScreenNotification gets moved during its placement. This update
of the geometry did not get synced to the QWindow's geometry as it
should.

The reason for this is the rather special implementation of
AbstractClient::move. This just modifies the geom variable and does not
call into setGeometry at all. Instead a virtual doMove method is invoked
to inform the platform specific client implementation about the move of
the window. For a "normal" ShellClient that is fine - there is nothing
to do.

This change adds an implementation of doMove in ShellClient to sync the
geometry to the internal window. This is not yet enough to fix the
geometry of the OnScreenNotification. It gets placed with a
GeometryUpdatesBlocker in place causing the doMove never to be called.
Instead setGeometry is invoked again when the geometry updates get
unblocked. So far ShellClient did not do anything in this case. This
change ensures that at least the doSetGeometry method is performed again.

Test Plan: Added test case and manual testing of OnScreenNotification

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3963
2017-01-04 18:00:24 +01:00
Martin Gräßlin
0a042dad69 Sync opacity from an internal QWindow to its ShellClient
Summary:
This change adds support for opacity on a KWin internal QWindow.
Calling QWindow::setOpacity syncs the value to the ShellClient
representation of the QWindow.

This is needed for fading out the OnScreenNotification on mouse
over.

Test Plan: Added auto test and manual test

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3928
2017-01-03 07:35:54 +01:00
Martin Gräßlin
5ab7b7e41e Fix typo 2017-01-02 20:13:30 +01:00
Martin Gräßlin
4db535db07 Use a templated approach for InputRedirection::processFilters
Summary:
An improvement from the introduction of InputEventSpy. Instead of
specifying a std::function as argument, we let the compiler decide what
is the best argument.

Reviewers: #kwin, #plasma, mart

Reviewed By: mart

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3877
2017-01-02 20:08:05 +01:00
Martin Gräßlin
a8db967505 Use removeOne when uninstalling an InputEventFilter
Summary:
Adjusting to a difference from introducing the InputEventSpy. A filter
may only be installed once. Thus removeOne is totally sufficient.

Added a Q_ASSERT to ensure that it is not installed when installing.

Reviewers: #kwin, #plasma, mart

Reviewed By: mart

Subscribers: mart, plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3878
2017-01-02 19:55:08 +01:00
Martina Flöser
9cc7d12158 Replaced InputEventFilter by InputEventSpy in DebugConsole
Summary:
As explained in 84e3308149
the DebugConsole should use an InputEventSpy instead of an InputEventFilter.

Reviewers: kwin, graesslin

Reviewed By: graesslin

Subscribers: graesslin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3879
2017-01-01 19:06:46 +01:00
Martin Gräßlin
a9ac70f007 It makes sense to actually also build the new input_event_spy.cpp
Sometimes C++ surprises me. How could that compile without being in
the build set?
2016-12-30 19:32:47 +01:00
Martina Flöser
a68e77a711 Add native button to MouseEvent
Summary:
This adds the nativeButton to the MouseEvent allowing the InputEventSpy
to use this information. Also the InputEventFilter can be adjusted to
make use of it.

Reviewers: #kwin

Subscribers: graesslin, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3875
2016-12-30 19:07:45 +01:00
Martin Gräßlin
84e3308149 Introduce an InputEventSpy for processing input events
Summary:
So far KWin's input event processing is mostly based on
InputEventFilters. A filter can - as the name suggest - filter out an
input event from further processing. Our code shows that this is not
sufficient for all input event processing.

We have several areas inside KWin where we need to have access to all
input events, where the processing needs to happen on all events and
filtering is not allowed. This results in sub-optimal code which has
classes which know too much and do too much.

Examples:
 * key-repeat handling done in KeyboardInputRedirection
 * Layout change OSD in Xkb
 * modifier only shortcuts in Xkb
 * emitting signals for Cursor class in KeyboardInputRedirection

Also there are misuses of the InputEventFilters and internal API
 * DebugConsole keyboard state (uses wrong information)
 * DebugConsole input events tab (uses Filter, should be a spy)

This change introduces the API needed to fix these problems. It
introduces an InputEventSpy which is modelled after the InputEventFilter
with the difference that it has only void messages and uses the KWin
introduced event classes.

The spies are always processed prior to the filters, thus we know it can
have all events.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3863
2016-12-30 18:29:40 +01:00
l10n daemon script
d523c91fc4 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-29 14:44:24 +01:00
Martin Gräßlin
58361213de Add the modifiers relevant for global shortcuts into the input Events
Summary:
Prior to this change various event filters performed deep calls into
Xkb class to figure out the modifiers relevant for global shortcuts (aka
consumed modifiers). This shows that this is a general useful
information which should be available to all input event filters
directly.

Thus it's now added to the input events and exposed directly in
InputRedirection so that the calls into Xkb are no longer needed.

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3810
2016-12-27 18:19:15 +01:00
Martin Gräßlin
d1fdb9a02f Use new xkbcommon API for consumed modifiers
Summary:
This change removes the workaround added with
421824b654.

Xkbcommon 0.7 introduces the needed API to make this work without a
workaround.

Test Plan: Test case still passes

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3809
2016-12-27 18:18:17 +01:00
Martin Gräßlin
e3d79cdda6 Reduce code duplication for processing input events
Summary:
For every input event we have similar code. We go through all
InputFilters, invoke a method with some arguments and check whether
the filter returns true.

Instead of duplicating that logic everywhere, there is now one method
in InputRedirection which takes a std::function to call on the input
filters. The std::function is supposed to be generated with a std::bind
on the InputFilter::method with all the required arguments.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3806
2016-12-27 17:38:32 +01:00
Martin Gräßlin
bba18a1ba8 Fix the osd re-placement on X11
Summary:
6383f83047 introduced a regression hitting
an assert on X11 when an osd window is added.

This change tries to address this by adding a GeometryUpdateBlocker
around the change. The hit assertion is:

    pendingGeometryUpdate() == PendingGeometryNone ||
    areGeometryUpdatesBlocked()

By using a GeometryUpdateBlocker the second condition becomes true
and we no longer hit the condition.

BUG: 374038

Test Plan:
Manual tested both on X11 and Wayland, Wayland autotest
still passes

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3808
2016-12-27 17:36:32 +01:00