Commit 1a521e10 authored by Jürg Billeter's avatar Jürg Billeter
Browse files

display: Only manage the default X screen

https://bugzilla.gnome.org/show_bug.cgi?id=648156
parent e22d941f
......@@ -470,6 +470,7 @@ meta_display_open (void)
{
Display *xdisplay;
GSList *screens;
MetaScreen *screen;
GSList *tmp;
int i;
guint32 timestamp;
......@@ -854,19 +855,18 @@ meta_display_open (void)
the_display->last_user_time = timestamp;
the_display->compositor = NULL;
/* Mutter used to manage all X screens of the display in a single process, but
* now it always manages exactly one screen as specified by the DISPLAY
* environment variable. The screens GSList is left for simplicity.
*/
screens = NULL;
i = 0;
while (i < ScreenCount (xdisplay))
{
MetaScreen *screen;
screen = meta_screen_new (the_display, i, timestamp);
i = meta_ui_get_screen_number ();
if (screen)
screens = g_slist_prepend (screens, screen);
++i;
}
screen = meta_screen_new (the_display, i, timestamp);
if (screen)
screens = g_slist_prepend (screens, screen);
the_display->screens = screens;
......
......@@ -82,6 +82,12 @@ meta_ui_get_display (void)
return GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
}
gint
meta_ui_get_screen_number (void)
{
return gdk_screen_get_number (gdk_screen_get_default ());
}
/* We do some of our event handling in frames.c, which expects
* GDK events delivered by GTK+. However, since the transition to
* client side windows, we can't let GDK see button events, since the
......
......@@ -46,6 +46,8 @@ void meta_ui_init (void);
Display* meta_ui_get_display (void);
gint meta_ui_get_screen_number (void);
void meta_ui_add_event_func (Display *xdisplay,
MetaEventFunc func,
gpointer data);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment