KWin
Loading...
Searching...
No Matches
killwindow.cpp
Go to the documentation of this file.
1/*
2 KWin - the KDE window manager
3 This file is part of the KDE project.
4
5 SPDX-FileCopyrightText: 1999, 2000 Matthias Ettrich <ettrich@kde.org>
6 SPDX-FileCopyrightText: 2003 Lubos Lunak <l.lunak@kde.org>
7 SPDX-FileCopyrightText: 2012 Martin Gräßlin <mgraesslin@kde.org>
8
9 SPDX-License-Identifier: GPL-2.0-or-later
10*/
11#include "killwindow.h"
12#include "main.h"
13#include "osd.h"
14#include "window.h"
15
16#include <KLocalizedString>
17
18namespace KWin
19{
20
24
28
30{
31 OSD::show(i18n("Select window to force close with left click or enter.\nEscape or right click to cancel."),
32 QStringLiteral("window-close"));
33 kwinApp()->startInteractiveWindowSelection(
34 [](KWin::Window *window) {
35 OSD::hide();
36 if (window) {
37 window->killWindow();
38 }
39 },
40 QByteArrayLiteral("pirate"));
41}
42
43} // namespace
virtual void killWindow()=0
void show(const QString &message, const QString &iconName, int timeout)
Definition osd.cpp:35
void hide(HideFlags flags)
Definition osd.cpp:66