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:
parent
2f1d233a64
commit
eca503bcc5
1 changed files with 3 additions and 0 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue