display: Add a signal for scale changes

This will allows other bits of the UI to monitor scale changes.
This commit is contained in:
Rui Matos 2017-08-21 15:24:11 +02:00
parent 023c988ad6
commit e4dc2995a3
2 changed files with 7 additions and 0 deletions

View file

@ -716,6 +716,8 @@ cc_display_monitor_dbus_set_scale (CcDisplayMonitor *pself,
/* See comment in ensure_gapless() for why we disregard the
existing layout here. */
cc_display_config_dbus_make_linear (self->config);
g_signal_emit_by_name (self, "scale");
}
}

View file

@ -102,6 +102,11 @@ cc_display_monitor_class_init (CcDisplayMonitorClass *klass)
G_SIGNAL_RUN_LAST,
0, NULL, NULL, NULL,
G_TYPE_NONE, 0);
g_signal_new ("scale",
CC_TYPE_DISPLAY_MONITOR,
G_SIGNAL_RUN_LAST,
0, NULL, NULL, NULL,
G_TYPE_NONE, 0);
}
const char *