shell: prevent a warning if the monitor number is not available yet

https://bugzilla.gnome.org/show_bug.cgi?id=705297
This commit is contained in:
Thomas Wood 2013-08-02 13:27:09 +01:00
parent 2f1d233a64
commit eca503bcc5

View file

@ -1258,6 +1258,9 @@ get_monitor_height (CcWindow *self)
GdkScreen *screen;
GdkRectangle rect;
if (self->priv->monitor_num < 0)
return 0;
/* We cannot use workarea here, as this wouldn't
* be updated when we read it after a monitors-changed signal */
screen = gtk_widget_get_screen (GTK_WIDGET (self));