mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-14 13:17:08 +02:00
Attempt to fix initial window position on Windows.
This commit is contained in:
parent
3eefaac885
commit
fc2f41096f
6 changed files with 11 additions and 5 deletions
|
@ -360,7 +360,7 @@ void Application::run() {
|
|||
startDomain();
|
||||
startTray();
|
||||
|
||||
_lastActivePrimaryWindow->widget()->show();
|
||||
_lastActivePrimaryWindow->firstShow();
|
||||
|
||||
startMediaView();
|
||||
|
||||
|
|
|
@ -475,7 +475,6 @@ void MainWindow::init() {
|
|||
}
|
||||
refreshTitleWidget();
|
||||
|
||||
initGeometry();
|
||||
updateTitle();
|
||||
updateWindowIcon();
|
||||
}
|
||||
|
@ -772,9 +771,10 @@ QRect MainWindow::countInitialGeometry(
|
|||
return position.rect();
|
||||
}
|
||||
|
||||
void MainWindow::initGeometry() {
|
||||
void MainWindow::firstShow() {
|
||||
updateMinimumSize();
|
||||
if (initGeometryFromSystem()) {
|
||||
show();
|
||||
return;
|
||||
}
|
||||
const auto geometry = countInitialGeometry(initialPosition());
|
||||
|
@ -784,6 +784,7 @@ void MainWindow::initGeometry() {
|
|||
).arg(geometry.width()
|
||||
).arg(geometry.height()));
|
||||
setGeometry(geometry);
|
||||
show();
|
||||
}
|
||||
|
||||
void MainWindow::positionUpdated() {
|
||||
|
|
|
@ -132,6 +132,7 @@ public:
|
|||
void recountGeometryConstraints();
|
||||
virtual void updateControlsGeometry();
|
||||
|
||||
void firstShow();
|
||||
bool minimizeToTray();
|
||||
void updateGlobalMenu() {
|
||||
updateGlobalMenuHook();
|
||||
|
@ -197,7 +198,6 @@ private:
|
|||
[[nodiscard]] Core::WindowPosition nextInitialChildPosition(
|
||||
bool primary);
|
||||
[[nodiscard]] QRect countInitialGeometry(Core::WindowPosition position);
|
||||
void initGeometry();
|
||||
|
||||
bool computeIsActive() const;
|
||||
|
||||
|
|
|
@ -311,6 +311,10 @@ void Controller::showTermsDelete() {
|
|||
}));
|
||||
}
|
||||
|
||||
void Controller::firstShow() {
|
||||
_widget.firstShow();
|
||||
}
|
||||
|
||||
void Controller::finishFirstShow() {
|
||||
_widget.finishFirstShow();
|
||||
checkThemeEditor();
|
||||
|
|
|
@ -74,6 +74,7 @@ public:
|
|||
|
||||
[[nodiscard]] Adaptive &adaptive() const;
|
||||
|
||||
void firstShow();
|
||||
void finishFirstShow();
|
||||
|
||||
void setupPasscodeLock();
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 00f5bdaccdff4f53e8ba347f09f2de161b7ca7da
|
||||
Subproject commit aa39793a91f1186879c15c214a2671d78eab5085
|
Loading…
Add table
Reference in a new issue