|
Lines 960-965
void LockProcess::createSaverWindow()
Link Here
|
| 960 |
|
960 |
|
| 961 |
setGeometry(0, 0, mRootWidth, mRootHeight); |
961 |
setGeometry(0, 0, mRootWidth, mRootHeight); |
| 962 |
|
962 |
|
|
|
963 |
// HACK |
| 964 |
// Close all tooltips and notification windows |
| 965 |
{ |
| 966 |
Window rootWindow = RootWindow(x11Display(), x11Screen()); |
| 967 |
Window parent; |
| 968 |
Window* children = NULL; |
| 969 |
unsigned int noOfChildren = 0; |
| 970 |
XWindowAttributes childAttr; |
| 971 |
Window childTransient; |
| 972 |
|
| 973 |
if (XQueryTree(x11Display(), rootWindow, &rootWindow, &parent, &children, &noOfChildren) && noOfChildren>0 ) { |
| 974 |
for (unsigned int i=0; i<noOfChildren; i++) { |
| 975 |
if (XGetWindowAttributes(x11Display(), children[i], &childAttr) && XGetTransientForHint(x11Display(), children[i], &childTransient)) { |
| 976 |
if ((childAttr.map_state == IsViewable) && (childAttr.override_redirect) && (childTransient)) { |
| 977 |
XUnmapWindow(x11Display(), children[i]); |
| 978 |
} |
| 979 |
} |
| 980 |
} |
| 981 |
} |
| 982 |
} |
| 983 |
|
| 963 |
kdDebug(1204) << "Saver window Id: " << winId() << endl; |
984 |
kdDebug(1204) << "Saver window Id: " << winId() << endl; |
| 964 |
} |
985 |
} |
| 965 |
|
986 |
|
|
Lines 2162-2170
void LockProcess::unlockXF86()
Link Here
|
| 2162 |
|
2183 |
|
| 2163 |
void LockProcess::msgBox( TQMessageBox::Icon type, const TQString &txt ) |
2184 |
void LockProcess::msgBox( TQMessageBox::Icon type, const TQString &txt ) |
| 2164 |
{ |
2185 |
{ |
| 2165 |
TQDialog box( 0, "messagebox", true, (WFlags)WX11BypassWM ); |
2186 |
TQDialog box( 0, "messagebox", true, (trinity_desktop_lock_use_system_modal_dialogs?((WFlags)WStyle_StaysOnTop):((WFlags)WX11BypassWM)) ); |
|
|
2187 |
if (trinity_desktop_lock_use_system_modal_dialogs) { |
| 2188 |
// Signal that we do not want any window controls to be shown at all |
| 2189 |
Atom kde_wm_system_modal_notification; |
| 2190 |
kde_wm_system_modal_notification = XInternAtom(qt_xdisplay(), "_KDE_WM_MODAL_SYS_NOTIFICATION", False); |
| 2191 |
XChangeProperty(qt_xdisplay(), box.winId(), kde_wm_system_modal_notification, XA_INTEGER, 32, PropModeReplace, (unsigned char *) "TRUE", 1L); |
| 2192 |
} |
| 2193 |
box.setCaption(i18n("Authentication Subsystem Notice")); |
| 2166 |
TQFrame *winFrame = new TQFrame( &box ); |
2194 |
TQFrame *winFrame = new TQFrame( &box ); |
| 2167 |
winFrame->setFrameStyle( TQFrame::WinPanel | TQFrame::Raised ); |
2195 |
if (trinity_desktop_lock_use_system_modal_dialogs) |
|
|
2196 |
winFrame->setFrameStyle( TQFrame::NoFrame ); |
| 2197 |
else |
| 2198 |
winFrame->setFrameStyle( TQFrame::WinPanel | TQFrame::Raised ); |
| 2168 |
winFrame->setLineWidth( 2 ); |
2199 |
winFrame->setLineWidth( 2 ); |
| 2169 |
TQLabel *label1 = new TQLabel( winFrame ); |
2200 |
TQLabel *label1 = new TQLabel( winFrame ); |
| 2170 |
label1->setPixmap( TQMessageBox::standardIcon( type ) ); |
2201 |
label1->setPixmap( TQMessageBox::standardIcon( type ) ); |
|
Lines 2264-2271
void LockProcess::windowAdded( WId w, bool managed )
Link Here
|
| 2264 |
int y = XDisplayHeight( qt_xdisplay(), qt_xscreen()) - attr_geom.height; |
2295 |
int y = XDisplayHeight( qt_xdisplay(), qt_xscreen()) - attr_geom.height; |
| 2265 |
if( managed ) { |
2296 |
if( managed ) { |
| 2266 |
XSetWindowAttributes attr; |
2297 |
XSetWindowAttributes attr; |
| 2267 |
attr.override_redirect = True; |
2298 |
if (!trinity_desktop_lock_use_system_modal_dialogs) { |
| 2268 |
XChangeWindowAttributes( qt_xdisplay(), w, CWOverrideRedirect, &attr ); |
2299 |
attr.override_redirect = True; |
|
|
2300 |
XChangeWindowAttributes( qt_xdisplay(), w, CWOverrideRedirect, &attr ); |
| 2301 |
} |
| 2269 |
XReparentWindow( qt_xdisplay(), w, qt_xrootwin(), x, y ); |
2302 |
XReparentWindow( qt_xdisplay(), w, qt_xrootwin(), x, y ); |
| 2270 |
XMapWindow( qt_xdisplay(), w ); |
2303 |
XMapWindow( qt_xdisplay(), w ); |
| 2271 |
} |
2304 |
} |