mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-30 16:02:00 +02:00
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:
10
src/app.js
10
src/app.js
@@ -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);
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user