mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-30 16:02:00 +02:00
Save window size only when windowed and not in floating mode
This commit is contained in:
@@ -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) {
|
||||||
|
@@ -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) {
|
||||||
|
Reference in New Issue
Block a user