diff options
author | Ken Moore <ken@pcbsd.org> | 2015-01-21 11:53:20 -0500 |
---|---|---|
committer | Ken Moore <ken@pcbsd.org> | 2015-01-21 11:53:20 -0500 |
commit | 33a6682d5fc51415f270ebe96989649e8c792c52 (patch) | |
tree | e7bc52410b8d491e71392cc8232691a03fc1e793 /lumina-desktop/SystemWindow.cpp | |
parent | Clean up all the dialog usage in the notepad and audioplay desktop plugins. N... (diff) | |
download | lumina-33a6682d5fc51415f270ebe96989649e8c792c52.tar.gz lumina-33a6682d5fc51415f270ebe96989649e8c792c52.tar.bz2 lumina-33a6682d5fc51415f270ebe96989649e8c792c52.zip |
Clean up a couple other session options:
1) Fix the "Open Home Dir" option in the application menu.
2) Have the logout window open on the current screen (instead of always the left screen)
3) Hide the logout window when starting the logout procedure.
Diffstat (limited to 'lumina-desktop/SystemWindow.cpp')
-rw-r--r-- | lumina-desktop/SystemWindow.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lumina-desktop/SystemWindow.cpp b/lumina-desktop/SystemWindow.cpp index bec15850..15268e0b 100644 --- a/lumina-desktop/SystemWindow.cpp +++ b/lumina-desktop/SystemWindow.cpp @@ -4,6 +4,8 @@ #include "LSession.h" #include <LuminaOS.h> #include <unistd.h> //for usleep() usage +#include <QPoint> +#include <QCursor> SystemWindow::SystemWindow() : QDialog(), ui(new Ui::SystemWindow){ ui->setupUi(this); //load the designer file @@ -27,8 +29,8 @@ SystemWindow::SystemWindow() : QDialog(), ui(new Ui::SystemWindow){ ui->tool_shutdown->setEnabled(false); } //Center this window on the screen - QDesktopWidget desktop; - this->move(desktop.screenGeometry().width()/2 - this->width()/2, desktop.screenGeometry().height()/2 - this->height()/2); + QPoint center = QApplication::desktop()->screenGeometry(QCursor::pos()).center(); //get the center of the current screen + this->move(center.x() - this->width()/2, center.y() - this->height()/2); this->show(); } @@ -37,6 +39,8 @@ SystemWindow::~SystemWindow(){ } void SystemWindow::closeAllWindows(){ + this->hide(); + LSession::processEvents(); if( LSession::handle()->sessionSettings()->value("PlayLogoutAudio",true).toBool() ){ LSession::handle()->playAudioFile(LOS::LuminaShare()+"Logout.ogg"); } |