[gnome-control-center/gnome-3-34] display: Use correct mode for supported scale checking



commit 7f5696fb3971fbcbd2bb4ad9dba0fae7dbca9fd8
Author: Benjamin Berg <bberg redhat com>
Date:   Thu Oct 10 09:51:55 2019 +0200

    display: Use correct mode for supported scale checking
    
    Monitors may not always have a mode. This means we cannot look up the
    mode on the fly, but instead need to have a heuristic to select a mode
    if there is none.
    
    Everything was in place already for this, except that one location was
    still doing a fresh lookup, possibly causing a crash.
    
    Fixes: #675

 panels/display/cc-display-settings.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/panels/display/cc-display-settings.c b/panels/display/cc-display-settings.c
index fe2643ede..d793fccaa 100644
--- a/panels/display/cc-display-settings.c
+++ b/panels/display/cc-display-settings.c
@@ -397,7 +397,7 @@ cc_display_settings_rebuild_ui (CcDisplaySettings *self)
       GtkWidget *scale_btn;
 
       if (!cc_display_config_is_scaled_mode_valid (self->config,
-                                                   cc_display_monitor_get_mode (self->selected_output),
+                                                   current_mode,
                                                    *scale) &&
           cc_display_monitor_get_scale (self->selected_output) != *scale)
         continue;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]