2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Detect tablet mode on Windows 10.

This commit is contained in:
John Preston
2021-01-16 16:33:09 +04:00
parent 7fa342b487
commit 40e90af76d
10 changed files with 89 additions and 122 deletions

View File

@@ -420,6 +420,10 @@ void MainWindow::recountGeometryConstraints() {
void MainWindow::initSize() {
updateMinimumSize();
if (initSizeFromSystem()) {
return;
}
auto position = cWindowPos();
DEBUG_LOG(("Window Pos: Initializing first %1, %2, %3, %4 (maximized %5)").arg(position.x).arg(position.y).arg(position.w).arg(position.h).arg(Logs::b(position.maximized)));

View File

@@ -186,6 +186,10 @@ protected:
virtual void firstShadowsUpdate() {
}
virtual bool initSizeFromSystem() {
return false;
}
// This one is overriden in Windows for historical reasons.
virtual int32 screenNameChecksum(const QString &name) const;