Get rid of unneeded material wayland decorations
This commit is contained in:
parent
6932d859c9
commit
513054a307
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -64,9 +64,6 @@
|
||||||
[submodule "Telegram/ThirdParty/hunspell"]
|
[submodule "Telegram/ThirdParty/hunspell"]
|
||||||
path = Telegram/ThirdParty/hunspell
|
path = Telegram/ThirdParty/hunspell
|
||||||
url = https://github.com/hunspell/hunspell
|
url = https://github.com/hunspell/hunspell
|
||||||
[submodule "Telegram/ThirdParty/materialdecoration"]
|
|
||||||
path = Telegram/ThirdParty/materialdecoration
|
|
||||||
url = https://github.com/desktop-app/materialdecoration.git
|
|
||||||
[submodule "Telegram/ThirdParty/range-v3"]
|
[submodule "Telegram/ThirdParty/range-v3"]
|
||||||
path = Telegram/ThirdParty/range-v3
|
path = Telegram/ThirdParty/range-v3
|
||||||
url = https://github.com/ericniebler/range-v3.git
|
url = https://github.com/ericniebler/range-v3.git
|
||||||
|
|
|
@ -601,12 +601,6 @@ void MainWindow::initHook() {
|
||||||
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||||
|
|
||||||
LOG(("System tray available: %1").arg(Logs::b(trayAvailable())));
|
LOG(("System tray available: %1").arg(Logs::b(trayAvailable())));
|
||||||
|
|
||||||
updateWaylandDecorationColors();
|
|
||||||
style::PaletteChanged(
|
|
||||||
) | rpl::start_with_next([=] {
|
|
||||||
updateWaylandDecorationColors();
|
|
||||||
}, lifetime());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MainWindow::hasTrayIcon() const {
|
bool MainWindow::hasTrayIcon() const {
|
||||||
|
@ -896,26 +890,6 @@ void MainWindow::updateIconCounters() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::updateWaylandDecorationColors() {
|
|
||||||
windowHandle()->setProperty(
|
|
||||||
"__material_decoration_backgroundColor",
|
|
||||||
st::titleBgActive->c);
|
|
||||||
|
|
||||||
windowHandle()->setProperty(
|
|
||||||
"__material_decoration_foregroundColor",
|
|
||||||
st::titleFgActive->c);
|
|
||||||
|
|
||||||
windowHandle()->setProperty(
|
|
||||||
"__material_decoration_backgroundInactiveColor",
|
|
||||||
st::titleBg->c);
|
|
||||||
windowHandle()->setProperty(
|
|
||||||
"__material_decoration_foregroundInactiveColor",
|
|
||||||
st::titleFg->c);
|
|
||||||
|
|
||||||
// Trigger a QtWayland client-side decoration update
|
|
||||||
windowHandle()->resize(windowHandle()->size());
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::initTrayMenuHook() {
|
void MainWindow::initTrayMenuHook() {
|
||||||
_trayIconMenuXEmbed.emplace(nullptr, trayIconMenu);
|
_trayIconMenuXEmbed.emplace(nullptr, trayIconMenu);
|
||||||
_trayIconMenuXEmbed->deleteOnHide(false);
|
_trayIconMenuXEmbed->deleteOnHide(false);
|
||||||
|
|
|
@ -79,7 +79,6 @@ private:
|
||||||
base::unique_qptr<Ui::PopupMenu> _trayIconMenuXEmbed;
|
base::unique_qptr<Ui::PopupMenu> _trayIconMenuXEmbed;
|
||||||
|
|
||||||
void updateIconCounters();
|
void updateIconCounters();
|
||||||
void updateWaylandDecorationColors();
|
|
||||||
|
|
||||||
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||||
StatusNotifierItem *_sniTrayIcon = nullptr;
|
StatusNotifierItem *_sniTrayIcon = nullptr;
|
||||||
|
|
|
@ -654,10 +654,6 @@ void start() {
|
||||||
"this may lead to font issues.");
|
"this may lead to font issues.");
|
||||||
#endif // DESKTOP_APP_USE_PACKAGED_FONTS
|
#endif // DESKTOP_APP_USE_PACKAGED_FONTS
|
||||||
|
|
||||||
if (AreQtPluginsBundled()) {
|
|
||||||
qputenv("QT_WAYLAND_DECORATION", "material");
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||||
// Tell the user when XDP file dialog is used
|
// Tell the user when XDP file dialog is used
|
||||||
DEBUG_LOG(("Checking for XDG Desktop Portal..."));
|
DEBUG_LOG(("Checking for XDG Desktop Portal..."));
|
||||||
|
|
1
Telegram/ThirdParty/materialdecoration
vendored
1
Telegram/ThirdParty/materialdecoration
vendored
|
@ -1 +0,0 @@
|
||||||
Subproject commit 90b26e827e27b829b208a3d906c38ca91cb2c50d
|
|
Loading…
Reference in New Issue
Block a user