[gnome-control-center/gnome-3-8] 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/gnome-3-8] shell: prevent a warning if the monitor number is not available yet
- Date: Fri, 2 Aug 2013 15:36:21 +0000 (UTC)
commit 1db4f91467fd16ebaa231716a286c7d4d9e36c26
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 2f92b34..b4a619f 100644
--- a/shell/cc-window.c
+++ b/shell/cc-window.c
@@ -1248,6 +1248,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]