Handle resolution changes

Added signal 'screen-size-changed' to ShellGlobal.
Connect to this signal in main.js and run the _relayout() method.
If Overview or calendar are visible when this signal emit, they will be hiding.
https://bugzilla.gnome.org/show_bug.cgi?id=584526
This commit is contained in:
Maxim Ermilov
2010-01-19 20:59:29 +03:00
parent b10d9c9ad7
commit d9008054cf
5 changed files with 114 additions and 1 deletions

View File

@ -135,6 +135,7 @@ function start() {
});
_relayout();
global.connect('screen-size-changed', _relayout);
ExtensionSystem.init();
ExtensionSystem.loadExtensions();
@ -199,6 +200,13 @@ function _relayout() {
panel.actor.set_position(primary.x, primary.y);
panel.actor.set_size(primary.width, Panel.PANEL_HEIGHT);
overview.relayout();
// To avoid updating the position and size of the workspaces
// in the overview, we just hide the overview. The positions
// will be updated when it is next shown. We do the same for
// the calendar popdown.
overview.hide();
panel.hideCalendar();
}
// metacity-clutter currently uses the same prefs as plain metacity,