Save window size only when windowed and not in floating mode

This commit is contained in:
Rafał Dzięgiel
2021-02-16 17:04:56 +01:00
parent c908305be0
commit 887f189b60
2 changed files with 6 additions and 9 deletions

View File

@@ -376,11 +376,14 @@ class ClapperPlayer extends PlayerBase
this.closeRequestSignal = null; this.closeRequestSignal = null;
const clapperWidget = this.widget.get_ancestor(Gtk.Grid); const clapperWidget = this.widget.get_ancestor(Gtk.Grid);
if(!clapperWidget.fullscreenMode) {
if(!clapperWidget.fullscreenMode && clapperWidget.controlsRevealer.child_revealed) {
const size = window.get_default_size(); const size = window.get_default_size();
if(size[0] > 0 && size[1] > 0) if(size[0] > 0 && size[1] > 0) {
clapperWidget._saveWindowSize(size); settings.set_string('window-size', JSON.stringify(size));
debug(`saved window size: ${size[0]}x${size[1]}`);
}
} }
/* If "quitOnStop" is set here it means that we are in middle of autoclosing */ /* If "quitOnStop" is set here it means that we are in middle of autoclosing */
if(this.state !== GstClapper.ClapperState.STOPPED && !this.quitOnStop) { if(this.state !== GstClapper.ClapperState.STOPPED && !this.quitOnStop) {

View File

@@ -137,12 +137,6 @@ class ClapperWidget extends Gtk.Grid
debug(`interface in fullscreen mode: ${isFullscreen}`); debug(`interface in fullscreen mode: ${isFullscreen}`);
} }
_saveWindowSize(size)
{
settings.set_string('window-size', JSON.stringify(size));
debug(`saved window size: ${size[0]}x${size[1]}`);
}
_changeControlsPlacement(isOnTop) _changeControlsPlacement(isOnTop)
{ {
if(isOnTop) { if(isOnTop) {