mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 11:32:04 +00:00
monitor-store: Add support for monitor underscanning
Add a <monitor> subelement <underscanning> for configuring output underscanning. https://bugzilla.gnome.org/show_bug.cgi?id=777732
This commit is contained in:
parent
097ca01411
commit
e357b4a46a
@ -68,6 +68,7 @@
|
|||||||
* <height>1080</height>
|
* <height>1080</height>
|
||||||
* <rate>60.049972534179688</rate>
|
* <rate>60.049972534179688</rate>
|
||||||
* </mode>
|
* </mode>
|
||||||
|
* <underscanning>yes</underscanning>
|
||||||
* </monitor>
|
* </monitor>
|
||||||
* <presentation>yes</presentation>
|
* <presentation>yes</presentation>
|
||||||
* </logicalmonitor>
|
* </logicalmonitor>
|
||||||
@ -103,6 +104,7 @@ typedef enum
|
|||||||
STATE_MONITOR_MODE_WIDTH,
|
STATE_MONITOR_MODE_WIDTH,
|
||||||
STATE_MONITOR_MODE_HEIGHT,
|
STATE_MONITOR_MODE_HEIGHT,
|
||||||
STATE_MONITOR_MODE_RATE,
|
STATE_MONITOR_MODE_RATE,
|
||||||
|
STATE_MONITOR_UNDERSCANNING
|
||||||
} ParserState;
|
} ParserState;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
@ -252,6 +254,10 @@ handle_start_element (GMarkupParseContext *context,
|
|||||||
|
|
||||||
parser->state = STATE_MONITOR_MODE;
|
parser->state = STATE_MONITOR_MODE;
|
||||||
}
|
}
|
||||||
|
else if (g_str_equal (element_name, "underscanning"))
|
||||||
|
{
|
||||||
|
parser->state = STATE_MONITOR_UNDERSCANNING;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_UNKNOWN_ELEMENT,
|
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);
|
"Invalid mode sub element '%s'", element_name);
|
||||||
return;
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case STATE_MONITOR_UNDERSCANNING:
|
||||||
|
{
|
||||||
|
g_assert (g_str_equal (element_name, "underscanning"));
|
||||||
|
|
||||||
|
parser->state = STATE_MONITOR;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
case STATE_MONITOR:
|
case STATE_MONITOR:
|
||||||
{
|
{
|
||||||
MetaLogicalMonitorConfig *logical_monitor_config;
|
MetaLogicalMonitorConfig *logical_monitor_config;
|
||||||
@ -842,6 +863,14 @@ handle_text (GMarkupParseContext *context,
|
|||||||
error);
|
error);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case STATE_MONITOR_UNDERSCANNING:
|
||||||
|
{
|
||||||
|
read_bool (text, text_len,
|
||||||
|
&parser->current_monitor_config->is_underscanning,
|
||||||
|
error);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user