Use OnScreenNotification in kill window

Summary: Inform how to kill a window.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3724
This commit is contained in:
Martin Gräßlin 2016-12-18 12:05:19 +01:00
parent 07c6878ff0
commit 444ce02d8d

View file

@ -23,8 +23,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "abstract_client.h"
#include "main.h"
#include "platform.h"
#include "osd.h"
#include "unmanaged.h"
#include <KLocalizedString>
namespace KWin
{
@ -38,8 +41,11 @@ KillWindow::~KillWindow()
void KillWindow::start()
{
OSD::show(i18n("Select window to force close with left click or enter.\nEscape or right click to cancel."),
QStringLiteral("window-close"));
kwinApp()->platform()->startInteractiveWindowSelection(
[] (KWin::Toplevel *t) {
OSD::hide();
if (!t) {
return;
}