summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Rostovtsev <tetromino@gentoo.org>2012-01-01 18:48:34 +0000
committerAlexandre Rostovtsev <tetromino@gentoo.org>2012-01-01 18:48:34 +0000
commit48145a2643044f7009a273bbcfad5a032f8a64e3 (patch)
tree0b7ba6e1bdb9dcbbe2795ee85b6600bf47f51d83 /x11-wm/mutter/files
parentalpha/arm/ia64/s390/sh/sparc stable wrt #392749 (diff)
downloadgentoo-2-48145a2643044f7009a273bbcfad5a032f8a64e3.tar.gz
gentoo-2-48145a2643044f7009a273bbcfad5a032f8a64e3.tar.bz2
gentoo-2-48145a2643044f7009a273bbcfad5a032f8a64e3.zip
Add Ubuntu patch to enable support for Ubuntu's metacity themes such as x11-themes/light-themes (bug #396673, thanks to Luis Medinas for reporting).
(Portage version: 2.2.0_alpha84/cvs/Linux x86_64)
Diffstat (limited to 'x11-wm/mutter/files')
-rw-r--r--x11-wm/mutter/files/mutter-3.2.1-ignore-shadow-and-padding.patch91
1 files changed, 91 insertions, 0 deletions
diff --git a/x11-wm/mutter/files/mutter-3.2.1-ignore-shadow-and-padding.patch b/x11-wm/mutter/files/mutter-3.2.1-ignore-shadow-and-padding.patch
new file mode 100644
index 000000000000..bf4649e75ed8
--- /dev/null
+++ b/x11-wm/mutter/files/mutter-3.2.1-ignore-shadow-and-padding.patch
@@ -0,0 +1,91 @@
+Patch author: Timo Kluck <tkluck@infty.nl> Wed, 21 Sep 2011 17:51:28 +0200
+
+Patch to silently ignore padding and shadow tags in Ubuntu metacity themes.
+
+https://bugs.launchpad.net/bugs/800315
+https://bugs.gentoo.org/show_bug.cgi?id=396673
+
+diff --git a/src/ui/theme-parser.c b/src/ui/theme-parser.c
+index 9063541..63a881f 100644
+--- a/src/ui/theme-parser.c
++++ b/src/ui/theme-parser.c
+@@ -90,7 +90,9 @@ typedef enum
+ STATE_WINDOW,
+ /* things we don't use any more but we can still parse: */
+ STATE_MENU_ICON,
+- STATE_FALLBACK
++ STATE_FALLBACK,
++ /* an ubuntu specific ignore-this-element state */
++ UBUNTU_STATE_IGNORE
+ } ParseState;
+
+ typedef struct
+@@ -1306,7 +1308,19 @@ parse_toplevel_element (GMarkupParseContext *context,
+ */
+ push_state (info, STATE_FALLBACK);
+ }
+- else
++ else if (ELEMENT_IS ("shadow"))
++ {
++ /* ubuntu specific, workaround for light-themes: silently ignore shadow tag.
++ */
++ push_state (info, UBUNTU_STATE_IGNORE);
++ }
++ else if (ELEMENT_IS ("padding"))
++ {
++ /* ubuntu specific, workaround for light-themes: silently ignore padding tag.
++ */
++ push_state (info, UBUNTU_STATE_IGNORE);
++ }
++ else
+ {
+ set_error (error, context,
+ G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
+@@ -3027,6 +3041,18 @@ parse_style_element (GMarkupParseContext *context,
+
+ push_state (info, STATE_BUTTON);
+ }
++ else if (ELEMENT_IS ("shadow"))
++ {
++ /* ubuntu specific, workaround for light-themes: silently ignore shadow tag.
++ */
++ push_state (info, UBUNTU_STATE_IGNORE);
++ }
++ else if (ELEMENT_IS ("padding"))
++ {
++ /* ubuntu specific, workaround for light-themes: silently ignore padding tag.
++ */
++ push_state (info, UBUNTU_STATE_IGNORE);
++ }
+ else
+ {
+ set_error (error, context,
+@@ -3671,6 +3697,8 @@ start_element_handler (GMarkupParseContext *context,
+ _("Element <%s> is not allowed inside a <%s> element"),
+ element_name, "fallback");
+ break;
++ case UBUNTU_STATE_IGNORE:
++ break;
+ }
+ }
+
+@@ -3960,6 +3988,9 @@ end_element_handler (GMarkupParseContext *context,
+ pop_state (info);
+ g_assert (peek_state (info) == STATE_THEME);
+ break;
++ case UBUNTU_STATE_IGNORE:
++ pop_state (info);
++ break;
+ }
+
+ pop_required_version (info);
+@@ -4165,6 +4196,9 @@ text_handler (GMarkupParseContext *context,
+ case STATE_FALLBACK:
+ NO_TEXT ("fallback");
+ break;
++ case UBUNTU_STATE_IGNORE:
++ NO_TEXT ("ignored_element");
++ break;
+ }
+ }
+