[kwin-wayland] Add signal handler also to main_wayland
REVIEW: 119760
This commit is contained in:
parent
65c17d32cc
commit
12c8facc34
1 changed files with 12 additions and 0 deletions
|
@ -39,6 +39,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
namespace KWin
|
namespace KWin
|
||||||
{
|
{
|
||||||
|
|
||||||
|
static void sighandler(int)
|
||||||
|
{
|
||||||
|
QApplication::exit();
|
||||||
|
}
|
||||||
|
|
||||||
//************************************
|
//************************************
|
||||||
// ApplicationWayland
|
// ApplicationWayland
|
||||||
//************************************
|
//************************************
|
||||||
|
@ -207,6 +212,13 @@ KWIN_EXPORT int kdemain(int argc, char * argv[])
|
||||||
// TODO: ensure it's not xcb once we support the Wayland QPA
|
// TODO: ensure it's not xcb once we support the Wayland QPA
|
||||||
setenv("QT_QPA_PLATFORM", "xcb", true);
|
setenv("QT_QPA_PLATFORM", "xcb", true);
|
||||||
|
|
||||||
|
if (signal(SIGTERM, KWin::sighandler) == SIG_IGN)
|
||||||
|
signal(SIGTERM, SIG_IGN);
|
||||||
|
if (signal(SIGINT, KWin::sighandler) == SIG_IGN)
|
||||||
|
signal(SIGINT, SIG_IGN);
|
||||||
|
if (signal(SIGHUP, KWin::sighandler) == SIG_IGN)
|
||||||
|
signal(SIGHUP, SIG_IGN);
|
||||||
|
|
||||||
KWin::ApplicationWayland a(argc, argv);
|
KWin::ApplicationWayland a(argc, argv);
|
||||||
a.setupTranslator();
|
a.setupTranslator();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue