summaryrefslogtreecommitdiff
path: root/src/ui/theme-parser.c
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-10-24 21:59:58 +0200
committerinfirit <[email protected]>2014-10-27 12:29:24 +0100
commitbec068ef5ddc73f23ffd6298122bf818fd4d2084 (patch)
treed7db4682b85c601d069de72cf76dda77b8a5e8dc /src/ui/theme-parser.c
parentf814451acc48aec6d2fa1c217468f74e57a84340 (diff)
downloadmarco-bec068ef5ddc73f23ffd6298122bf818fd4d2084.tar.bz2
marco-bec068ef5ddc73f23ffd6298122bf818fd4d2084.tar.xz
Rework tiling code based off Consortium
Taken from https://github.com/SolusOS-discontinued/consortium/commit/b463e03f5bdeab307ceee6b969c681f29537c76d
Diffstat (limited to 'src/ui/theme-parser.c')
-rw-r--r--src/ui/theme-parser.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/ui/theme-parser.c b/src/ui/theme-parser.c
index c94e0e9a..dccb47ad 100644
--- a/src/ui/theme-parser.c
+++ b/src/ui/theme-parser.c
@@ -3136,6 +3136,28 @@ parse_style_set_element (GMarkupParseContext *context,
meta_frame_style_ref (frame_style);
info->style_set->maximized_styles[frame_focus] = frame_style;
break;
+ case META_FRAME_STATE_TILED_LEFT:
+ if (info->style_set->tiled_left_styles[frame_focus])
+ {
+ set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
+ _("Style has already been specified for state %s focus %s"),
+ state, focus);
+ return;
+ }
+ meta_frame_style_ref (frame_style);
+ info->style_set->tiled_left_styles[frame_focus] = frame_style;
+ break;
+ case META_FRAME_STATE_TILED_RIGHT:
+ if (info->style_set->tiled_right_styles[frame_focus])
+ {
+ set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
+ _("Style has already been specified for state %s focus %s"),
+ state, focus);
+ return;
+ }
+ meta_frame_style_ref (frame_style);
+ info->style_set->tiled_right_styles[frame_focus] = frame_style;
+ break;
case META_FRAME_STATE_SHADED:
if (info->style_set->shaded_styles[frame_resize][frame_focus])
{
@@ -3158,6 +3180,28 @@ parse_style_set_element (GMarkupParseContext *context,
meta_frame_style_ref (frame_style);
info->style_set->maximized_and_shaded_styles[frame_focus] = frame_style;
break;
+ case META_FRAME_STATE_TILED_LEFT_AND_SHADED:
+ if (info->style_set->tiled_left_and_shaded_styles[frame_focus])
+ {
+ set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
+ _("Style has already been specified for state %s focus %s"),
+ state, focus);
+ return;
+ }
+ meta_frame_style_ref (frame_style);
+ info->style_set->tiled_left_and_shaded_styles[frame_focus] = frame_style;
+ break;
+ case META_FRAME_STATE_TILED_RIGHT_AND_SHADED:
+ if (info->style_set->tiled_right_and_shaded_styles[frame_focus])
+ {
+ set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
+ _("Style has already been specified for state %s focus %s"),
+ state, focus);
+ return;
+ }
+ meta_frame_style_ref (frame_style);
+ info->style_set->tiled_right_and_shaded_styles[frame_focus] = frame_style;
+ break;
case META_FRAME_STATE_LAST:
g_assert_not_reached ();
break;