Terminate wlserver when steamcompmgr stops
Closes: https://github.com/Plagman/gamescope/issues/167
This commit is contained in:
parent
470756029d
commit
24b5611478
1 changed files with 6 additions and 2 deletions
|
@ -6,6 +6,7 @@
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <sys/capability.h>
|
#include <sys/capability.h>
|
||||||
|
|
||||||
|
#include <signal.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "main.hpp"
|
#include "main.hpp"
|
||||||
|
@ -44,6 +45,8 @@ int g_nNewNice = 0;
|
||||||
|
|
||||||
uint32_t g_nSubCommandArg = 0;
|
uint32_t g_nSubCommandArg = 0;
|
||||||
|
|
||||||
|
pthread_t g_mainThread;
|
||||||
|
|
||||||
int BIsNested()
|
int BIsNested()
|
||||||
{
|
{
|
||||||
return g_bIsNested == true;
|
return g_bIsNested == true;
|
||||||
|
@ -156,6 +159,7 @@ int main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
XInitThreads();
|
XInitThreads();
|
||||||
|
g_mainThread = pthread_self();
|
||||||
|
|
||||||
if ( getenv("DISPLAY") != NULL || getenv("WAYLAND_DISPLAY") != NULL )
|
if ( getenv("DISPLAY") != NULL || getenv("WAYLAND_DISPLAY") != NULL )
|
||||||
{
|
{
|
||||||
|
@ -208,14 +212,14 @@ int main(int argc, char **argv)
|
||||||
void steamCompMgrThreadRun(void)
|
void steamCompMgrThreadRun(void)
|
||||||
{
|
{
|
||||||
steamcompmgr_main( ac, av );
|
steamcompmgr_main( ac, av );
|
||||||
|
|
||||||
|
pthread_kill( g_mainThread, SIGINT );
|
||||||
}
|
}
|
||||||
|
|
||||||
void startSteamCompMgr(void)
|
void startSteamCompMgr(void)
|
||||||
{
|
{
|
||||||
std::thread steamCompMgrThread( steamCompMgrThreadRun );
|
std::thread steamCompMgrThread( steamCompMgrThreadRun );
|
||||||
steamCompMgrThread.detach();
|
steamCompMgrThread.detach();
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int initOutput(void)
|
int initOutput(void)
|
||||||
|
|
Loading…
Reference in a new issue