mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-02-28 19:40:54 +00:00
Fix -startintray on Ubuntu.
This commit is contained in:
parent
e7fbcce9d9
commit
24da40ef05
@ -583,25 +583,24 @@ void MainWindow::psFirstShow() {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool showShadows = true;
|
|
||||||
|
|
||||||
show();
|
show();
|
||||||
//_private.enableShadow(winId());
|
|
||||||
if (cWindowPos().maximized) {
|
if (cWindowPos().maximized) {
|
||||||
DEBUG_LOG(("Window Pos: First show, setting maximized."));
|
DEBUG_LOG(("Window Pos: First show, setting maximized."));
|
||||||
setWindowState(Qt::WindowMaximized);
|
setWindowState(Qt::WindowMaximized);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((cLaunchMode() == LaunchModeAutoStart && cStartMinimized()) || cStartInTray()) {
|
if ((cLaunchMode() == LaunchModeAutoStart && cStartMinimized()) || cStartInTray()) {
|
||||||
setWindowState(Qt::WindowMinimized);
|
// If I call hide() synchronously here after show() then on Ubuntu 14.04
|
||||||
if (Global::WorkMode().value() == dbiwmTrayOnly || Global::WorkMode().value() == dbiwmWindowAndTray) {
|
// it will show a window frame with transparent window body, without content.
|
||||||
hide();
|
// And to be able to "Show from tray" one more hide() will be required.
|
||||||
} else {
|
crl::on_main(this, [=] {
|
||||||
show();
|
setWindowState(Qt::WindowMinimized);
|
||||||
}
|
if (Global::WorkMode().value() == dbiwmTrayOnly || Global::WorkMode().value() == dbiwmWindowAndTray) {
|
||||||
showShadows = false;
|
hide();
|
||||||
} else {
|
} else {
|
||||||
show();
|
show();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
setPositionInited();
|
setPositionInited();
|
||||||
|
Loading…
Reference in New Issue
Block a user