[gnome-desktop/opensuse-moblin: 4/4] RANDR - ignore modes lower than 1024x600 - bnc#539850
- From: Federico Mena Quintero <federico src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-desktop/opensuse-moblin: 4/4] RANDR - ignore modes lower than 1024x600 - bnc#539850
- Date: Tue, 26 Jan 2010 22:54:46 +0000 (UTC)
commit ceb2be0f16c951317c32820f801069d39c25bae6
Author: David Reveman <dreveman novell com>
Date: Tue Jan 26 16:28:47 2010 -0600
RANDR - ignore modes lower than 1024x600 - bnc#539850
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>
libgnome-desktop/gnome-rr.c | 23 ++++++++++++++++-------
1 files changed, 16 insertions(+), 7 deletions(-)
---
diff --git a/libgnome-desktop/gnome-rr.c b/libgnome-desktop/gnome-rr.c
index 6ba8dca..f4f56fd 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]