diff --git a/src/backends/meta-monitor-config-store.c b/src/backends/meta-monitor-config-store.c index eaf70f299..18828c05f 100644 --- a/src/backends/meta-monitor-config-store.c +++ b/src/backends/meta-monitor-config-store.c @@ -68,6 +68,7 @@ * 1080 * 60.049972534179688 * + * yes * * yes * @@ -103,6 +104,7 @@ typedef enum STATE_MONITOR_MODE_WIDTH, STATE_MONITOR_MODE_HEIGHT, STATE_MONITOR_MODE_RATE, + STATE_MONITOR_UNDERSCANNING } ParserState; typedef struct @@ -252,6 +254,10 @@ handle_start_element (GMarkupParseContext *context, parser->state = STATE_MONITOR_MODE; } + else if (g_str_equal (element_name, "underscanning")) + { + parser->state = STATE_MONITOR_UNDERSCANNING; + } else { g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_UNKNOWN_ELEMENT, @@ -332,6 +338,13 @@ handle_start_element (GMarkupParseContext *context, "Invalid mode sub element '%s'", element_name); return; } + + case STATE_MONITOR_UNDERSCANNING: + { + g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_UNKNOWN_ELEMENT, + "Invalid element '%s' under underscanning", element_name); + return; + } } } @@ -566,6 +579,14 @@ handle_end_element (GMarkupParseContext *context, return; } + case STATE_MONITOR_UNDERSCANNING: + { + g_assert (g_str_equal (element_name, "underscanning")); + + parser->state = STATE_MONITOR; + return; + } + case STATE_MONITOR: { MetaLogicalMonitorConfig *logical_monitor_config; @@ -842,6 +863,14 @@ handle_text (GMarkupParseContext *context, error); return; } + + case STATE_MONITOR_UNDERSCANNING: + { + read_bool (text, text_len, + &parser->current_monitor_config->is_underscanning, + error); + return; + } } }