mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Attempt to fix initial window position on Windows.
This commit is contained in:
@@ -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
Submodule Telegram/lib_ui updated: 00f5bdaccd...aa39793a91
Reference in New Issue
Block a user