mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 09:30:45 -05:00
display: Only manage the default X screen
https://bugzilla.gnome.org/show_bug.cgi?id=648156
This commit is contained in:
parent
e22d941f06
commit
1a521e10c3
@ -470,6 +470,7 @@ meta_display_open (void)
|
|||||||
{
|
{
|
||||||
Display *xdisplay;
|
Display *xdisplay;
|
||||||
GSList *screens;
|
GSList *screens;
|
||||||
|
MetaScreen *screen;
|
||||||
GSList *tmp;
|
GSList *tmp;
|
||||||
int i;
|
int i;
|
||||||
guint32 timestamp;
|
guint32 timestamp;
|
||||||
@ -854,19 +855,18 @@ meta_display_open (void)
|
|||||||
the_display->last_user_time = timestamp;
|
the_display->last_user_time = timestamp;
|
||||||
the_display->compositor = NULL;
|
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;
|
screens = NULL;
|
||||||
|
|
||||||
i = 0;
|
i = meta_ui_get_screen_number ();
|
||||||
while (i < ScreenCount (xdisplay))
|
|
||||||
{
|
|
||||||
MetaScreen *screen;
|
|
||||||
|
|
||||||
screen = meta_screen_new (the_display, i, timestamp);
|
screen = meta_screen_new (the_display, i, timestamp);
|
||||||
|
|
||||||
if (screen)
|
if (screen)
|
||||||
screens = g_slist_prepend (screens, screen);
|
screens = g_slist_prepend (screens, screen);
|
||||||
++i;
|
|
||||||
}
|
|
||||||
|
|
||||||
the_display->screens = screens;
|
the_display->screens = screens;
|
||||||
|
|
||||||
|
@ -82,6 +82,12 @@ meta_ui_get_display (void)
|
|||||||
return GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
|
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
|
/* We do some of our event handling in frames.c, which expects
|
||||||
* GDK events delivered by GTK+. However, since the transition to
|
* GDK events delivered by GTK+. However, since the transition to
|
||||||
* client side windows, we can't let GDK see button events, since the
|
* 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);
|
Display* meta_ui_get_display (void);
|
||||||
|
|
||||||
|
gint meta_ui_get_screen_number (void);
|
||||||
|
|
||||||
void meta_ui_add_event_func (Display *xdisplay,
|
void meta_ui_add_event_func (Display *xdisplay,
|
||||||
MetaEventFunc func,
|
MetaEventFunc func,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
|
Loading…
Reference in New Issue
Block a user