summaryrefslogtreecommitdiffstats
path: root/kwin
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-10-14 18:49:33 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-10-14 18:49:33 +0000
commit168f63d2ca18b82fa2921377dcea03701ad6bdbc (patch)
tree2178c9c95b54193c837496d422c7cda1cb4e12d6 /kwin
parent18a6097313c7744193a90c17dc7a3c78b3bfc26d (diff)
downloadtdebase-168f63d2ca18b82fa2921377dcea03701ad6bdbc.tar.gz
tdebase-168f63d2ca18b82fa2921377dcea03701ad6bdbc.zip
Fix kompmgr user handoff on login
Add new command line option '-k' to kompmgr to suppress restart on Xorg crash git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1258917 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kwin')
-rw-r--r--kwin/kompmgr/kompmgr.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/kwin/kompmgr/kompmgr.c b/kwin/kompmgr/kompmgr.c
index decfb6853..a245b0d57 100644
--- a/kwin/kompmgr/kompmgr.c
+++ b/kwin/kompmgr/kompmgr.c
@@ -291,6 +291,10 @@ Bool fadeTrans = False;
Bool autoRedirect = False;
+#if WORK_AROUND_FGLRX
+Bool restartOnSigterm = True;
+#endif
+
/* For shadow precomputation */
int Gsize = -1;
unsigned char *shadowCorner = NULL;
@@ -385,7 +389,7 @@ void delete_pid_file()
#endif
#if WORK_AROUND_FGLRX
- if (my_exit_code == 3) {
+ if ((my_exit_code == 3) && (restartOnSigterm)) {
printf("kompmgr lost connection to X server, restarting...\n\r"); fflush(stdout);
sleep(1);
char me[2048];
@@ -401,9 +405,7 @@ void handle_siguser (int sig)
{
int uidnum;
if (sig == SIGTERM) {
- delete_pid_file();
- my_exit_code=0;
- exit(0);
+ // Trap this signal and keep running...
return;
}
if (sig == SIGUSR1) {
@@ -3171,7 +3173,7 @@ main (int argc, char **argv)
loadConfig(NULL); /*we do that before cmdline-parsing, so config-values can be overridden*/
/*used for shadow colors*/
- while ((o = getopt (argc, argv, "D:I:O:d:r:o:l:t:b:scnfFmCaSx:vh")) != -1)
+ while ((o = getopt (argc, argv, "D:I:O:d:r:o:l:t:b:scnfFmCaSx:vhk")) != -1)
{
switch (o) {
case 'd':
@@ -3251,6 +3253,9 @@ main (int argc, char **argv)
setShadowColor(optarg);
break;
case 'v': fprintf (stderr, "%s v%-3.2f\n", argv[0], _VERSION_); my_exit_code=0; exit (0);
+ case 'k':
+ restartOnSigterm = False;
+ break;
case 'h':
default:
usage (argv[0]);