Fix decoration applying and trigger repainting on update

For some reason this is needed for newer Qt in flatpak
This commit is contained in:
Ilya Fedin 2020-05-02 14:00:13 +04:00 committed by John Preston
parent 07c8aae225
commit 5180d31b40
1 changed files with 5 additions and 0 deletions

View File

@ -457,6 +457,8 @@ void MainWindow::initHook() {
} }
#endif // !TDESKTOP_DISABLE_DBUS_INTEGRATION #endif // !TDESKTOP_DISABLE_DBUS_INTEGRATION
updateWaylandDecorationColors();
style::PaletteChanged( style::PaletteChanged(
) | rpl::start_with_next([=] { ) | rpl::start_with_next([=] {
updateWaylandDecorationColors(); updateWaylandDecorationColors();
@ -686,6 +688,9 @@ void MainWindow::updateWaylandDecorationColors() {
windowHandle()->setProperty("__material_decoration_foregroundColor", st::titleFgActive->c); windowHandle()->setProperty("__material_decoration_foregroundColor", st::titleFgActive->c);
windowHandle()->setProperty("__material_decoration_backgroundInactiveColor", st::titleBg->c); windowHandle()->setProperty("__material_decoration_backgroundInactiveColor", st::titleBg->c);
windowHandle()->setProperty("__material_decoration_foregroundInactiveColor", st::titleFg->c); windowHandle()->setProperty("__material_decoration_foregroundInactiveColor", st::titleFg->c);
// Trigger a QtWayland client-side decoration update
windowHandle()->resize(windowHandle()->size());
} }
void MainWindow::LibsLoaded() { void MainWindow::LibsLoaded() {