GNOME Bugzilla – Bug 614894
[GdkScreenX11] Add heuristic for pre XRandR 1.3 drivers
Last modified: 2010-04-06 00:38:40 UTC
See Patch
Created attachment 157989 [details] [review] [GdkScreenX11] Add heuristic for pre XRandR 1.3 drivers Currently gdk_screen_get_primary_monitor just returns the first monitor, in this case but both the panel and now gnome-shell use an additional heuristic to prefer LVDS as primary if present. Move this heuristic to gdk_screen_get_primary_monitor to avoid duplicating it all over the place.
Created attachment 158008 [details] [review] Add heuristic for pre XRandR 1.3 drivers Currently gdk_screen_get_primary_monitor just returns the first monitor, in this case but both the panel and now gnome-shell use an additional heuristic to prefer LVDS as primary if present. Move this heuristic to gdk_screen_get_primary_monitor to avoid duplicating it all over the place. The fallback heuristic is also used when no primary output is set.
Review of attachment 158008 [details] [review]: Looks good to me, modulo the one minor comment. Please commit. I'll cherry-pick it to the stable 2.20 branch, once I create it. ::: gdk/x11/gdkscreen-x11.c @@ +772,3 @@ XRRGetOutputInfo (dpy, resources, resources->outputs[i]); + if (primary_output != None && resources->outputs[i] == primary_output) I think the != None check is redundant here, None will never be returned in the outputs array.
Pushed without the redundant None check.