Fix startup window size on XOrg

The window size was restored too early which caused the window to be a little bigger then it should on each launch. Restore window size after that window was mapped.
This commit is contained in:
Rafał Dzięgiel
2021-04-07 20:07:05 +02:00
parent b5e1b3ab86
commit cca3077936
2 changed files with 15 additions and 12 deletions

View File

@@ -30,6 +30,8 @@ class ClapperApp extends AppBase
window.add_css_class('nobackground');
window.set_child(clapperWidget);
window.set_titlebar(dummyHeaderbar);
this.mapSignal = window.connect('map', this._onWindowMap.bind(this));
}
vfunc_open(files, hint)
@@ -39,4 +41,12 @@ class ClapperApp extends AppBase
this._openFiles(files);
this.activate();
}
_onWindowMap(window)
{
window.disconnect(this.mapSignal);
this.mapSignal = null;
window.child._onWindowMap(window);
}
});