Make floating window update its title earlier

Instead of waiting till animation finishes, update the window title right away when changing modes
This commit is contained in:
Rafał Dzięgiel
2021-12-15 16:58:54 +01:00
parent 5e4dfb322c
commit d465d9f150
2 changed files with 6 additions and 6 deletions

View File

@@ -321,21 +321,21 @@ class ClapperControlsRevealer extends Gtk.Revealer
const isStick = (isFloating && settings.get_boolean('floating-stick'));
DBus.shellWindowEval('stick', isStick);
this.root.child.refreshWindowTitle(this.root.title);
}
_onControlsRevealed()
{
const clapperWidget = this.root.child;
if(!clapperWidget) return;
if(this.child_revealed) {
const clapperWidget = this.root.child;
if(!clapperWidget) return;
const [width, height] = this.root.get_default_size();
clapperWidget.player.widget.height_request = -1;
this.root.set_default_size(width, height);
}
clapperWidget.refreshWindowTitle(this.root.title);
}
_onUnrevealTick(playerWidget, width, height)

View File

@@ -326,7 +326,7 @@ class ClapperWidget extends Gtk.Grid
refreshWindowTitle(title)
{
const isFloating = !this.controlsRevealer.child_revealed;
const isFloating = !this.controlsRevealer.reveal_child;
const pipSuffix = ' - PiP';
const hasPipSuffix = title.endsWith(pipSuffix);