mirror of
https://github.com/kiwix/kiwix-desktop.git
synced 2025-09-24 04:32:15 -04:00
Merge pull request #783 from kiwix/fix_windows_contentmanager
Fix contentmanager/mainWindow initialisation on windows.
This commit is contained in:
commit
e1472b2a47
@ -16,6 +16,9 @@
|
||||
#include <QPrintDialog>
|
||||
#include <thread>
|
||||
#include <QMessageBox>
|
||||
#ifdef Q_OS_WIN
|
||||
#include <QtPlatformHeaders\QWindowsWindowFunctions>
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// KiwixApp
|
||||
@ -87,6 +90,12 @@ void KiwixApp::init()
|
||||
mp_errorDialog = new QErrorMessage(mp_mainWindow);
|
||||
setActivationWindow(mp_mainWindow);
|
||||
mp_mainWindow->show();
|
||||
#ifdef Q_OS_WIN
|
||||
QWindow *window = mp_mainWindow->windowHandle();
|
||||
if (window) {
|
||||
QWindowsWindowFunctions::setHasBorderInFullScreen(window, true);
|
||||
}
|
||||
#endif
|
||||
connect(this, &QtSingleApplication::messageReceived, this, [=](const QString &message) {
|
||||
if (!message.isEmpty()) {
|
||||
this->openZimFile(message);
|
||||
|
@ -7,9 +7,7 @@
|
||||
#include "kconstants.h"
|
||||
|
||||
#include <QDesktopServices>
|
||||
#ifdef Q_OS_WIN
|
||||
#include <QtPlatformHeaders\QWindowsWindowFunctions>
|
||||
#endif
|
||||
|
||||
|
||||
MainWindow::MainWindow(QWidget *parent) :
|
||||
QMainWindow(parent),
|
||||
@ -51,14 +49,6 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||
setWindowFlags(Qt::Window | Qt::CustomizeWindowHint);
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
QWindow *window = windowHandle();
|
||||
if (!window) {
|
||||
return;
|
||||
}
|
||||
QWindowsWindowFunctions::setHasBorderInFullScreen(window, true);
|
||||
#endif
|
||||
|
||||
connect(mp_ui->tabBar, &QTabBar::currentChanged,
|
||||
mp_ui->mainToolBar, &TopWidget::updateBackForwardButtons);
|
||||
connect(mp_ui->tabBar, &TabBar::libraryPageDisplayed,
|
||||
|
Loading…
x
Reference in New Issue
Block a user