mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-03-22 11:18:44 +00:00
parent
5171c0bd77
commit
bcd0fe38f0
@ -207,10 +207,6 @@ void Application::run() {
|
|||||||
|
|
||||||
_window = std::make_unique<Window::Controller>(&activeAccount());
|
_window = std::make_unique<Window::Controller>(&activeAccount());
|
||||||
|
|
||||||
const auto currentGeometry = _window->widget()->geometry();
|
|
||||||
_mediaView = std::make_unique<Media::View::OverlayWidget>();
|
|
||||||
_window->widget()->setGeometry(currentGeometry);
|
|
||||||
|
|
||||||
QCoreApplication::instance()->installEventFilter(this);
|
QCoreApplication::instance()->installEventFilter(this);
|
||||||
connect(
|
connect(
|
||||||
static_cast<QGuiApplication*>(QCoreApplication::instance()),
|
static_cast<QGuiApplication*>(QCoreApplication::instance()),
|
||||||
@ -242,6 +238,8 @@ void Application::run() {
|
|||||||
DEBUG_LOG(("Application Info: showing."));
|
DEBUG_LOG(("Application Info: showing."));
|
||||||
_window->firstShow();
|
_window->firstShow();
|
||||||
|
|
||||||
|
_mediaView = std::make_unique<Media::View::OverlayWidget>();
|
||||||
|
|
||||||
if (!locked() && cStartToSettings()) {
|
if (!locked() && cStartToSettings()) {
|
||||||
_window->showSettings();
|
_window->showSettings();
|
||||||
}
|
}
|
||||||
|
@ -194,6 +194,7 @@ void MainWindow::setupPasscodeLock() {
|
|||||||
if (animated) {
|
if (animated) {
|
||||||
_passcodeLock->showAnimated(bg);
|
_passcodeLock->showAnimated(bg);
|
||||||
} else {
|
} else {
|
||||||
|
_passcodeLock->showFinished();
|
||||||
setInnerFocus();
|
setInnerFocus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -833,12 +833,8 @@ void MainWindow::psFirstShow() {
|
|||||||
if (Global::WorkMode().value() == dbiwmTrayOnly
|
if (Global::WorkMode().value() == dbiwmTrayOnly
|
||||||
|| Global::WorkMode().value() == dbiwmWindowAndTray) {
|
|| Global::WorkMode().value() == dbiwmWindowAndTray) {
|
||||||
hide();
|
hide();
|
||||||
} else {
|
|
||||||
show();
|
|
||||||
}
|
}
|
||||||
showShadows = false;
|
showShadows = false;
|
||||||
} else {
|
|
||||||
show();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
setPositionInited();
|
setPositionInited();
|
||||||
|
@ -435,15 +435,6 @@ void MainWindow::initSize() {
|
|||||||
}
|
}
|
||||||
DEBUG_LOG(("Window Pos: Setting first %1, %2, %3, %4").arg(geometry.x()).arg(geometry.y()).arg(geometry.width()).arg(geometry.height()));
|
DEBUG_LOG(("Window Pos: Setting first %1, %2, %3, %4").arg(geometry.x()).arg(geometry.y()).arg(geometry.width()).arg(geometry.height()));
|
||||||
setGeometry(geometry);
|
setGeometry(geometry);
|
||||||
if (geometryScreen != primaryScreen) {
|
|
||||||
// In case screen DPI changed we show the window now,
|
|
||||||
// so that when we call setGeometry() once again after
|
|
||||||
// make_unique<Media::View::OverlayWidget> it already
|
|
||||||
// has adjusted by dpi geometry saved in QWidget.
|
|
||||||
//
|
|
||||||
// Somehow should fix https://github.com/telegramdesktop/tdesktop/issues/6804
|
|
||||||
show();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::positionUpdated() {
|
void MainWindow::positionUpdated() {
|
||||||
|
@ -69,15 +69,17 @@ void LockWidget::showAnimated(const QPixmap &bgAnimCache, bool back) {
|
|||||||
void LockWidget::animationCallback() {
|
void LockWidget::animationCallback() {
|
||||||
update();
|
update();
|
||||||
if (!_a_show.animating()) {
|
if (!_a_show.animating()) {
|
||||||
showChildren();
|
showFinished();
|
||||||
_window->widget()->setInnerFocus();
|
|
||||||
|
|
||||||
Ui::showChatsList();
|
|
||||||
|
|
||||||
_cacheUnder = _cacheOver = QPixmap();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LockWidget::showFinished() {
|
||||||
|
showChildren();
|
||||||
|
_window->widget()->setInnerFocus();
|
||||||
|
Ui::showChatsList();
|
||||||
|
_cacheUnder = _cacheOver = QPixmap();
|
||||||
|
}
|
||||||
|
|
||||||
void LockWidget::paintEvent(QPaintEvent *e) {
|
void LockWidget::paintEvent(QPaintEvent *e) {
|
||||||
Painter p(this);
|
Painter p(this);
|
||||||
|
|
||||||
|
@ -32,6 +32,7 @@ public:
|
|||||||
virtual void setInnerFocus();
|
virtual void setInnerFocus();
|
||||||
|
|
||||||
void showAnimated(const QPixmap &bgAnimCache, bool back = false);
|
void showAnimated(const QPixmap &bgAnimCache, bool back = false);
|
||||||
|
void showFinished();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void paintEvent(QPaintEvent *e) override;
|
void paintEvent(QPaintEvent *e) override;
|
||||||
|
Loading…
Reference in New Issue
Block a user