kwin/autotests
Martin Gräßlin 07c6878ff0 Introduce a KWin internal on-screen-notification service
Summary:
Recently we noticed that there are multiple areas where KWin needs to
inform the user about how to operate. Examples are:
* Screenshot
* ColorPicker
* Pointer constraint enabled
* Pointer constraint about to be removed
* Kill Window

For Screenshot and ColorPicker we used an EffectFrame to render it. But
this is not an optimal solution as it's lacking many features we would
need. We cannot properly use it from within KWin core, we cannot
implement features like hide on mouse over, etc. etc.

This change introduces an OnScreenNotification which supports:
* showing an icon
* showing a message
* timeout

It is Qml styled, so that it can be easily adjusted. This is a big
improvement over the EffectFrame solution. The Qml file creates a Plasma
Dialog of type OSD. Thus KWin places it like the normal OSD windows and
also looks kind of similar. In the case of KWin the focus is more on the
message, than an icon, so the icon is placed left of the text.

While the OnScreenNotification is supposed to be used like a singleton,
it doesn't use the KWin singleton pattern. Instead a small wrapper
namespace OSD is introduced which provides a convenient API for KWin
internal areas to show/hide the notification. By not using the KWin
singleton pattern, the OnScreenNotification does not depend on any other
parts of KWin and can be easily unit-tested.

A few features are still missing and will be added in further commits:
* hide-out on mouse over
* optional skip close animation (needed for screenshot)
* X11 support (not that important as it's mostly for Wayland features)

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3723
2016-12-21 19:43:49 +01:00
..
integration Place OSD windows again on size changes 2016-12-21 19:24:57 +01:00
libinput [libinput] Change unset of scroll method and acceleration profile 2016-12-06 13:45:54 +01:00
libkwineffects [libkwineffects] Port getXServerVersion from X11 to xcb 2016-08-23 11:45:59 +02:00
libxrenderutils [autotests] Add missing add_test() 2016-09-08 15:24:21 +02:00
tabbox Support highlighting windows through EffectsHandlerImpl 2016-09-13 08:36:12 +02:00
abstract_client.h [autotests] Adjust to changes regarding AbstractClient 2015-05-08 12:43:47 +02:00
client.h [auto-tests] Add an initial test for Screens 2014-09-17 10:29:03 +02:00
CMakeLists.txt Introduce a KWin internal on-screen-notification service 2016-12-21 19:43:49 +01:00
fakeeffectplugin.cpp [kwin] Add a PluginEffectLoader 2014-03-28 14:04:54 +01:00
fakeeffectplugin.json PluginEffectLoader doesn't use KPluginTrader any more 2015-07-07 09:36:15 +02:00
fakeeffectplugin_version.cpp [kwin] Adapt to KPluginFactory change 2014-03-28 19:50:46 +00:00
fakeeffectplugin_version.json PluginEffectLoader doesn't use KPluginTrader any more 2015-07-07 09:36:15 +02:00
mock_abstract_client.cpp Add hint similar to autohide to raise/lower a window 2015-10-12 10:37:16 +01:00
mock_abstract_client.h Implement show on screen edge for Wayland 2016-10-05 07:51:47 +02:00
mock_client.cpp Add hint similar to autohide to raise/lower a window 2015-10-12 10:37:16 +01:00
mock_client.h Implement show on screen edge for Wayland 2016-10-05 07:51:47 +02:00
mock_effectshandler.cpp [kwin] Introduce a new Effect Loading mechanism 2014-03-28 14:04:54 +01:00
mock_effectshandler.h Add interactive position selection to screenshot screen under cursor 2016-11-25 07:38:37 +01:00
mock_screens.cpp Warnings--: unused parameters 2015-06-12 17:17:21 +02:00
mock_screens.h add Screens::name(int screen); STUB but for XRandr 2015-05-15 23:55:27 +02:00
mock_workspace.cpp [autotests] Adjust to changes regarding AbstractClient 2015-05-08 12:43:47 +02:00
mock_workspace.h [autotests] Adjust to changes regarding AbstractClient 2015-05-08 12:43:47 +02:00
onscreennotificationtest.cpp Introduce a KWin internal on-screen-notification service 2016-12-21 19:43:49 +01:00
onscreennotificationtest.h Introduce a KWin internal on-screen-notification service 2016-12-21 19:43:49 +01:00
test_builtin_effectloader.cpp [effects] Add a colorpicker effect 2016-11-25 09:30:34 +01:00
test_client_machine.cpp Remove KWin::display from kwinglobals 2016-11-16 18:00:00 +01:00
test_plugin_effectloader.cpp [effects] Add a colorpicker effect 2016-11-25 09:30:34 +01:00
test_screen_edges.cpp Remove KWin::display from kwinglobals 2016-11-16 18:00:00 +01:00
test_screen_paint_data.cpp Pass the current output geometry to ScreenPaintData 2016-10-17 09:02:30 +02:00
test_screens.cpp Port left over qDebug to qCDebug 2015-07-31 13:25:51 +02:00
test_scripted_effectloader.cpp [effects] Add a colorpicker effect 2016-11-25 09:30:34 +01:00
test_virtual_desktops.cpp VirtualDesktopGrid operates on VirtualDesktop objects 2016-11-15 07:20:23 +01:00
test_window_paint_data.cpp Remove the decoration opacity property 2014-08-25 17:25:04 +02:00
test_xcb_size_hints.cpp Remove KWin::display from kwinglobals 2016-11-16 18:00:00 +01:00
test_xcb_window.cpp Remove KWin::display from kwinglobals 2016-11-16 18:00:00 +01:00
test_xcb_wrapper.cpp Remove KWin::display from kwinglobals 2016-11-16 18:00:00 +01:00
test_xrandr_screens.cpp Support multiple event types in X11EventFilter 2016-11-16 07:48:19 +01:00
testutils.h [autotests] Add Q_CONSTRUCTOR_FUNCTION to X11 specific tests to force xcb 2016-09-08 15:22:48 +02:00
workspace.h [auto-tests] Add an initial test for Screens 2014-09-17 10:29:03 +02:00