From d6d1056a7fa918459ad7daa9cb268d405b08da78 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 9 Apr 2011 02:31:32 +0000 Subject: Fix abort on X error in kdm git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1227443 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kdm/kfrontend/kgapp.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kdm/kfrontend/kgapp.cpp b/kdm/kfrontend/kgapp.cpp index 8518ce46d..2e40d07ef 100644 --- a/kdm/kfrontend/kgapp.cpp +++ b/kdm/kfrontend/kgapp.cpp @@ -228,13 +228,17 @@ kg_main( const char *argv0 ) _autoLoginUser.isEmpty()) _autoLoginDelay = 0; if (_useTheme && !_theme.isEmpty()) { + // Qt4 has a nasty habit of generating BadWindow errors in normal operation, so we simply ignore them + // This also prevents the user from being dropped to a console login if Xorg glitches or is buggy + XSetErrorHandler( ignoreXError ); KThemedGreeter *tgrt; dialog = tgrt = new KThemedGreeter; - kdDebug() << timestamp() << " themed" << endl; + kdDebug() << timestamp() << " themed" << endl; if (!tgrt->isOK()) { delete tgrt; dialog = new KStdGreeter; } + XSetErrorHandler( (XErrorHandler)0 ); } else dialog = new KStdGreeter; if (*_preloader) { -- cgit v1.2.1