Hello!
This concerns kde-workspace
In my dual-screen setup I have a second instance of the kde-menu on the second
screen and what has always been bugging me:
When I activate "logout" or "shutdown" or alike from this kde-menu the
confirmation-dialog always gets shown on screen #0 no matter what.
So I cooked up this little patch which adds 6 characters of code and a lot of
joy for me ;)
I tested this on Fedora15's kdebase-workspace-4.7.0 packages and it works like
a charm, I don't think that this patch can introduce any major problems.
No difference for users of single-screen configuration. Only difference for
users
of multi-screen configuration: if shutdown is triggered by a hotkey and not by
mouse, the dialog will still get centered on the screen containing the mouse-
pointer. But I can't imagine that this is a major usability issue since the
user's attention tends to be where the mouse-pointer is anyway.
Though tbh I have no idea how this will behave on touch devices...
Cheers,
Thomas Gahr
>From 1fc36c8422f068ef25dc34244a4251d7b410a538 Mon Sep 17 00:00:00 2001
From: Thomas Gahr <[email protected]>
Date: Tue, 6 Sep 2011 20:07:34 +0200
Subject: [PATCH] center shutdown-dialog on screen containig mouse pointer
---
ksmserver/shutdowndlg.cpp | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ksmserver/shutdowndlg.cpp b/ksmserver/shutdowndlg.cpp
index 57d9652..04cacce 100644
--- a/ksmserver/shutdowndlg.cpp
+++ b/ksmserver/shutdowndlg.cpp
@@ -536,7 +536,7 @@ KSMShutdownDlg::KSMShutdownDlg( QWidget* parent,
m_pictureWidth = 0;
}
- KDialog::centerOnScreen(this);
+ KDialog::centerOnScreen(this,-3);
}
void KSMShutdownDlg::automaticallyDoTimeout()
@@ -630,7 +630,7 @@ void KSMShutdownDlg::resizeEvent(QResizeEvent *e)
setMask(m_svg->mask());
}
- KDialog::centerOnScreen(this);
+ KDialog::centerOnScreen(this,-3);
}
void KSMShutdownDlg::slotLogout()
--
1.7.6