summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Reveman <dreveman@novell.com>2010-01-26 16:28:47 -0600
committerFederico Mena Quintero <federico@novell.com>2010-01-26 16:28:51 -0600
commitceb2be0f16c951317c32820f801069d39c25bae6 (patch)
treefb73592d4a05229df024a2cacec62dc9d6e94e03
parentacf029f3e0aa2882b6c40172598594928ea6430b (diff)
downloadgnome-desktop-opensuse-moblin.tar.gz
RANDR - ignore modes lower than 1024x600 - bnc#539850opensuse-moblin
Many displays report that they support 800x600 and 640x480 - we will ignore those resolutions as they are too low for modern applications. Signed-off-by: Federico Mena Quintero <federico@novell.com>
-rw-r--r--libgnome-desktop/gnome-rr.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/libgnome-desktop/gnome-rr.c b/libgnome-desktop/gnome-rr.c
index 6ba8dca0..f4f56fd0 100644
--- a/libgnome-desktop/gnome-rr.c
+++ b/libgnome-desktop/gnome-rr.c
@@ -346,12 +346,6 @@ fill_screen_info_from_resources (ScreenInfo *info,
return FALSE;
}
- for (output = info->outputs; *output; ++output)
- {
- if (!output_initialize (*output, resources, error))
- return FALSE;
- }
-
for (i = 0; i < resources->nmode; ++i)
{
GnomeRRMode *mode = mode_by_id (info, resources->modes[i].id);
@@ -359,6 +353,12 @@ fill_screen_info_from_resources (ScreenInfo *info,
mode_initialize (mode, &(resources->modes[i]));
}
+ for (output = info->outputs; *output; ++output)
+ {
+ if (!output_initialize (*output, resources, error))
+ return FALSE;
+ }
+
gather_clone_modes (info);
return TRUE;
@@ -964,9 +964,18 @@ output_initialize (GnomeRROutput *output, XRRScreenResources *res, GError **erro
for (i = 0; i < info->nmode; ++i)
{
GnomeRRMode *mode = mode_by_id (output->info, info->modes[i]);
-
+
if (mode)
+ {
+ /* ignore 640x480 and 800x600 modes of LVDS output */
+ if (strncmp (output->name, "LVDS", 4) == 0)
+ {
+ if (mode->width < 1024 || mode->height < 600)
+ continue;
+ }
+
g_ptr_array_add (a, mode);
+ }
}
g_ptr_array_add (a, NULL);
output->modes = (GnomeRRMode **)g_ptr_array_free (a, FALSE);