mirror of
https://github.com/brl/mutter.git
synced 2024-11-10 07:56:14 -05:00
Make MUTTER_DEBUG_XINERAMA override active Xinerama
It seems a bit cleaner to make the MUTTER_DEBUG_XINERAMA variable that sets up fake Xinerama take effect even if Xinerama is active; this means we don't count on Xinerama (or Xrandr if we switch tot that) special casing the case of one monitor. http://bugzilla.gnome.org/show_bug.cgi?id=593404
This commit is contained in:
parent
d042dba4d6
commit
20b02e738c
@ -328,8 +328,27 @@ reload_xinerama_infos (MetaScreen *screen)
|
||||
|
||||
screen->display->xinerama_cache_invalidated = TRUE;
|
||||
|
||||
if (g_getenv ("MUTTER_DEBUG_XINERAMA"))
|
||||
{
|
||||
meta_topic (META_DEBUG_XINERAMA,
|
||||
"Pretending a single monitor has two Xinerama screens\n");
|
||||
|
||||
screen->xinerama_infos = g_new (MetaXineramaScreenInfo, 2);
|
||||
screen->n_xinerama_infos = 2;
|
||||
|
||||
screen->xinerama_infos[0].number = 0;
|
||||
screen->xinerama_infos[0].rect = screen->rect;
|
||||
screen->xinerama_infos[0].rect.width = screen->rect.width / 2;
|
||||
|
||||
screen->xinerama_infos[1].number = 1;
|
||||
screen->xinerama_infos[1].rect = screen->rect;
|
||||
screen->xinerama_infos[1].rect.x = screen->rect.width / 2;
|
||||
screen->xinerama_infos[1].rect.width = screen->rect.width / 2;
|
||||
}
|
||||
|
||||
#ifdef HAVE_XFREE_XINERAMA
|
||||
if (XineramaIsActive (display->xdisplay))
|
||||
if (screen->n_xinerama_infos == 0 &&
|
||||
XineramaIsActive (display->xdisplay))
|
||||
{
|
||||
XineramaScreenInfo *infos;
|
||||
int n_infos;
|
||||
@ -370,7 +389,7 @@ reload_xinerama_infos (MetaScreen *screen)
|
||||
|
||||
meta_XFree (infos);
|
||||
}
|
||||
else
|
||||
else if (screen->n_xinerama_infos > 0)
|
||||
{
|
||||
meta_topic (META_DEBUG_XINERAMA,
|
||||
"No XFree86 Xinerama extension or XFree86 Xinerama inactive on display %s\n",
|
||||
@ -445,25 +464,6 @@ reload_xinerama_infos (MetaScreen *screen)
|
||||
* we can use the field unconditionally
|
||||
*/
|
||||
if (screen->n_xinerama_infos == 0)
|
||||
{
|
||||
if (g_getenv ("MUTTER_DEBUG_XINERAMA"))
|
||||
{
|
||||
meta_topic (META_DEBUG_XINERAMA,
|
||||
"Pretending a single monitor has two Xinerama screens\n");
|
||||
|
||||
screen->xinerama_infos = g_new (MetaXineramaScreenInfo, 2);
|
||||
screen->n_xinerama_infos = 2;
|
||||
|
||||
screen->xinerama_infos[0].number = 0;
|
||||
screen->xinerama_infos[0].rect = screen->rect;
|
||||
screen->xinerama_infos[0].rect.width = screen->rect.width / 2;
|
||||
|
||||
screen->xinerama_infos[1].number = 1;
|
||||
screen->xinerama_infos[1].rect = screen->rect;
|
||||
screen->xinerama_infos[1].rect.x = screen->rect.width / 2;
|
||||
screen->xinerama_infos[1].rect.width = screen->rect.width / 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
meta_topic (META_DEBUG_XINERAMA,
|
||||
"No Xinerama screens, using default screen info\n");
|
||||
@ -474,7 +474,6 @@ reload_xinerama_infos (MetaScreen *screen)
|
||||
screen->xinerama_infos[0].number = 0;
|
||||
screen->xinerama_infos[0].rect = screen->rect;
|
||||
}
|
||||
}
|
||||
|
||||
g_assert (screen->n_xinerama_infos > 0);
|
||||
g_assert (screen->xinerama_infos != NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user