From 553923b25dc41e2c17ba9038eb225cd3bb9b1770 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 21 Sep 2012 18:27:59 -0500 Subject: Forcibly prevent transient override redirect windows from showing up over the lock screen This closes Bug 1079 --- kdesktop/lock/lockprocess.cc | 41 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 37 insertions(+), 4 deletions(-) (limited to 'kdesktop/lock/lockprocess.cc') diff --git a/kdesktop/lock/lockprocess.cc b/kdesktop/lock/lockprocess.cc index 2ce750756..5265bc627 100644 --- a/kdesktop/lock/lockprocess.cc +++ b/kdesktop/lock/lockprocess.cc @@ -960,6 +960,27 @@ void LockProcess::createSaverWindow() setGeometry(0, 0, mRootWidth, mRootHeight); + // HACK + // Close all tooltips and notification windows + { + Window rootWindow = RootWindow(x11Display(), x11Screen()); + Window parent; + Window* children = NULL; + unsigned int noOfChildren = 0; + XWindowAttributes childAttr; + Window childTransient; + + if (XQueryTree(x11Display(), rootWindow, &rootWindow, &parent, &children, &noOfChildren) && noOfChildren>0 ) { + for (unsigned int i=0; isetFrameStyle( TQFrame::WinPanel | TQFrame::Raised ); + if (trinity_desktop_lock_use_system_modal_dialogs) + winFrame->setFrameStyle( TQFrame::NoFrame ); + else + winFrame->setFrameStyle( TQFrame::WinPanel | TQFrame::Raised ); winFrame->setLineWidth( 2 ); TQLabel *label1 = new TQLabel( winFrame ); label1->setPixmap( TQMessageBox::standardIcon( type ) ); @@ -2264,8 +2295,10 @@ void LockProcess::windowAdded( WId w, bool managed ) int y = XDisplayHeight( tqt_xdisplay(), tqt_xscreen()) - attr_geom.height; if( managed ) { XSetWindowAttributes attr; - attr.override_redirect = True; - XChangeWindowAttributes( tqt_xdisplay(), w, CWOverrideRedirect, &attr ); + if (!trinity_desktop_lock_use_system_modal_dialogs) { + attr.override_redirect = True; + XChangeWindowAttributes( tqt_xdisplay(), w, CWOverrideRedirect, &attr ); + } XReparentWindow( tqt_xdisplay(), w, tqt_xrootwin(), x, y ); XMapWindow( tqt_xdisplay(), w ); } -- cgit v1.2.1