summaryrefslogtreecommitdiffstats
path: root/kdesktop/lock/querydlg.cc
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-09-12 00:34:54 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-09-12 00:34:54 +0000
commit9925fc58bcca4faf6f6a356ace24acdf19556560 (patch)
treeba039e157eb6838fcfe0e2d178c92e1f86e2d08e /kdesktop/lock/querydlg.cc
parent1f40ada72d693d681ec6a32c2ef717e8dd73b5bb (diff)
downloadtdebase-9925fc58bcca4faf6f6a356ace24acdf19556560.tar.gz
tdebase-9925fc58bcca4faf6f6a356ace24acdf19556560.zip
Fix system modal dialogs
Fix shutdown background Add code to make the desktop locking system use the system window decorations and generally use the same theme and style as the active desktop This code is disabled for now, but can be enabled via the two new static variables in kdesktop/lock/main.cc git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1252900 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdesktop/lock/querydlg.cc')
-rw-r--r--kdesktop/lock/querydlg.cc18
1 files changed, 16 insertions, 2 deletions
diff --git a/kdesktop/lock/querydlg.cc b/kdesktop/lock/querydlg.cc
index b05d77076..639772ace 100644
--- a/kdesktop/lock/querydlg.cc
+++ b/kdesktop/lock/querydlg.cc
@@ -48,22 +48,36 @@
#include <X11/Xutil.h>
#include <X11/keysym.h>
+#include <X11/Xatom.h>
#include <fixx11h.h>
#ifndef AF_LOCAL
# define AF_LOCAL AF_UNIX
#endif
+extern bool trinity_desktop_lock_use_system_modal_dialogs;
+
//===========================================================================
//
// Simple dialog for displaying a password/PIN entry dialog
//
QueryDlg::QueryDlg(LockProcess *parent)
- : TQDialog(parent, "query dialog", true, (WFlags)WX11BypassWM),
+ : TQDialog(parent, "query dialog", true, (trinity_desktop_lock_use_system_modal_dialogs?((WFlags)WStyle_StaysOnTop):((WFlags)WX11BypassWM))),
mUnlockingFailed(false)
{
+ 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("Information Needed"));
+
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 );
mpixLabel = new TQLabel( frame, "pixlabel" );