summaryrefslogtreecommitdiffstats
path: root/kdesktop
diff options
context:
space:
mode:
Diffstat (limited to 'kdesktop')
-rw-r--r--kdesktop/lock/lockprocess.cc32
-rw-r--r--kdesktop/lock/lockprocess.h1
2 files changed, 22 insertions, 11 deletions
diff --git a/kdesktop/lock/lockprocess.cc b/kdesktop/lock/lockprocess.cc
index 33fd374aa..30c9e4dee 100644
--- a/kdesktop/lock/lockprocess.cc
+++ b/kdesktop/lock/lockprocess.cc
@@ -137,6 +137,10 @@ static Window gVRootData = 0;
static Atom gXA_VROOT;
static Atom gXA_SCREENSAVER_VERSION;
+Atom kde_wm_system_modal_notification = 0;
+Atom kde_wm_transparent_to_desktop = 0;
+Atom kde_wm_transparent_to_black = 0;
+
void print_trace()
{
#ifdef WITH_KDESKTOP_LOCK_BACKTRACE
@@ -234,7 +238,8 @@ LockProcess::LockProcess()
m_mousePrevY(0),
m_dialogPrevX(0),
m_dialogPrevY(0),
- m_maskWidget(NULL)
+ m_maskWidget(NULL),
+ m_saverRootWindow(0)
{
#ifdef KEEP_MOUSE_UNGRABBED
setNFlags(WX11DisableMove|WX11DisableClose|WX11DisableShade|WX11DisableMinimize|WX11DisableMaximize);
@@ -242,10 +247,10 @@ LockProcess::LockProcess()
setupSignals();
- // Signal that we want to be transparent to the desktop, not to windows behind us...
- Atom kde_wm_transparent_to_desktop;
+ // Set up atoms
+ kde_wm_system_modal_notification = XInternAtom(tqt_xdisplay(), "_KDE_WM_MODAL_SYS_NOTIFICATION", False);
kde_wm_transparent_to_desktop = XInternAtom(tqt_xdisplay(), "_KDE_TRANSPARENT_TO_DESKTOP", False);
- XChangeProperty(tqt_xdisplay(), winId(), kde_wm_transparent_to_desktop, XA_INTEGER, 32, PropModeReplace, (unsigned char *) "TRUE", 1L);
+ kde_wm_transparent_to_black = XInternAtom(tqt_xdisplay(), "_KDE_TRANSPARENT_TO_BLACK", False);
kapp->installX11EventFilter(this);
@@ -923,8 +928,8 @@ void LockProcess::createSaverWindow()
XFree( info );
}
- Window w = XCreateWindow( x11Display(), RootWindow( x11Display(), x11Screen()), x(), y(), width(), height(), 0, x11Depth(), InputOutput, visual, flags, &attrs );
- create( w );
+ m_saverRootWindow = XCreateWindow( x11Display(), RootWindow( x11Display(), x11Screen()), x(), y(), width(), height(), 0, x11Depth(), InputOutput, visual, flags, &attrs );
+ create( m_saverRootWindow );
// Some xscreensaver hacks check for this property
const char *version = "KDE 2.0";
@@ -937,9 +942,7 @@ void LockProcess::createSaverWindow()
XChangeWindowAttributes(tqt_xdisplay(), winId(), CWEventMask, &attr);
// Signal that we want to be transparent to the desktop, not to windows behind us...
- Atom kde_wm_transparent_to_desktop;
- kde_wm_transparent_to_desktop = XInternAtom(tqt_xdisplay(), "_KDE_TRANSPARENT_TO_DESKTOP", False);
- XChangeProperty(tqt_xdisplay(), w, kde_wm_transparent_to_desktop, XA_INTEGER, 32, PropModeReplace, (unsigned char *) "TRUE", 1L);
+ XChangeProperty(tqt_xdisplay(), m_saverRootWindow, kde_wm_transparent_to_desktop, XA_INTEGER, 32, PropModeReplace, (unsigned char *) "TRUE", 1L);
// erase();
@@ -1598,6 +1601,11 @@ bool LockProcess::startHack()
if (trinity_desktop_lock_use_system_modal_dialogs) {
// Make sure we have a nice clean display to start with!
if (argb_visual) {
+ // Signal that we want to be transparent to a black background...
+ if (m_saverRootWindow) {
+ XChangeProperty(tqt_xdisplay(), m_saverRootWindow, kde_wm_transparent_to_black, XA_INTEGER, 32, PropModeReplace, (unsigned char *) "TRUE", 1L);
+ XClearArea(tqt_xdisplay(), m_saverRootWindow, 0, 0, 0, 0, True);
+ }
setTransparentBackgroundARGB();
}
else {
@@ -1712,6 +1720,10 @@ void LockProcess::hackExited(TDEProcess *)
}
}
if (argb_visual) {
+ if (m_saverRootWindow) {
+ XDeleteProperty(tqt_xdisplay(), m_saverRootWindow, kde_wm_transparent_to_black);
+ XClearArea(tqt_xdisplay(), m_saverRootWindow, 0, 0, 0, 0, True);
+ }
setTransparentBackgroundARGB();
}
else {
@@ -2346,8 +2358,6 @@ void LockProcess::msgBox( TQMessageBox::Icon type, const TQString &txt )
TQDialog box( 0, "messagebox", true, (trinity_desktop_lock_use_system_modal_dialogs?((WFlags)WStyle_StaysOnTop):((WFlags)WX11BypassWM)) );
if (trinity_desktop_lock_use_system_modal_dialogs) {
// Signal that we do not want any window controls to be shown at all
- Atom kde_wm_system_modal_notification;
- kde_wm_system_modal_notification = XInternAtom(tqt_xdisplay(), "_KDE_WM_MODAL_SYS_NOTIFICATION", False);
XChangeProperty(tqt_xdisplay(), box.winId(), kde_wm_system_modal_notification, XA_INTEGER, 32, PropModeReplace, (unsigned char *) "TRUE", 1L);
}
box.setCaption(i18n("Authentication Subsystem Notice"));
diff --git a/kdesktop/lock/lockprocess.h b/kdesktop/lock/lockprocess.h
index 5b9649893..23fe9912a 100644
--- a/kdesktop/lock/lockprocess.h
+++ b/kdesktop/lock/lockprocess.h
@@ -238,6 +238,7 @@ private:
int m_dialogPrevY;
TQWidget* m_maskWidget;
+ Window m_saverRootWindow;
ControlPipeHandlerObject* mControlPipeHandler;
TQEventLoopThread* mControlPipeHandlerThread;