Public bug reported:

Binary package hint: gnome-control-center

In the Screen Resolution applet, no resolution other than the current is
listed.  This happens on my PC using the nvidia proprietary driver, and
the source code indicates that it should be happening for everyone.

for (i = 0; i < screen_info->n_sizes; i++) {
..
  //if (i == current_size || show_resolution (sizes[i].width, sizes[i].height))
  if (((sizes[i].width > 0) && (sizes[i].height > 0)) && (show_resolution 
(sizes[i].width, sizes[i].height)))
..
}

The "if" statement is checking if one of the resolutions is the current,
which doesn't make any sense.  *All* modes should be added to the list,
not the current.  The new "if" posted above fixes this problem.

Another interesting thing is that "i == current_size" is checked within
the original clause, which obviously does not need to be done if "i ==
current_size" was already checked.  So, something was obviously
overlooked here.

.. if (i == current_size)  current_item = item;

Since (i == current_size) is not checked in the patched clause, we
should leave it here because it does serve its intended purpose now (to
select the user's current resolution out of the long list of ALL
resolutions).

Here is the full source code 
(gnome-control-center-2.19.90/capplets/display/main.c):   
  for (i = 0; i < screen_info->n_sizes; i++)
    {
      if (((sizes[i].width > 0) && (sizes[i].height > 0)) && (show_resolution 
(sizes[i].width, sizes[i].height)))
      //if (i == current_size || show_resolution (sizes[i].width, 
sizes[i].height))
        {
          str = g_strdup_printf ("%dx%d", sizes[i].width, sizes[i].height);

          if (i == current_size)
            current_item = item;

          gtk_list_store_append(store, &iter);
          gtk_list_store_set(store, &iter,
                             COL_NAME, str,
                             COL_ID, i,
                             -1);

          g_free (str);
          item++;
        }
    }

** Affects: gnome-control-center (Ubuntu)
     Importance: Undecided
         Status: New

-- 
[gutsy] Screen resolutions other than current are not listed
https://bugs.launchpad.net/bugs/134911
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is a bug contact for gnome-control-center in ubuntu.

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs

Reply via email to