[x11] Use -1 as the default screen guard

Currently, the default screen guard value is 0, which is a valid
screen number on X11, and it might not be the default.

Patch suggested by: Owen W. Taylor <otaylor@redhat.com>
This commit is contained in:
Emmanuele Bassi 2009-05-06 18:32:17 +01:00
parent 8ca46d728d
commit 2ae9d84a2a

View File

@ -95,7 +95,7 @@ static Display *_foreign_dpy = NULL;
/* options */
static gchar *clutter_display_name = NULL;
static gint clutter_screen = 0;
static gint clutter_screen = -1;
static gboolean clutter_synchronise = FALSE;
/* X error trap */
@ -167,7 +167,7 @@ clutter_backend_x11_post_parse (ClutterBackend *backend,
CLUTTER_NOTE (BACKEND, "Getting the X screen");
if (clutter_screen == 0)
if (clutter_screen == -1)
backend_x11->xscreen = DefaultScreenOfDisplay (backend_x11->xdpy);
else
backend_x11->xscreen = ScreenOfDisplay (backend_x11->xdpy,