summaryrefslogtreecommitdiffstats
path: root/kdm
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-03-31 02:40:21 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-03-31 02:40:21 +0000
commit161e6c2e3ade351f6d1fbed595939c86e397274c (patch)
treed3eccb14a26a75b593db8425c9cd9207985acf9a /kdm
parentf616269af894b663337ba3076088336d6b844878 (diff)
downloadtdebase-161e6c2e3ade351f6d1fbed595939c86e397274c.tar.gz
tdebase-161e6c2e3ade351f6d1fbed595939c86e397274c.zip
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
Diffstat (limited to 'kdm')
-rw-r--r--kdm/kfrontend/kgapp.cpp10
1 files changed, 10 insertions, 0 deletions
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 <X11/keysym.h>
#include <X11/cursorfont.h>
+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;