From 161e6c2e3ade351f6d1fbed595939c86e397274c Mon Sep 17 00:00:00 2001 From: tpearson Date: Thu, 31 Mar 2011 02:40:21 +0000 Subject: Fix kdm start failure under Qt4 and with buggy Xorg implementations git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1226613 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kdm/kfrontend/kgapp.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'kdm') diff --git a/kdm/kfrontend/kgapp.cpp b/kdm/kfrontend/kgapp.cpp index 027e9a693..8518ce46d 100644 --- a/kdm/kfrontend/kgapp.cpp +++ b/kdm/kfrontend/kgapp.cpp @@ -52,6 +52,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include #include +static int +ignoreXError( Display *dpy ATTR_UNUSED, XErrorEvent *event ATTR_UNUSED ) +{ + return 0; +} + extern "C" { static void @@ -239,7 +245,11 @@ kg_main( const char *argv0 ) } app.restoreOverrideCursor(); Debug( "entering event loop\n" ); + // 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 ); rslt = dialog->exec(); + XSetErrorHandler( (XErrorHandler)0 ); Debug( "left event loop\n" ); delete dialog; delete proc2; -- cgit v1.2.1