Do not drop old GTK4 support

Recent GTK4 git is way too buggy. We cannot update the GTK version above 3.99.4 yet. So add compatibility with newer versions without dropping support for older ones.
This commit is contained in:
Rafostar
2020-12-14 21:30:00 +01:00
parent f65bc84c89
commit 24a105fbe4
3 changed files with 13 additions and 3 deletions

View File

@@ -322,7 +322,10 @@ class ClapperPlayer extends PlayerBase
let clapperWidget = this.widget.get_ancestor(Gtk.Grid);
if(!clapperWidget.fullscreenMode) {
let size = window.get_default_size();
let size = (Misc.isOldGtk)
? window.get_size()
: window.get_default_size();
if(size[0] > 0 && size[1] > 0)
clapperWidget._saveWindowSize(size);
}