static gboolean init_multihead (GdkScreen *screen) { gboolean any_changed = FALSE; if (!init_randr15 (screen, &any_changed) && !init_randr13 (screen, &any_changed)) init_no_multihead (screen, &any_changed); return any_changed; }
static void init_multihead (GdkScreen *screen) { GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen); int opcode, firstevent, firsterror; /* There are four different implementations of multihead support: * * 1. Fake Xinerama for debugging purposes * 2. RandR 1.2 * 3. Solaris Xinerama * 4. XFree86/Xorg Xinerama * * We use them in that order. */ if (init_fake_xinerama (screen)) return; if (init_randr13 (screen)) return; if (XQueryExtension (GDK_SCREEN_XDISPLAY (screen), "XINERAMA", &opcode, &firstevent, &firsterror)) { if (init_solaris_xinerama (screen)) return; if (init_xfree_xinerama (screen)) return; } /* No multihead support of any kind for this screen */ x11_screen->n_monitors = 1; x11_screen->monitors = g_new0 (GdkX11Monitor, 1); x11_screen->primary_monitor = 0; init_monitor_geometry (x11_screen->monitors, 0, 0, WidthOfScreen (x11_screen->xscreen), HeightOfScreen (x11_screen->xscreen)); }