monitor-manager: Don't try to match the outputs on hotplug
meta_monitor_config_match_current() only matches the number of outputs and if the output connector, vendor, product and serial match. In the X backend, this means that we can't use it to bypass doing any work because it won't detect cases where we actually want to update ourselves like e.g. an output being turned off either by us or by another X client (e.g. xrandr). In the native backend, unlike the xrandr backend, we only get called on real hotplug events and thus should always trigger the common hotplug code to (possibly) apply a new mode so the check is pointless anyway. https://bugzilla.gnome.org/show_bug.cgi?id=738630
This commit is contained in:
parent
29e5c6c363
commit
b3821c4f90
@ -796,27 +796,6 @@ make_config_key (MetaConfiguration *key,
|
||||
key->n_outputs = o;
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_monitor_config_match_current (MetaMonitorConfig *self,
|
||||
MetaMonitorManager *manager)
|
||||
{
|
||||
MetaOutput *outputs;
|
||||
unsigned n_outputs;
|
||||
MetaConfiguration key;
|
||||
gboolean ok;
|
||||
|
||||
if (self->current == NULL)
|
||||
return FALSE;
|
||||
|
||||
outputs = meta_monitor_manager_get_outputs (manager, &n_outputs);
|
||||
|
||||
make_config_key (&key, outputs, n_outputs, -1);
|
||||
ok = config_equal (&key, self->current);
|
||||
|
||||
config_clear (&key);
|
||||
return ok;
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_monitor_manager_has_hotplug_mode_update (MetaMonitorManager *manager)
|
||||
{
|
||||
|
@ -36,9 +36,6 @@ GType meta_monitor_config_get_type (void) G_GNUC_CONST;
|
||||
|
||||
MetaMonitorConfig *meta_monitor_config_new (void);
|
||||
|
||||
gboolean meta_monitor_config_match_current (MetaMonitorConfig *config,
|
||||
MetaMonitorManager *manager);
|
||||
|
||||
gboolean meta_monitor_config_apply_stored (MetaMonitorConfig *config,
|
||||
MetaMonitorManager *manager);
|
||||
|
||||
|
@ -912,12 +912,6 @@ on_uevent (GUdevClient *client,
|
||||
|
||||
meta_monitor_manager_read_current_config (manager);
|
||||
|
||||
/* If this config matches our existing one, don't bother doing anything. */
|
||||
if (meta_monitor_config_match_current (manager->config, manager))
|
||||
return;
|
||||
|
||||
/* This is a hotplug event, so try to make a configuration for our new
|
||||
* set of outputs. */
|
||||
meta_monitor_manager_on_hotplug (manager);
|
||||
}
|
||||
|
||||
|
@ -1069,10 +1069,6 @@ meta_monitor_manager_xrandr_handle_xevent (MetaMonitorManagerXrandr *manager_xra
|
||||
|
||||
meta_monitor_manager_read_current_config (manager);
|
||||
|
||||
/* If this config matches our existing one, don't bother doing anything. */
|
||||
if (meta_monitor_config_match_current (manager->config, manager))
|
||||
return TRUE;
|
||||
|
||||
hotplug = manager_xrandr->resources->timestamp < manager_xrandr->resources->configTimestamp;
|
||||
if (hotplug)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user