[gnome-control-center] shell: prevent a warning if the monitor number is not available yet
- From: Thomas Wood <thos src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] shell: prevent a warning if the monitor number is not available yet
- Date: Fri, 2 Aug 2013 15:36:26 +0000 (UTC)
commit eca503bcc5a4a8ee8662c68d1f4c0daec9924c72
Author: Thomas Wood <thomas wood intel com>
Date: Fri Aug 2 13:27:09 2013 +0100
shell: prevent a warning if the monitor number is not available yet
https://bugzilla.gnome.org/show_bug.cgi?id=705297
shell/cc-window.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/shell/cc-window.c b/shell/cc-window.c
index 5118b22..0c500f2 100644
--- a/shell/cc-window.c
+++ b/shell/cc-window.c
@@ -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));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]