Disable "Always On Top" on Mac OS for now

git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@344 b624d157-de02-0410-bad0-e51aec6abb33
master
sniperbeamer 15 years ago
parent 09544078cd
commit 1af6133336
  1. 3
      src/dialogs/SettingsDlg.cpp
  2. 4
      src/mainwindow.cpp

@ -69,6 +69,9 @@ CSettingsDlg::CSettingsDlg(QWidget* parent):QDialog(parent,Qt::Dialog)
Edit_GlobalShortcut->setVisible(false);
CheckBox_EntryTitlesMatch->setVisible(false);
#endif
#ifdef Q_WS_MAC
CheckBox_AlwaysOnTop->setVisible(false);
#endif
#ifdef GLOBAL_AUTOTYPE
pShortcut = autoType->getShortcut();

@ -84,8 +84,10 @@ KeepassMainWindow::KeepassMainWindow(const QString& ArgFile,bool ArgMin,bool Arg
//statusBar()->addWidget(StatusBarSelection,85);
statusBar()->setVisible(config->showStatusbar());
setStatusBarMsg(StatusBarReady);
#ifndef Q_WS_MAC
if (config->alwaysOnTop())
setWindowFlags(windowFlags() | Qt::WindowStaysOnTopHint);
#endif
NormalCentralWidget=QMainWindow::centralWidget();
LockedCentralWidget=new QWidget(this);
@ -1133,6 +1135,7 @@ void KeepassMainWindow::OnExtrasSettings(){
EntryView->setAlternatingRowColors(config->alternatingRowColors());
SysTray->setVisible(config->showSysTrayIcon());
menuBookmarks->menuAction()->setVisible(config->featureBookmarks());
#ifndef Q_WS_MAC
if (config->alwaysOnTop() != oldAlwaysOnTop) {
if (config->alwaysOnTop())
setWindowFlags(windowFlags() | Qt::WindowStaysOnTopHint);
@ -1140,6 +1143,7 @@ void KeepassMainWindow::OnExtrasSettings(){
setWindowFlags(windowFlags() & ~Qt::WindowStaysOnTopHint);
show();
}
#endif
EventOccurred = true;
if (config->lockOnInactivity() && config->lockAfterSec()!=0 && !inactivityTimer->isActive()){