From 46103e169f8c346205237df9a3d3e90b0862ede2 Mon Sep 17 00:00:00 2001 From: Rafostar <40623528+Rafostar@users.noreply.github.com> Date: Sat, 20 Feb 2021 11:12:50 +0100 Subject: [PATCH] Update current time on top overlay reveal Previously current hour might not have been updated if someone entered fullscreen without moving mouse cursor or with a touch --- src/widget.js | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/src/widget.js b/src/widget.js index 4aebc255..9b7b6ab9 100644 --- a/src/widget.js +++ b/src/widget.js @@ -112,6 +112,8 @@ class ClapperWidget extends Gtk.Grid revealControls(isAllowInput) { + this._checkSetUpdateTimeInterval(); + this.revealerTop.revealChild(true); this.revealerBottom.revealChild(true); @@ -157,6 +159,9 @@ class ClapperWidget extends Gtk.Grid this.revealerTop.revealerGrid.visible = !headerbar.visible; + if(this.revealerTop.child_revealed) + this._checkSetUpdateTimeInterval(); + this.setControlsCanFocus(false); if(this.player.playOnFullscreen && isFullscreen) { @@ -631,6 +636,17 @@ class ClapperWidget extends Gtk.Grid }); } + _checkSetUpdateTimeInterval() + { + if( + this.isFullscreenMode + && !this.isMobileMonitor + && !this._updateTimeTimeout + ) { + this._setUpdateTimeInterval(); + } + } + _setUpdateTimeInterval() { this._clearTimeout('updateTime'); @@ -872,14 +888,6 @@ class ClapperWidget extends Gtk.Grid this.needsCursorRestore = false; } this.revealControls(); - - if( - this.isFullscreenMode - && !this.isMobileMonitor - && !this._updateTimeTimeout - ) { - this._setUpdateTimeInterval(); - } } this.posX = posX;