summaryrefslogtreecommitdiffstats
path: root/kdesktop/lock/autologout.cc
diff options
context:
space:
mode:
Diffstat (limited to 'kdesktop/lock/autologout.cc')
-rw-r--r--kdesktop/lock/autologout.cc19
1 files changed, 17 insertions, 2 deletions
diff --git a/kdesktop/lock/autologout.cc b/kdesktop/lock/autologout.cc
index 3dbb3ac6b..7a9cc9e66 100644
--- a/kdesktop/lock/autologout.cc
+++ b/kdesktop/lock/autologout.cc
@@ -25,12 +25,27 @@
#include <tqdialog.h>
#include <tqprogressbar.h>
+#include <X11/Xatom.h>
+
#define COUNTDOWN 30
-AutoLogout::AutoLogout(LockProcess *parent) : TQDialog(parent, "password dialog", true, (WFlags)WX11BypassWM)
+extern bool trinity_desktop_lock_use_system_modal_dialogs;
+
+AutoLogout::AutoLogout(LockProcess *parent) : TQDialog(parent, "password dialog", 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(qt_xdisplay(), "_KDE_WM_MODAL_SYS_NOTIFICATION", False);
+ XChangeProperty(qt_xdisplay(), winId(), kde_wm_system_modal_notification, XA_INTEGER, 32, PropModeReplace, (unsigned char *) "TRUE", 1L);
+ }
+ setCaption(i18n("Automatic Logout Notification"));
+
frame = new TQFrame(this);
- frame->setFrameStyle(TQFrame::Panel | TQFrame::Raised);
+ if (trinity_desktop_lock_use_system_modal_dialogs)
+ frame->setFrameStyle( TQFrame::NoFrame );
+ else
+ frame->setFrameStyle(TQFrame::Panel | TQFrame::Raised);
frame->setLineWidth(2);
TQLabel *pixLabel = new TQLabel( frame, "pixlabel" );