summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Lancaster <rlancaste@gmail.com>2016-10-26 08:15:18 (GMT)
committerJasem Mutlaq <mutlaqja@ikarustech.com>2016-10-26 08:15:18 (GMT)
commitcc5fc1c2b6499fc7df317126eb69a45ae07a1359 (patch)
tree6bc67525880c9dd8f0527adf3ca1427782bab8d4
parent40ad4565091677416d6c52b2f21632e0929d5352 (diff)
More OSX window fixes to stay on top
-rw-r--r--kstars/auxiliary/kswizard.cpp2
-rw-r--r--kstars/auxiliary/thumbnaileditor.cpp2
-rw-r--r--kstars/auxiliary/thumbnailpicker.cpp2
-rw-r--r--kstars/dialogs/addcatdialog.cpp2
-rw-r--r--kstars/dialogs/addlinkdialog.cpp2
-rw-r--r--kstars/dialogs/detaildialog.cpp2
-rw-r--r--kstars/dialogs/exportimagedialog.cpp2
-rw-r--r--kstars/dialogs/finddialog.cpp2
-rw-r--r--kstars/dialogs/focusdialog.cpp2
-rw-r--r--kstars/dialogs/fovdialog.cpp2
-rw-r--r--kstars/dialogs/locationdialog.cpp2
-rw-r--r--kstars/dialogs/timedialog.cpp2
-rw-r--r--kstars/ekos/ekosmanager.cpp21
-rw-r--r--kstars/ekos/ekosmanager.h2
-rw-r--r--kstars/ekos/guide/internalguide/rcalibration.cpp2
-rw-r--r--kstars/ekos/profileeditor.cpp2
-rw-r--r--kstars/fitsviewer/fitsviewer.cpp19
-rw-r--r--kstars/fitsviewer/fitsviewer.h2
-rw-r--r--kstars/indi/drivermanager.cpp2
-rw-r--r--kstars/indi/guimanager.cpp19
-rw-r--r--kstars/indi/guimanager.h1
-rw-r--r--kstars/indi/indidevice.cpp2
-rw-r--r--kstars/indi/indidriver.cpp2
-rw-r--r--kstars/kstars.cpp1
-rw-r--r--kstars/kstarsactions.cpp2
-rw-r--r--kstars/oal/execute.cpp2
-rw-r--r--kstars/printing/foveditordialog.cpp2
-rw-r--r--kstars/printing/printingwizard.cpp2
-rw-r--r--kstars/tools/adddeepskyobject.cpp2
-rw-r--r--kstars/tools/altvstime.cpp2
-rw-r--r--kstars/tools/astrocalc.cpp2
-rw-r--r--kstars/tools/exporteyepieceview.cpp2
-rw-r--r--kstars/tools/eyepiecefield.cpp2
-rw-r--r--kstars/tools/flagmanager.cpp2
-rw-r--r--kstars/tools/horizonmanager.cpp2
-rw-r--r--kstars/tools/jmoontool.cpp2
-rw-r--r--kstars/tools/moonphasetool.cpp2
-rw-r--r--kstars/tools/observinglist.cpp2
-rw-r--r--kstars/tools/obslistwizard.cpp2
-rw-r--r--kstars/tools/planetviewer.cpp2
-rw-r--r--kstars/tools/scriptbuilder.cpp6
-rw-r--r--kstars/tools/skycalendar.cpp2
-rw-r--r--kstars/tools/wutdialog.cpp2
43 files changed, 93 insertions, 48 deletions
diff --git a/kstars/auxiliary/kswizard.cpp b/kstars/auxiliary/kswizard.cpp
index 4a79059..f3294fb 100644
--- a/kstars/auxiliary/kswizard.cpp
+++ b/kstars/auxiliary/kswizard.cpp
@@ -54,7 +54,7 @@ KSWizard::KSWizard( QWidget *parent ) :
QDialog( parent )
{
#ifdef Q_OS_OSX
- setWindowFlags(Qt::Tool);
+ setWindowFlags(Qt::Tool| Qt::WindowStaysOnTopHint);
#endif
wizardStack = new QStackedWidget( this );
diff --git a/kstars/auxiliary/thumbnaileditor.cpp b/kstars/auxiliary/thumbnaileditor.cpp
index 6ba7dcb..e66696a 100644
--- a/kstars/auxiliary/thumbnaileditor.cpp
+++ b/kstars/auxiliary/thumbnaileditor.cpp
@@ -38,7 +38,7 @@ ThumbnailEditor::ThumbnailEditor( ThumbnailPicker *_tp, double _w, double _h )
: QDialog( _tp ), tp( _tp )
{
#ifdef Q_OS_OSX
- setWindowFlags(Qt::Tool);
+ setWindowFlags(Qt::Tool| Qt::WindowStaysOnTopHint);
#endif
ui = new ThumbnailEditorUI( this );
w = _w;
diff --git a/kstars/auxiliary/thumbnailpicker.cpp b/kstars/auxiliary/thumbnailpicker.cpp
index 02dc205..39f3cff 100644
--- a/kstars/auxiliary/thumbnailpicker.cpp
+++ b/kstars/auxiliary/thumbnailpicker.cpp
@@ -48,7 +48,7 @@ ThumbnailPicker::ThumbnailPicker( SkyObject *o, const QPixmap &current, QWidget
: QDialog( parent ), SelectedImageIndex(-1), dd((DetailDialog*)parent), Object(o), bImageFound( false )
{
#ifdef Q_OS_OSX
- setWindowFlags(Qt::Tool);
+ setWindowFlags(Qt::Tool| Qt::WindowStaysOnTopHint);
#endif
wid = _w;
ht = _h;
diff --git a/kstars/dialogs/addcatdialog.cpp b/kstars/dialogs/addcatdialog.cpp
index b7b0955..c241a87 100644
--- a/kstars/dialogs/addcatdialog.cpp
+++ b/kstars/dialogs/addcatdialog.cpp
@@ -41,7 +41,7 @@ AddCatDialog::AddCatDialog( KStars *_ks )
: QDialog( ( QWidget* )_ks )
{
#ifdef Q_OS_OSX
- setWindowFlags(Qt::Tool);
+ setWindowFlags(Qt::Tool| Qt::WindowStaysOnTopHint);
#endif
QDir::setCurrent( QDir::homePath() );
acd = new AddCatDialogUI(this);
diff --git a/kstars/dialogs/addlinkdialog.cpp b/kstars/dialogs/addlinkdialog.cpp
index f8f8820..e78d534 100644
--- a/kstars/dialogs/addlinkdialog.cpp
+++ b/kstars/dialogs/addlinkdialog.cpp
@@ -34,7 +34,7 @@ AddLinkDialog::AddLinkDialog( QWidget *parent, const QString &oname )
: QDialog( parent ), ObjectName( oname )
{
#ifdef Q_OS_OSX
- setWindowFlags(Qt::Tool);
+ setWindowFlags(Qt::Tool| Qt::WindowStaysOnTopHint);
#endif
ald = new AddLinkDialogUI(this);
diff --git a/kstars/dialogs/detaildialog.cpp b/kstars/dialogs/detaildialog.cpp
index 3ef5082..6c4ae66 100644
--- a/kstars/dialogs/detaildialog.cpp
+++ b/kstars/dialogs/detaildialog.cpp
@@ -75,7 +75,7 @@ DetailDialog::DetailDialog(SkyObject *o, const KStarsDateTime &ut, GeoLocation *
Data(0), DataComet(0), Pos(0), Links(0), Adv(0), Log(0)
{
#ifdef Q_OS_OSX
- setWindowFlags(Qt::Tool);
+ setWindowFlags(Qt::Tool| Qt::WindowStaysOnTopHint);
#endif
setFaceType( Tabbed );
setBackgroundRole( QPalette::Base );
diff --git a/kstars/dialogs/exportimagedialog.cpp b/kstars/dialogs/exportimagedialog.cpp
index 9e22aa1..35597eb 100644
--- a/kstars/dialogs/exportimagedialog.cpp
+++ b/kstars/dialogs/exportimagedialog.cpp
@@ -38,7 +38,7 @@ ExportImageDialog::ExportImageDialog(const QString &url, const QSize &size, Imag
: QDialog((QWidget*) KStars::Instance()), m_KStars(KStars::Instance()), m_Url(url), m_Size(size)
{
#ifdef Q_OS_OSX
- setWindowFlags(Qt::Tool);
+ setWindowFlags(Qt::Tool| Qt::WindowStaysOnTopHint);
#endif
m_DialogUI = new ExportImageDialogUI(this);
diff --git a/kstars/dialogs/finddialog.cpp b/kstars/dialogs/finddialog.cpp
index 2e96a6c..294ef8b 100644
--- a/kstars/dialogs/finddialog.cpp
+++ b/kstars/dialogs/finddialog.cpp
@@ -61,7 +61,7 @@ FindDialog::FindDialog( QWidget* parent ) :
m_targetObject( 0 )
{
#ifdef Q_OS_OSX
- setWindowFlags(Qt::Tool);
+ setWindowFlags(Qt::Tool| Qt::WindowStaysOnTopHint);
#endif
ui = new FindDialogUI( this );
diff --git a/kstars/dialogs/focusdialog.cpp b/kstars/dialogs/focusdialog.cpp
index 5e83099..11d0b63 100644
--- a/kstars/dialogs/focusdialog.cpp
+++ b/kstars/dialogs/focusdialog.cpp
@@ -36,7 +36,7 @@ FocusDialog::FocusDialog( KStars *_ks )
: QDialog( _ks ), ks( _ks )
{
#ifdef Q_OS_OSX
- setWindowFlags(Qt::Tool);
+ setWindowFlags(Qt::Tool| Qt::WindowStaysOnTopHint);
#endif
//initialize point to the current focus position
Point = *ks->map()->focus();
diff --git a/kstars/dialogs/fovdialog.cpp b/kstars/dialogs/fovdialog.cpp
index a7abcd9..35a48d6 100644
--- a/kstars/dialogs/fovdialog.cpp
+++ b/kstars/dialogs/fovdialog.cpp
@@ -76,7 +76,7 @@ FOVDialog::FOVDialog( QWidget* p ) :
QDialog( p )
{
#ifdef Q_OS_OSX
- setWindowFlags(Qt::Tool);
+ setWindowFlags(Qt::Tool| Qt::WindowStaysOnTopHint);
#endif
// Register FOV* data type
if( fovID == -1 )
diff --git a/kstars/dialogs/locationdialog.cpp b/kstars/dialogs/locationdialog.cpp
index 7f5d311..5d582d0 100644
--- a/kstars/dialogs/locationdialog.cpp
+++ b/kstars/dialogs/locationdialog.cpp
@@ -42,7 +42,7 @@ LocationDialog::LocationDialog( QWidget* parent ) :
QDialog( parent ), timer( 0 )
{
#ifdef Q_OS_OSX
- setWindowFlags(Qt::Tool);
+ setWindowFlags(Qt::Tool| Qt::WindowStaysOnTopHint);
#endif
KStarsData* data = KStarsData::Instance();
diff --git a/kstars/dialogs/timedialog.cpp b/kstars/dialogs/timedialog.cpp
index 41287e4..f163041 100644
--- a/kstars/dialogs/timedialog.cpp
+++ b/kstars/dialogs/timedialog.cpp
@@ -37,7 +37,7 @@ TimeDialog::TimeDialog( const KStarsDateTime &now, GeoLocation *_geo, QWidget *p
: QDialog( parent ), geo( _geo )
{
#ifdef Q_OS_OSX
- setWindowFlags(Qt::Tool);
+ setWindowFlags(Qt::Tool| Qt::WindowStaysOnTopHint);
#endif
UTCNow = UTCFrame;
diff --git a/kstars/ekos/ekosmanager.cpp b/kstars/ekos/ekosmanager.cpp
index b909d7c..c2514da 100644
--- a/kstars/ekos/ekosmanager.cpp
+++ b/kstars/ekos/ekosmanager.cpp
@@ -50,10 +50,14 @@
EkosManager::EkosManager(QWidget *parent) : QDialog(parent)
{
#ifdef Q_OS_OSX
- if(Options::independentWindowEkos())
+
+ if(Options::independentWindowEkos())
setWindowFlags(Qt::Window);
- else
- setWindowFlags(Qt::Tool);
+ else{
+ setWindowFlags(Qt::Window | Qt::WindowStaysOnTopHint);
+ connect(QApplication::instance(), SIGNAL(applicationStateChanged(Qt::ApplicationState)), this, SLOT(changeAlwaysOnTop(Qt::ApplicationState)));
+ }
+
#endif
setupUi(this);
@@ -168,6 +172,17 @@ EkosManager::EkosManager(QWidget *parent) : QDialog(parent)
//resize(1000,750);
}
+void EkosManager::changeAlwaysOnTop(Qt::ApplicationState state)
+{
+ if(isVisible()){
+ if (state == Qt::ApplicationActive)
+ setWindowFlags(Qt::Window | Qt::WindowStaysOnTopHint);
+ else
+ setWindowFlags(windowFlags() & ~Qt::WindowStaysOnTopHint);
+ show();
+ }
+}
+
EkosManager::~EkosManager()
{
delete captureProcess;
diff --git a/kstars/ekos/ekosmanager.h b/kstars/ekos/ekosmanager.h
index e05ae84..a220123 100644
--- a/kstars/ekos/ekosmanager.h
+++ b/kstars/ekos/ekosmanager.h
@@ -152,6 +152,8 @@ public slots:
private slots:
+ void changeAlwaysOnTop(Qt::ApplicationState state);
+
void updateLog();
void clearLog();
diff --git a/kstars/ekos/guide/internalguide/rcalibration.cpp b/kstars/ekos/guide/internalguide/rcalibration.cpp
index d1baf8b..a80ce8b 100644
--- a/kstars/ekos/guide/internalguide/rcalibration.cpp
+++ b/kstars/ekos/guide/internalguide/rcalibration.cpp
@@ -41,7 +41,7 @@ internalCalibration::internalCalibration(cgmath *mathObject, Ekos::Guide *parent
: QWidget(parent)
{
#ifdef Q_OS_OSX
- setWindowFlags(Qt::Tool);
+ setWindowFlags(Qt::Tool| Qt::WindowStaysOnTopHint);
#endif
ui.setupUi(this);
diff --git a/kstars/ekos/profileeditor.cpp b/kstars/ekos/profileeditor.cpp
index f1ff464..2a8ff8c 100644
--- a/kstars/ekos/profileeditor.cpp
+++ b/kstars/ekos/profileeditor.cpp
@@ -31,7 +31,7 @@ ProfileEditorUI::ProfileEditorUI( QWidget *p ) : QFrame( p )
ProfileEditor::ProfileEditor(QWidget *w ) : QDialog( w )
{
#ifdef Q_OS_OSX
- setWindowFlags(Qt::Tool);
+ setWindowFlags(Qt::Tool| Qt::WindowStaysOnTopHint);
#endif
ui = new ProfileEditorUI( this );
diff --git a/kstars/fitsviewer/fitsviewer.cpp b/kstars/fitsviewer/fitsviewer.cpp
index 300c3c7..11bf82a 100644
--- a/kstars/fitsviewer/fitsviewer.cpp
+++ b/kstars/fitsviewer/fitsviewer.cpp
@@ -72,9 +72,11 @@ FITSViewer::FITSViewer (QWidget *parent)
{
#ifdef Q_OS_OSX
if(Options::independentWindowFITS())
- setWindowFlags(Qt::Window);
- else
- setWindowFlags(Qt::Tool);
+ setWindowFlags(Qt::Window);
+ else{
+ setWindowFlags(Qt::Window | Qt::WindowStaysOnTopHint);
+ connect(QApplication::instance(), SIGNAL(applicationStateChanged(Qt::ApplicationState)), this, SLOT(changeAlwaysOnTop(Qt::ApplicationState)));
+ }
#endif
fitsTab = new QTabWidget(this);
@@ -266,6 +268,17 @@ FITSViewer::FITSViewer (QWidget *parent)
resize(INITIAL_W, INITIAL_H);
}
+void FITSViewer::changeAlwaysOnTop(Qt::ApplicationState state)
+{
+ if(isVisible()){
+ if (state == Qt::ApplicationActive)
+ setWindowFlags(Qt::Window | Qt::WindowStaysOnTopHint);
+ else
+ setWindowFlags(windowFlags() & ~Qt::WindowStaysOnTopHint);
+ show();
+ }
+}
+
FITSViewer::~FITSViewer()
{
fitsTab->disconnect();
diff --git a/kstars/fitsviewer/fitsviewer.h b/kstars/fitsviewer/fitsviewer.h
index 660c407..59f88bf 100644
--- a/kstars/fitsviewer/fitsviewer.h
+++ b/kstars/fitsviewer/fitsviewer.h
@@ -88,7 +88,7 @@ protected:
void showEvent(QShowEvent *);
public slots:
-
+ void changeAlwaysOnTop(Qt::ApplicationState state);
void openFile();
void saveFile();
void saveFileAs();
diff --git a/kstars/indi/drivermanager.cpp b/kstars/indi/drivermanager.cpp
index 0f34b62..2cd57f4 100644
--- a/kstars/indi/drivermanager.cpp
+++ b/kstars/indi/drivermanager.cpp
@@ -94,7 +94,7 @@ DriverManager::DriverManager(QWidget *parent)
: QDialog( parent )
{
#ifdef Q_OS_OSX
- setWindowFlags(Qt::Tool);
+ setWindowFlags(Qt::Tool| Qt::WindowStaysOnTopHint);
#endif
currentPort = Options::serverPortStart().toInt()-1;
diff --git a/kstars/indi/guimanager.cpp b/kstars/indi/guimanager.cpp
index c8b0b76..ae4972c 100644
--- a/kstars/indi/guimanager.cpp
+++ b/kstars/indi/guimanager.cpp
@@ -58,9 +58,11 @@ GUIManager::GUIManager(QWidget *parent) : QWidget(parent, Qt::Window)
{
#ifdef Q_OS_OSX
if(Options::independentWindowINDI())
- setWindowFlags(Qt::Window);
- else
- setWindowFlags(Qt::Tool);
+ setWindowFlags(Qt::Window);
+ else{
+ setWindowFlags(Qt::Window | Qt::WindowStaysOnTopHint);
+ connect(QApplication::instance(), SIGNAL(applicationStateChanged(Qt::ApplicationState)), this, SLOT(changeAlwaysOnTop(Qt::ApplicationState)));
+ }
#endif
mainLayout = new QVBoxLayout(this);
@@ -92,6 +94,17 @@ GUIManager::GUIManager(QWidget *parent) : QWidget(parent, Qt::Window)
resize( 640, 480);
}
+void GUIManager::changeAlwaysOnTop(Qt::ApplicationState state)
+{
+ if(isVisible()){
+ if (state == Qt::ApplicationActive)
+ setWindowFlags(Qt::Window | Qt::WindowStaysOnTopHint);
+ else
+ setWindowFlags(windowFlags() & ~Qt::WindowStaysOnTopHint);
+ show();
+ }
+}
+
void GUIManager::closeEvent(QCloseEvent * /*event*/)
{
KStars *ks = KStars::Instance();
diff --git a/kstars/indi/guimanager.h b/kstars/indi/guimanager.h
index 57c720a..303a2af 100644
--- a/kstars/indi/guimanager.h
+++ b/kstars/indi/guimanager.h
@@ -81,6 +81,7 @@ protected:
QList<INDI_D*> guidevices;
public slots:
+ void changeAlwaysOnTop(Qt::ApplicationState state);
void clearLog();
void buildDevice(DeviceInfo *di);
void removeDevice(DeviceInfo *di);
diff --git a/kstars/indi/indidevice.cpp b/kstars/indi/indidevice.cpp
index 88a2e20..c36edd5 100644
--- a/kstars/indi/indidevice.cpp
+++ b/kstars/indi/indidevice.cpp
@@ -53,7 +53,7 @@ INDI_D::INDI_D(GUIManager *in_manager, INDI::BaseDevice *in_dv, ClientManager *i
{
#ifdef Q_OS_OSX
- setWindowFlags(Qt::Tool);
+ setWindowFlags(Qt::Tool| Qt::WindowStaysOnTopHint);
#endif
diff --git a/kstars/indi/indidriver.cpp b/kstars/indi/indidriver.cpp
index 8c217a6..1ff8cba 100644
--- a/kstars/indi/indidriver.cpp
+++ b/kstars/indi/indidriver.cpp
@@ -63,7 +63,7 @@ DeviceManagerUI::DeviceManagerUI(QWidget *parent) : QFrame(parent)
{
#ifdef Q_OS_OSX
- setWindowFlags(Qt::Tool);
+ setWindowFlags(Qt::Tool| Qt::WindowStaysOnTopHint);
#endif
setupUi(this);
diff --git a/kstars/kstars.cpp b/kstars/kstars.cpp
index 956a822..9139d21 100644
--- a/kstars/kstars.cpp
+++ b/kstars/kstars.cpp
@@ -70,6 +70,7 @@ KStars::KStars( bool doSplash, bool clockrun, const QString &startdate )
{
setWindowTitle(i18n("KStars"));
+
// Initialize logging settings
if (Options::disableLogging())
KSUtils::Logging::Disable();
diff --git a/kstars/kstarsactions.cpp b/kstars/kstarsactions.cpp
index 3ee7602..c16bbf1 100644
--- a/kstars/kstarsactions.cpp
+++ b/kstars/kstarsactions.cpp
@@ -643,7 +643,7 @@ void KStars::slotViewOps() {
KConfigDialog* dialog = new KConfigDialog( this, "settings",
Options::self() );
#ifdef Q_OS_OSX
- dialog->setWindowFlags(Qt::Tool);
+ dialog->setWindowFlags(Qt::Tool| Qt::WindowStaysOnTopHint);
#endif
connect( dialog, SIGNAL( settingsChanged( const QString &) ), this, SLOT( slotApplyConfigChanges() ) );
diff --git a/kstars/oal/execute.cpp b/kstars/oal/execute.cpp
index 1b9cb0c..fed5ff6 100644
--- a/kstars/oal/execute.cpp
+++ b/kstars/oal/execute.cpp
@@ -41,7 +41,7 @@ Execute::Execute() {
QWidget *w = new QWidget;
ui.setupUi( w );
#ifdef Q_OS_OSX
- setWindowFlags(Qt::Tool);
+ setWindowFlags(Qt::Tool| Qt::WindowStaysOnTopHint);
#endif
QVBoxLayout *mainLayout = new QVBoxLayout;
diff --git a/kstars/printing/foveditordialog.cpp b/kstars/printing/foveditordialog.cpp
index 9358b25..028a9c1 100644
--- a/kstars/printing/foveditordialog.cpp
+++ b/kstars/printing/foveditordialog.cpp
@@ -30,7 +30,7 @@ FovEditorDialogUI::FovEditorDialogUI(QWidget *parent) : QFrame(parent)
{
setupUi(this);
#ifdef Q_OS_OSX
- setWindowFlags(Qt::Tool);
+ setWindowFlags(Qt::Tool| Qt::WindowStaysOnTopHint);
#endif
setWindowTitle(i18n("Field of View Snapshot Browser"));
diff --git a/kstars/printing/printingwizard.cpp b/kstars/printing/printingwizard.cpp
index d17926f..89bcd78 100644
--- a/kstars/printing/printingwizard.cpp
+++ b/kstars/printing/printingwizard.cpp
@@ -397,7 +397,7 @@ void PrintingWizard::slotNextPage()
void PrintingWizard::setupWidgets()
{
#ifdef Q_OS_OSX
- setWindowFlags(Qt::Tool);
+ setWindowFlags(Qt::Tool| Qt::WindowStaysOnTopHint);
#endif
m_WizardStack = new QStackedWidget(this);
diff --git a/kstars/tools/adddeepskyobject.cpp b/kstars/tools/adddeepskyobject.cpp
index 9bcab67..844e695 100644
--- a/kstars/tools/adddeepskyobject.cpp
+++ b/kstars/tools/adddeepskyobject.cpp
@@ -29,7 +29,7 @@
AddDeepSkyObject::AddDeepSkyObject( QWidget *parent, SyncedCatalogComponent *catalog ) :
QDialog( parent ), m_catalog( catalog ), ui( new Ui::AddDeepSkyObject ) {
#ifdef Q_OS_OSX
- setWindowFlags(Qt::Tool);
+ setWindowFlags(Qt::Tool| Qt::WindowStaysOnTopHint);
#endif
Q_ASSERT( catalog );
ui->setupUi( this );
diff --git a/kstars/tools/altvstime.cpp b/kstars/tools/altvstime.cpp
index 3c3a036..2bb9796 100644
--- a/kstars/tools/altvstime.cpp
+++ b/kstars/tools/altvstime.cpp
@@ -58,7 +58,7 @@ AltVsTime::AltVsTime( QWidget* parent) :
QDialog( parent )
{
#ifdef Q_OS_OSX
- setWindowFlags(Qt::Tool);
+ setWindowFlags(Qt::Tool| Qt::WindowStaysOnTopHint);
#endif
setWindowTitle(i18n( "Altitude vs. Time" ) );
diff --git a/kstars/tools/astrocalc.cpp b/kstars/tools/astrocalc.cpp
index 8527417..f44ac53 100644
--- a/kstars/tools/astrocalc.cpp
+++ b/kstars/tools/astrocalc.cpp
@@ -45,7 +45,7 @@ AstroCalc::AstroCalc( QWidget* parent ) :
QDialog( parent )
{
#ifdef Q_OS_OSX
- setWindowFlags(Qt::Tool);
+ setWindowFlags(Qt::Tool| Qt::WindowStaysOnTopHint);
#endif
// List of messages. Maybe there is better place for it...
diff --git a/kstars/tools/exporteyepieceview.cpp b/kstars/tools/exporteyepieceview.cpp
index 6e97e0a..7a9a4a8 100644
--- a/kstars/tools/exporteyepieceview.cpp
+++ b/kstars/tools/exporteyepieceview.cpp
@@ -39,7 +39,7 @@ ExportEyepieceView::ExportEyepieceView( const SkyPoint *_sp, const KStarsDateTim
QWidget *parent ) : QDialog( parent ), m_dt( dt ) {
#ifdef Q_OS_OSX
- setWindowFlags(Qt::Tool);
+ setWindowFlags(Qt::Tool| Qt::WindowStaysOnTopHint);
#endif
m_sp = new SkyPoint( *_sp ); // Work on a copy.
diff --git a/kstars/tools/eyepiecefield.cpp b/kstars/tools/eyepiecefield.cpp
index e099347..39e5a8c 100644
--- a/kstars/tools/eyepiecefield.cpp
+++ b/kstars/tools/eyepiecefield.cpp
@@ -48,7 +48,7 @@
EyepieceField::EyepieceField( QWidget *parent ) : QDialog( parent ) {
#ifdef Q_OS_OSX
- setWindowFlags(Qt::Tool);
+ setWindowFlags(Qt::Tool| Qt::WindowStaysOnTopHint);
#endif
setWindowTitle( i18n( "Eyepiece Field View" ) );
diff --git a/kstars/tools/flagmanager.cpp b/kstars/tools/flagmanager.cpp
index d81d714..2f6f3fc 100644
--- a/kstars/tools/flagmanager.cpp
+++ b/kstars/tools/flagmanager.cpp
@@ -49,7 +49,7 @@ FlagManager::FlagManager( QWidget *ks )
: QDialog( ks )
{
#ifdef Q_OS_OSX
- setWindowFlags(Qt::Tool);
+ setWindowFlags(Qt::Tool| Qt::WindowStaysOnTopHint);
#endif
QList<QStandardItem*> itemList;
QList<QImage> imageList;
diff --git a/kstars/tools/horizonmanager.cpp b/kstars/tools/horizonmanager.cpp
index 3ad6fd0..e77d09f 100644
--- a/kstars/tools/horizonmanager.cpp
+++ b/kstars/tools/horizonmanager.cpp
@@ -38,7 +38,7 @@ HorizonManager::HorizonManager( QWidget *w )
{
#ifdef Q_OS_OSX
- setWindowFlags(Qt::Tool);
+ setWindowFlags(Qt::Tool| Qt::WindowStaysOnTopHint);
#endif
ui = new HorizonManagerUI( this );
diff --git a/kstars/tools/jmoontool.cpp b/kstars/tools/jmoontool.cpp
index ac7ebf3..a85d4a7 100644
--- a/kstars/tools/jmoontool.cpp
+++ b/kstars/tools/jmoontool.cpp
@@ -48,7 +48,7 @@ JMoonTool::JMoonTool(QWidget *parent)
setWindowTitle( i18n("Jupiter Moons Tool") );
setModal( false );
#ifdef Q_OS_OSX
- setWindowFlags(Qt::Tool);
+ setWindowFlags(Qt::Tool| Qt::WindowStaysOnTopHint);
#endif
QVBoxLayout *vlay = new QVBoxLayout;
diff --git a/kstars/tools/moonphasetool.cpp b/kstars/tools/moonphasetool.cpp
index 62db822..2c9b4d5 100644
--- a/kstars/tools/moonphasetool.cpp
+++ b/kstars/tools/moonphasetool.cpp
@@ -23,7 +23,7 @@ MoonPhaseTool::MoonPhaseTool(QWidget *parent)
: QDialog( parent, Qt::Dialog )
{
#ifdef Q_OS_OSX
- setWindowFlags(Qt::Tool);
+ setWindowFlags(Qt::Tool| Qt::WindowStaysOnTopHint);
#endif
//KStarsDateTime dtStart ( KStarsDateTime::currentDateTime() );
diff --git a/kstars/tools/observinglist.cpp b/kstars/tools/observinglist.cpp
index 9e4240c..4d0e638 100644
--- a/kstars/tools/observinglist.cpp
+++ b/kstars/tools/observinglist.cpp
@@ -96,7 +96,7 @@ ObservingList::ObservingList()
isModified(false), bIsLarge(true), m_dl( 0 )
{
#ifdef Q_OS_OSX
- setWindowFlags(Qt::Tool);
+ setWindowFlags(Qt::Tool| Qt::WindowStaysOnTopHint);
#endif
ui = new ObservingListUI( this );
QVBoxLayout *mainLayout= new QVBoxLayout;
diff --git a/kstars/tools/obslistwizard.cpp b/kstars/tools/obslistwizard.cpp
index 370ec63..c4d7310 100644
--- a/kstars/tools/obslistwizard.cpp
+++ b/kstars/tools/obslistwizard.cpp
@@ -42,7 +42,7 @@ ObsListWizard::ObsListWizard( QWidget *ksparent ) :
QDialog( ksparent )
{
#ifdef Q_OS_OSX
- setWindowFlags(Qt::Tool);
+ setWindowFlags(Qt::Tool| Qt::WindowStaysOnTopHint);
#endif
olw = new ObsListWizardUI( this );
QVBoxLayout *mainLayout = new QVBoxLayout;
diff --git a/kstars/tools/planetviewer.cpp b/kstars/tools/planetviewer.cpp
index 5a21251..80b2593 100644
--- a/kstars/tools/planetviewer.cpp
+++ b/kstars/tools/planetviewer.cpp
@@ -51,7 +51,7 @@ PlanetViewer::PlanetViewer(QWidget *parent)
: QDialog( parent ), scale(1.0), isClockRunning(false), tmr(this)
{
#ifdef Q_OS_OSX
- setWindowFlags(Qt::Tool);
+ setWindowFlags(Qt::Tool| Qt::WindowStaysOnTopHint);
#endif
KStarsData *data = KStarsData::Instance();
pw = new PlanetViewerUI( this );
diff --git a/kstars/tools/scriptbuilder.cpp b/kstars/tools/scriptbuilder.cpp
index d33e64b..57a6cf9 100644
--- a/kstars/tools/scriptbuilder.cpp
+++ b/kstars/tools/scriptbuilder.cpp
@@ -48,7 +48,7 @@
OptionsTreeViewWidget::OptionsTreeViewWidget( QWidget *p ) : QFrame( p ) {
setupUi( this );
#ifdef Q_OS_OSX
- setWindowFlags(Qt::Tool);
+ setWindowFlags(Qt::Tool| Qt::WindowStaysOnTopHint);
#endif
}
@@ -119,7 +119,7 @@ ScriptNameDialog::ScriptNameDialog( QWidget *p )
: QDialog( p )
{
#ifdef Q_OS_OSX
- setWindowFlags(Qt::Tool);
+ setWindowFlags(Qt::Tool| Qt::WindowStaysOnTopHint);
#endif
snw = new ScriptNameWidget( this );
@@ -159,7 +159,7 @@ ScriptBuilder::ScriptBuilder( QWidget *parent )
currentScriptName(), currentAuthor()
{
#ifdef Q_OS_OSX
- setWindowFlags(Qt::Tool);
+ setWindowFlags(Qt::Tool| Qt::WindowStaysOnTopHint);
#endif
ks = (KStars*)parent;
sb = new ScriptBuilderUI(this);
diff --git a/kstars/tools/skycalendar.cpp b/kstars/tools/skycalendar.cpp
index 6ff7831..53bf516 100644
--- a/kstars/tools/skycalendar.cpp
+++ b/kstars/tools/skycalendar.cpp
@@ -45,7 +45,7 @@ SkyCalendar::SkyCalendar( QWidget *parent )
: QDialog( parent )
{
#ifdef Q_OS_OSX
- setWindowFlags(Qt::Tool);
+ setWindowFlags(Qt::Tool| Qt::WindowStaysOnTopHint);
#endif
scUI = new SkyCalendarUI( this );
diff --git a/kstars/tools/wutdialog.cpp b/kstars/tools/wutdialog.cpp
index 9624758..5e59a4d 100644
--- a/kstars/tools/wutdialog.cpp
+++ b/kstars/tools/wutdialog.cpp
@@ -53,7 +53,7 @@ WUTDialog::WUTDialog( QWidget *parent, bool _session, GeoLocation *_geo, KStarsD
timer(NULL)
{
#ifdef Q_OS_OSX
- setWindowFlags(Qt::Tool);
+ setWindowFlags(Qt::Tool| Qt::WindowStaysOnTopHint);
#endif
WUT = new WUTDialogUI( this );