mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-30 22:16:14 +00:00
Fix saving maximized state on Linux
This commit is contained in:
@@ -461,12 +461,6 @@ void MainWindow::initHook() {
|
||||
handleAppMenuOwnerChanged(service, oldOwner, newOwner);
|
||||
});
|
||||
|
||||
connect(
|
||||
windowHandle(),
|
||||
&QWindow::visibleChanged,
|
||||
this,
|
||||
[=](bool visible) { handleVisibleChanged(visible); });
|
||||
|
||||
if (AppMenuSupported) {
|
||||
LOG(("Using D-Bus global menu."));
|
||||
} else {
|
||||
@@ -775,6 +769,9 @@ void MainWindow::createGlobalMenu() {
|
||||
void MainWindow::updateGlobalMenuHook() {
|
||||
}
|
||||
|
||||
void MainWindow::handleVisibleChangedHook(bool visible) {
|
||||
}
|
||||
|
||||
#else // DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||
|
||||
void MainWindow::createGlobalMenu() {
|
||||
@@ -1076,7 +1073,7 @@ void MainWindow::updateGlobalMenuHook() {
|
||||
ForceDisabled(psClearFormat, !markdownEnabled);
|
||||
}
|
||||
|
||||
void MainWindow::handleVisibleChanged(bool visible) {
|
||||
void MainWindow::handleVisibleChangedHook(bool visible) {
|
||||
if (AppMenuSupported && !_mainMenuPath.path().isEmpty()) {
|
||||
if (visible) {
|
||||
RegisterAppMenu(winId(), _mainMenuPath);
|
||||
|
@@ -41,6 +41,7 @@ protected:
|
||||
void initHook() override;
|
||||
void unreadCounterChangedHook() override;
|
||||
void updateGlobalMenuHook() override;
|
||||
void handleVisibleChangedHook(bool visible) override;
|
||||
|
||||
void initTrayMenuHook() override;
|
||||
bool hasTrayIcon() const override;
|
||||
@@ -67,7 +68,6 @@ private:
|
||||
|
||||
void updateIconCounters();
|
||||
void updateWaylandDecorationColors();
|
||||
void handleVisibleChanged(bool visible);
|
||||
|
||||
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||
StatusNotifierItem *_sniTrayIcon = nullptr;
|
||||
|
Reference in New Issue
Block a user