<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule">

<channel>
	<title>…for the adult in you &#187; Metacity Labs</title>
	<atom:link href="http://blogs.gnome.org/metacity/category/metacity-labs/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.gnome.org/metacity</link>
	<description>"Many window managers are like Marshmallow Froot Loops; Metacity is like Cheerios."</description>
	<lastBuildDate>Wed, 04 Nov 2009 10:59:51 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>		<item>
		<title>Future directions of Cowbell</title>
		<link>http://blogs.gnome.org/metacity/2009/11/04/future-directions-of-cowbell/</link>
		<comments>http://blogs.gnome.org/metacity/2009/11/04/future-directions-of-cowbell/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 10:50:16 +0000</pubDate>
		<dc:creator>Thomas Thurman</dc:creator>
				<category><![CDATA[CSS themes]]></category>
		<category><![CDATA[Letters]]></category>
		<category><![CDATA[Metacity Labs]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/metacity/?p=654</guid>
		<description><![CDATA[Future directions. Here&#8217;s where Cowbell is going next:

 The existing functionality is going to be moved into a library called libcowbell.  Very little will be changed at this point from what we already have.  (But there will be some extra tests.)
A release of the metacity-cowbell branch will be made that can use libcowbell.
A release of [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Traffic signs by Honza Soukup, on Flickr" href="http://www.flickr.com/photos/honzasoukup/2493109170/"><img src="http://farm4.static.flickr.com/3022/2493109170_b7d0c9553f.jpg" alt="Traffic signs" width="500" height="332" align="right" /></a><strong>Future directions. </strong>Here&#8217;s where Cowbell is going next:</p>
<ol>
<li> The existing functionality is going to be moved into a library called libcowbell.  Very little will be changed at this point from what we already have.  (But there will be some extra tests.)</li>
<li>A release of the metacity-cowbell branch will be made that can use libcowbell.</li>
<li>A release of real Metacity will be made that can use either libcowbell or conventional themes.</li>
<li>Development of libcowbell can continue.  (I expect pseudoclasses to be among the first things added.)</li>
</ol>
<p><strong>More more cowbell. </strong>Iain has pointed out <a href="http://more-cowbell.org/index.php/Main_Page">an existing GNOME-based project called cowbell</a>.  I hope the fact that <em>this</em> project will be <em>lib</em>cowbell will be enough to avoid confusion.</p>
<p><strong>Feedback on feedback. </strong>Screwtape has reviewed <a href="http://people.collabora.co.uk/~tthurman/cowbell/doc/">the existing cowbell documentation</a> in a web page <a href="http://zork.net/~st/cowbell-themes.txt">here</a>.  Here is my feedback on the feedback:</p>
<ul>
<li><strong>§3:</strong> I did start out by showing the structure as pseudo-XML, but <a href="http://blogs.gnome.org/metacity/2009/07/18/more-css-thoughts/#comment-1062">people commented as if</a> the window borders were the result of rendering that XML (as if it were <a href="https://developer.mozilla.org/En/XUL">XUL</a>, or something similar), so I think it may be misleading.</li>
<li><strong>§3:</strong> I dithered over using the ID or a class for this sort of thing for quite a while.  In the end I went with a class because we use classes for buttons (since they may repeat) and it seemed as well to use the same design for areas, and because you may have more than one content area visible at once, even if they <em>are</em> on separate windows.  But I may have been wrong, and I invite opposing opinions.</li>
<li><strong>§</strong><strong>3: <em>buttongroup:</em></strong> I really like this idea.  But AFAIK libccss doesn&#8217;t yet support last-child etc (see next&#8230;)</li>
<li><strong>§</strong><strong>3.1<em>:</em></strong> I want our CSS support to be up to level 3 wherever possible.  However, we are constrained partly by what libccss is currently capable of.  Of course we can patch libccss too!  <a href="http://www.w3.org/TR/css3-background/"><em>Backgrounds and Borders</em></a> is largely supported by libccss, though.</li>
<li><strong>§</strong><strong>3.2:<em></em></strong> Unpainted areas are transparent (though if the frame is opaque, you&#8217;ll just see the frame through them).</li>
<li><strong>§</strong><strong>3.3<em></em></strong><strong>:</strong> font-size is important; what should the interaction be between the font size set in Metacity gconf and the font size in the theme?  Just use the theme font size for scaling as in v2?</li>
<li><strong>§</strong><strong>3.3<em></em></strong><strong>:</strong> button heights: I think I didn&#8217;t explain myself properly here.  You can (should) set <em>height</em> and <em>width</em> on buttons.  But these only serve to establish an aspect ratio.  The height is always calculated from the titlebar height at present.  Perhaps this is overly confusing.</li>
<li><strong>§</strong><strong>3.</strong><strong>5:</strong> <em>:focus</em> pseudoclass: perhaps this should be set on <em>all</em> elements in a focused window.  Or perhaps just the frame and we can use the descendant selector.</li>
<li><strong>§</strong><strong>3.5</strong><strong>:</strong> <em>:disabled</em> &#8212; hadn&#8217;t thought of this, good idea.  <a href="http://en.wikipedia.org/wiki/There%27s_more_than_one_way_to_do_it">TMTOWTDI</a>.</li>
<li><strong>§</strong><strong>3.5</strong><strong>:</strong> I&#8217;m not sure libccss supports <em>:not() </em>(but maybe it does!)  If so, yes, we should use it.  It&#8217;s far better to work the way people expect us to work.</li>
<li><strong>§</strong><strong>3.7</strong><strong>:</strong> I hope we support SVG too.  It would be extra nice if it could be styled with the same CSS somehow.</li>
<li><strong>§</strong><strong>3.8</strong><strong>:</strong> I really want mm and em as well as px.  I&#8217;m not certain libccss knows how to do this, but I will check.</li>
<li><strong>§</strong><strong>4</strong><strong>:</strong> Nobody&#8217;s really tried to put Dublin Core data in CSS before, and I&#8217;m probably not doing it the best way.  I worry that including a required custom XML file will be slipping back into using custom formats, though.  Maybe we should use an @rule.  Or specially-formatted comments.  Or maybe we should give up on the whole required metadata idea.</li>
<li><strong>§</strong><strong>4</strong><strong>:</strong> I like the idea of specifying alternative stylesheets, though metadata in the stylesheets themselves could also do this.</li>
<li><strong>§</strong><strong>6.1</strong><strong>:</strong> yes, we really need a default stylesheet.  I&#8217;m not sure what should go into it.  I will think about this and include it in the first libcowbell release.</li>
<li><strong>§</strong><strong>6.2</strong><strong>:</strong> okay, we&#8217;ll avoid data: URLs.</li>
<li><strong>§</strong><strong>6.2</strong><strong>:</strong> let&#8217;s implement <a href="http://people.collabora.co.uk/~tthurman/cowbell/doc/x341.html#single">the single file doctrine</a> by allowing any file in <em>~/.themes/ThemeName/cowbell/ThemeName.tar</em> to be treated as if it was in <em>~/.themes/ThemeName/cowbell/</em>.  I think we can get that in the first libcowbell release too.</li>
<li><strong>§</strong><strong>6.5</strong><strong>:</strong> I really like <a href="http://getfirebug.com/">Firebug</a>.  Are you thinking we could use Firebug itself, or just copy its UI?</li>
<li><strong>§</strong><strong>6.11</strong><strong>:</strong> Maybe we could also modify hue/saturation/value directly in the URL thus: <em>url(&#8217;file:fred.png?hue=#f00&#8242;)</em>?</li>
<li><strong>§</strong><strong>6.13<em></em></strong><strong>:</strong> I was thinking of themes which, say, repeat a pattern an integral number of times on the otherwise empty part of the titlebar, scaled to fit; this wouldn&#8217;t be possible using border-images, but would work fine with <em>filler</em>.  On the other hand, perhaps this is overkill.</li>
</ul>
<p>Feedback from everyone reading this, on the above and on the original document, is very welcome.</p>
<p>Maybe we need to take over a little piece of live.gnome.org to hash all this out.  Or maybe we need a mailing list.  I&#8217;ll wikify all this tonight and then post about it here.</p>
<p><a href="http://www.flickr.com/photos/honzasoukup/2493109170/"><em>Photo © Honza Soukup, cc-by.</em></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/metacity/2009/11/04/future-directions-of-cowbell/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Apologia for CSS</title>
		<link>http://blogs.gnome.org/metacity/2009/07/20/apologia/</link>
		<comments>http://blogs.gnome.org/metacity/2009/07/20/apologia/#comments</comments>
		<pubDate>Mon, 20 Jul 2009 19:05:07 +0000</pubDate>
		<dc:creator>Thomas Thurman</dc:creator>
				<category><![CDATA[CSS themes]]></category>
		<category><![CDATA[Letters]]></category>
		<category><![CDATA[Metacity Labs]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/metacity/?p=633</guid>
		<description><![CDATA[This blog is not about to become devoted to the single topic of experimental CSS theming, but some interesting points were raised in the discussion yesterday, which spilled over to Slashdot.  We should have emphasised the experimental nature of the CSS subsystem in its name: perhaps &#8220;CSS On Window Borders Experimental Layout Language&#8221;.
Why? Some people [...]]]></description>
			<content:encoded><![CDATA[<p><a title="2000 two pence by johninbkk, on Flickr" href="http://www.flickr.com/photos/jinbkk/2540460406/"><img src="http://farm4.static.flickr.com/3194/2540460406_71cbd17b9b.jpg" alt="2000 two pence" width="500" height="332" align="right" /></a>This blog is not about to become devoted to the single topic of <a href="http://blogs.gnome.org/metacity/category/themes/themes-v3/css-themes/">experimental CSS theming</a>, but some interesting points were raised in the discussion yesterday, which <a href="http://slashdot.org/comments.pl?sid=1307903">spilled over to Slashdot</a>.  We should have emphasised the experimental nature of the CSS subsystem in its name: perhaps &#8220;<span style="text-decoration: underline;"><strong>C</strong></span>SS <span style="text-decoration: underline;"><strong>O</strong></span>n <span style="text-decoration: underline;"><strong>W</strong></span>indow <span style="text-decoration: underline;"><strong>B</strong></span>orders <span style="text-decoration: underline;"><strong>E</strong></span>xperimental <span style="text-decoration: underline;"><strong>L</strong></span>ayout <span style="text-decoration: underline;"><strong>L</strong></span>anguage&#8221;.</p>
<p><strong>Why?</strong> Some people have asked why anyone should be interested in CSS theming, given the existence of a stable and mature theme description format.  The answer is that there are perhaps a couple of hundred people in the world who understand the Metacity theme format, and its complexity presents a significant barrier to entry for anyone else attempting to learn it.  By contrast, millions upon millions of people have a basic understanding of CSS.</p>
<p><strong>Efficiency.</strong> Some have pointed out that using CSS may cause great increase in memory footprint or execution time.  Both of these are of primary importance to us.  Furthermore, we know just <a href="http://blogs.gnome.org/metacity/2008/12/29/theme-speed/">how fast every theme renders</a> using the standard engine.  We are not prepared to introduce a new theme engine unless it is at least as efficient as the old one.</p>
<p><strong>Mismatch.</strong> Some complain that <a href="http://blogs.gnome.org/metacity/2009/07/18/more-css-thoughts/">the lists we gave</a> of things we would need to ignore and things which would need to be added proved that there was a mismatch between CSS and what was needed.  This is based on a misunderstanding of CSS as a language to style HTML.  In fact CSS is a general-purpose styling language, and there are only a few places where it does not quite meet our needs.  Even in those places the design is flexible enough to accommodate us.</p>
<p><strong>The balance of power. </strong><a href="http://blogs.gnome.org/metacity/2009/07/18/more-css-thoughts/#comment-1067">Ray asked whether</a> the structure of the window should be under theme control, as well as the styling. Some ask how we decide what is under the control of the CSS.  We always need to find a balance between giving power to themes and giving power to users.  Some things should be under theme control and some under user control, but it&#8217;s not trivial to decide which.  Here are some examples:</p>
<ul>
<li><em>Justification of the text on the titlebar</em>.  Currently this is entirely under theme control; the user can&#8217;t change it.  <a href="http://blogs.gnome.org/metacity/2008/05/31/justifying-window-titles/">Some people would like this to change.</a></li>
<li><em>The arrangement of buttons on the titlebar</em>: which are on the left, which are on the right, and which aren&#8217;t shown at all.  This is currently entirely under user control; the theme can&#8217;t change it.  (This means that <a href="http://www.gnome-look.org/content/show.php/OSX-Tiger+theme?content=56577">themes which attempt to look like OS X</a> have to ask you to reorder your buttons so that close is on the left, since they can&#8217;t do it themselves.)</li>
<li><em>The font on the titlebar.</em> Currently this is entirely under user control; the theme can&#8217;t change it.  This among other things is something we&#8217;d need to reexamine with a CSS theming engine.</li>
</ul>
<p>(&#8221;Under user control&#8221; means set in GConf and, generally, modifiable in the control panel.  Some of these options cannot be set in the control panel at present, but that&#8217;s a separate problem.)</p>
<p>It <em>may be</em> true that windows should have a more flexible structure, and the ability to have the titlebar elsewhere is certainly <a href="http://blogs.gnome.org/metacity/2008/12/28/the-letters-page/#comment-658">something that&#8217;s been asked for</a> from time to time.  But assuming we should add such abilities, should the decision to use them be made by the theme, or should it be something selectable by the user in the control panel?  These are deep questions.</p>
<p><strong>Co-operation with GTK CSS theming.</strong> Yes: a good idea.  Whatever they&#8217;re doing, we should probably try to share in it.</p>
<p><strong>Complexity.</strong> Some have said that CSS is a complex system, and that anything implementing it will therefore also be complex and difficult to implement.  This is an unwarranted assumption.  Take a look at the <a href="http://www.w3.org/TR/CSS2/">table of contents of the CSS specification</a> and see how little of it actually applies to a fully-functional system for description of window borders:</p>
<ul class="toc">
<li class="tocline1"><em><span class="tocxref">Syntax and basic data types; Selectors</span></em>; <em><span class="tocxref">Assigning property values, Cascading, and Inheritance</span></em>; <em><span class="tocxref">Media types</span></em>:  all handled for us already by <a href="http://www.freespiders.org/projects/libcroco/">libcroco</a>.</li>
<li class="tocline1"><em><span class="tocxref">Box model</span></em>: we would need to implement this.  Not terribly complex because we have a simple and unchangeable layout model.</li>
<li class="tocline1"><em><span class="tocxref">Visual formatting model</span>; <span class="tocxref">Visual effects</span></em>: these are complex, and we can ignore them entirely, since our layout needs are simple and unchangeable.</li>
<li class="tocline1"><em><span class="tocxref">Generated <span class="index-def" title="generated content">content</span>, automatic <span class="index-def" title="automatic numbering">numbering</span>, and lists</span></em>: we would need to implement basic generated content (the easy part); we have no content to be numbered, and no lists.</li>
<li class="tocline1"><em><span class="tocxref">Paged media</span></em>: does not apply to us.</li>
<li class="tocline1"><em><span class="tocxref">Colors and Backgrounds</span></em>: the most complex part which we would need to implement.</li>
<li class="tocline1"><em><span class="tocxref">Fonts; Text</span></em>: partially applies to us (since some of it isn&#8217;t theme-controlled); mostly involves passing things into Pango.</li>
<li class="tocline1"><em><span class="tocxref">Tables</span></em>: doesn&#8217;t apply to us; we have no tables.</li>
<li class="tocline1"><em><span class="tocxref">User interface</span></em>: this is about setting cursors and things, and doesn&#8217;t apply to us.</li>
</ul>
<p><strong>Finally</strong>, we should probably reiterate that:</p>
<ul>
<li>this is still an experiment, and not an official direction which Metacity is taking;</li>
<li>even if it ever happens, there&#8217;s certainly no decision to use WebKit.</li>
</ul>
<p><em>Photo © johninbkk, cc-by.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/metacity/2009/07/20/apologia/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>More CSS thoughts</title>
		<link>http://blogs.gnome.org/metacity/2009/07/18/more-css-thoughts/</link>
		<comments>http://blogs.gnome.org/metacity/2009/07/18/more-css-thoughts/#comments</comments>
		<pubDate>Sat, 18 Jul 2009 23:17:31 +0000</pubDate>
		<dc:creator>Thomas Thurman</dc:creator>
				<category><![CDATA[CSS themes]]></category>
		<category><![CDATA[Thought experiments]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/metacity/?p=627</guid>
		<description><![CDATA[The recent discussion about CSS themes looks as though it may become one of the most interesting new ideas in theming in recent years.  Here are some further thoughts on what may evolve from this.
An alternative. There is no general way, and few special ways, to convert expression-based v1 and v2 themes to the [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Call... (4 of 4) [2007 - Day 174 - Edge] by Jonathan_W, on Flickr" href="http://www.flickr.com/photos/s3a/600869019/"><img src="http://farm2.static.flickr.com/1135/600869019_9aadfd512b.jpg" alt="Call... (4 of 4) [2007 - Day 174 - Edge]" width="333" height="500" align="right" /></a><a href="http://blogs.gnome.org/metacity/2009/07/15/copper-an-experiment-with-css/">The recent discussion about CSS themes</a> looks as though it may become one of the most interesting new ideas in theming in recent years.  Here are some further thoughts on what may evolve from this.</p>
<p><strong>An alternative.</strong> There is no general way, and few special ways, to convert expression-based v1 and v2 themes to the hypothetical box-based CSS themes.  Therefore this would need to be an <em>alternative</em> theming system, without any upgrade path leading to it.</p>
<p><strong>Document structure.</strong> CSS exists to style documents.  In our case the document is purely notional rather than existing somewhere as a file, so we have great leeway in its representation.  As I mentioned earlier, there are multiple ways in which we can use the ideas of element name, ID, and class to represent what we want to do.  The guiding principle is not what would be easiest to implement but what would cause least astonishment to new theme authors.  After some thought, I think such a layout might look like this:</p>
<blockquote><p>&lt;frame <em>class=&#8221;maximized&#8221;</em>&gt;<br />
&lt;area <em>class=&#8221;titlebar&#8221;&gt;<br />
</em> <em> </em>&lt;button <em>class=&#8221;menu&#8221;/&gt;</em> &lt;!&#8211; possibly others &#8211;&gt;<br />
<em> </em> &lt;title/&gt;<br />
<em> </em> <em> </em>&lt;button <em>class=&#8221;minimize&#8221;/&gt;</em><br />
<em> </em>&lt;button <em>class=&#8221;maximize&#8221;/&gt;</em><br />
<em> </em>&lt;button <em>class=&#8221;close&#8221;/&gt;</em> &lt;!&#8211; possibly others &#8211;&gt;<br />
&lt;/area&gt;<br />
&lt;area <em>class=&#8221;content</em>&#8220;/&gt;<br />
&lt;/frame&gt;</p></blockquote>
<ul>
<li>Feel free to disagree and to come up with alternatives.</li>
<li>There are no attributes on any element.  Attempts to select on attributes will fail.  The class is written as an attribute only for notational convenience: hence the italics.</li>
<li>Class is used instead of identifier because it&#8217;s not impossible that some implementation of this scheme will wish to have multiple buttons with the same function on a frame.</li>
</ul>
<p><img src="http://www.gnome.org/~tthurman/pics/metacity/layers.png" alt="" align="right" /><strong>CSS3.</strong> Almost everything we already have can be represented in CSS level 2, and there is no immediate need for level 3.  The sticking point mentioned earlier was the window icon being part of the title in <em>Atlanta</em>.  However, this can be implemented in CSS2 as follows:</p>
<blockquote><p><code>title:before {<br />
content: url("metacity:icon");<br />
}</code></p></blockquote>
<p>where <em>metacity:icon</em> is a magic URL which returns the current application icon.  (But it might be wise not to use the name &#8220;Metacity&#8221; in this format, in case other window managers might like to use it; that goes for <a href="http://www.w3.org/TR/css3-syntax/#vendor-specific">vendor-specific extensions</a>, too.  Maybe we should use <strong>-wm-</strong>.)  That said, I am salivating over the possibilities of the new <em>round</em> attribute to <a href="http://www.w3.org/TR/css3-background/#the-background-repeat"><em>background-repeat</em></a>.</p>
<p>However, there is one piece of level 3 we absolutely need: we will need to allow <a href="http://www.w3.org/TR/css3-background/#the-border-radius"><em>border-radius</em></a> at least on the frame, if not on the subsidiary elements.</p>
<p><strong>Implementation.</strong> A format is independent of implementations, of course, but we need at least one implementation in order to test things. There have been a few possible implementations suggested:</p>
<ul>
<li><strong><a href="http://webkit.org/">webkit</a>.</strong> This would work and reuse a lot of code, but I&#8217;m a little wary of embedding a web browser into the window manager.</li>
<li><strong><a href="http://moblin.org/projects/netbook-toolkit-nbtk">nbtk</a>. </strong>This seems to be missing a lot of what we need at present.</li>
<li><strong><a href="http://www.ohloh.net/p/libccss">libccss</a>. </strong>This has more of what we need, but still there&#8217;s a lot left open to us to implement, and a lot of what it implements we don&#8217;t need.  It also doesn&#8217;t allow us to define new colours, which we need, and appears not to implement sibling selectors, which we will probably also need.</li>
<li><strong>Using <a href="http://www.freespiders.org/projects/libcroco/">libcroco</a> for parsing and cascading and building the rest ourselves.</strong> This is slightly more work than using nbtk or libccss, but may be necessary because of the particularly specialised nature of what we are doing here.</li>
</ul>
<p><strong>Justification.</strong> One of the things people seem very keen on is <a href="http://blogs.gnome.org/metacity/2008/05/31/justifying-window-titles/">how the window title is justified</a>.  In the box model, the correct way to do this is with the <em>auto</em> keyword on the padding or margins of the title, and not using a <a href="http://www.css3.com/css-text-justify/"><em>text-justify</em></a> declaration (since the title only has one line of text which fits snugly in its own content box).  However, since people are bound to try to use <em>text-justify</em> anyway, perhaps we should allow them to do so, and merely interpret it as another way of setting the padding.</p>
<p><strong>Things we need to implement:</strong> The whole box model; several kinds of border pattern; basic generated content for the title; various kinds of text styling for the title; ability to use pseudoclasses to prelight and press buttons.</p>
<p><strong>Things we should ignore:</strong> Padding on the frame.  Height and width set on the frame, or the content box.  Perhaps: Any theme without proper metadata.  If we&#8217;re doing things the same way as in v2, the <em>font-family</em>, <em>font-weight</em>, and <em>font-style</em> set for the title.  (Or should we allow themes to specify a font?)  Should we give a warning if a theme attempts to use anything we don&#8217;t support?</p>
<p><em>Photo © Jonathan W, cc-by-nc-nd.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/metacity/2009/07/18/more-css-thoughts/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Further thoughts on extending the window menu</title>
		<link>http://blogs.gnome.org/metacity/2009/07/16/further-thoughts-on-extending-the-window-menu/</link>
		<comments>http://blogs.gnome.org/metacity/2009/07/16/further-thoughts-on-extending-the-window-menu/#comments</comments>
		<pubDate>Thu, 16 Jul 2009 01:06:49 +0000</pubDate>
		<dc:creator>Thomas Thurman</dc:creator>
				<category><![CDATA[Thought experiments]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[nargery]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/metacity/?p=620</guid>
		<description><![CDATA[The previous post about extending the window menu caused a great deal of discussion.  It would seem that our readers would be interested in an implementation.  Thomas is considering working on this after the window matching experiments are more stable.
Now, we can imagine that any package might want to add menu options when it [...]]]></description>
			<content:encoded><![CDATA[<p><a title="alpine strawberry by van swearingen, on Flickr" href="http://www.flickr.com/photos/vsny/152891728/"><img src="http://farm1.static.flickr.com/50/152891728_0674519ada.jpg" alt="alpine strawberry" width="500" height="333" align="right" /></a><a href="http://blogs.gnome.org/metacity/2009/07/13/the-window-menu/">The previous post about extending the window menu</a> caused a great deal of discussion.  It would seem that our readers would be interested in an implementation.  Thomas is considering working on this after the window matching experiments are more stable.</p>
<p>Now, we can imagine that any package might want to add menu options when it was installed, and delete them when it was removed.  Let us not concern ourselves for the moment with how a menu option and its effects are represented, other than assuming that it may be represented by an ASCII string. Rather, let us consider the ways in which a newly-installed application may wish to add menu options.  We are concerned with two kinds of menu option:</p>
<ul>
<li>∀: these appear on every window menu, for as long as the application is installed.  It need not be running.  For example, <em>Take screencast</em> should be available when <a href="http://live.gnome.org/Istanbul">Istanbul</a> is installed and removed when Istanbul is removed.</li>
<li>∃: these appear only on the menus of windows created by the application itself.  For example, <em>Play</em> should appear on <a href="http://projects.gnome.org/rhythmbox/">Rhythmbox</a>&#8217;s window menu, but not on other applications&#8217; menus, even if Rhythmbox is running.  (Otherwise, how would a user tell the difference between Rhythmbox&#8217;s <em>Play</em> and the <em>Play </em>of <a href="http://projects.gnome.org/totem/">Totem</a>?)</li>
</ul>
<p>Users should have the option of disabling any ∀ options which are currently installed; the full set of ∀ options would be available in some kind of settings dialogue where a decision could be made about which options belonged on the list.  It should be noted that <em>Minimize</em>, <em>Maximize</em>, <em>Close</em>, etc., are the ∀ of the window manager itself.</p>
<p>So, where should these settings be stored?</p>
<ul>
<li><strong>In X properties on windows:</strong> The ∀ options would be stored as properties on the root window, and the ∃ options as properties on the windows involved.  This would be the simplest to implement, but who has the responsibility to set the property on the root window, and where does the data come from?</li>
<li><strong>In GConf:</strong> This would only work for ∀ options.  It&#8217;s presumably a better plan than keeping them on the root window, though, and we could still use X properties for the ∃ options.</li>
<li><strong>In <a href="http://standards.freedesktop.org/desktop-entry-spec/latest/">/usr/share/applications/*.desktop</a>:</strong> This is the way which would integrate best with package management, but would cause rather a performance hit as all the .desktop files would need to be scanned when the WM started up, and then there would need to be some kind of particularly clever window matching to work out which .desktop file corresponded to which windows for ∃.</li>
</ul>
<p>Some kind of <strong>hybrid approach</strong> may be best: we could keep the ∀ menu options in .desktop files, and have a utility program that was run when any package was added or removed, to update GConf with the values.  Or perhaps this updating could be done in the control centre, when the user chose which subset of ∀ options they wanted.  Then we could keep ∃ options as properties on the windows, and rely on the toolkits to update them (perhaps even by <a href="http://library.gnome.org/devel/glib/stable/glib-Key-value-file-parser.html">parsing the application&#8217;s .desktop file</a>).</p>
<p><em>Photo © van swearingen, cc-by-nc-sa.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/metacity/2009/07/16/further-thoughts-on-extending-the-window-menu/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Copper: an experiment with CSS</title>
		<link>http://blogs.gnome.org/metacity/2009/07/15/copper-an-experiment-with-css/</link>
		<comments>http://blogs.gnome.org/metacity/2009/07/15/copper-an-experiment-with-css/#comments</comments>
		<pubDate>Wed, 15 Jul 2009 01:08:08 +0000</pubDate>
		<dc:creator>Thomas Thurman</dc:creator>
				<category><![CDATA[CSS themes]]></category>
		<category><![CDATA[Metacity Labs]]></category>
		<category><![CDATA[nargery]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/metacity/?p=606</guid>
		<description><![CDATA[Further to our previous discussion of CSS, Thomas spent a few hours on sketching out a possible design for a CSS-based theme format, and on representing Daniel Borgmann&#8217;s Human theme using it.  This is an experiment, all very blue-sky and unofficial, and is quite likely never to lead anywhere.
The first question to resolve is [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Copper by rogdorf, on Flickr" href="http://www.flickr.com/photos/hillierr/155143042/"><img src="http://farm1.static.flickr.com/66/155143042_74be35fe8f.jpg" alt="Copper" width="500" height="375" align="right" /></a>Further to <a href="http://blogs.gnome.org/metacity/2009/07/06/libccss/">our previous discussion of CSS</a>, Thomas spent a few hours on sketching out a possible design for a CSS-based theme format, and on representing <a href="http://dborg.wordpress.com/">Daniel Borgmann</a>&#8217;s <a href="http://www.gnome.org/~tthurman/pics/metacity/themes/human.png"><em>Human</em></a> theme using it.  This is an experiment, all very <a href="http://wordnetweb.princeton.edu/perl/webwn?s=blue-sky">blue-sky</a> and unofficial, and is quite likely never to lead anywhere.</p>
<p>The first question to resolve is how the interplay of element names, classes, and identifiers applies to us.  For example, when styling the close button, is it:</p>
<ul>
<li>a <strong>button</strong> with id=&#8221;close&#8221;, or</li>
<li>a <strong>box</strong> with class=&#8221;button&#8221; and id=&#8221;close&#8221;, or</li>
<li>a <strong>close</strong> with no class or id attributes?</li>
</ul>
<p>For simplicity, we went with the last option.  We represent the decorations of a window frame using a set of unique element names arranged into <a href="http://gitorious.org/metacity-theme-experiments/metacity-css/blobs/raw/master/hierarchy.svg">a particular hierarchy</a>.  Almost every element is a simple box; the exception is <strong>title</strong> which is textual.</p>
<p>We use <a href="http://www.ohloh.net/p/libccss">libccss</a> to parse the theme and <em>also</em> to apply certain of the box styles; this means that this experiment is drawn using Cairo.  (It would have been possible but more complicated to use <a href="http://moblin.org/projects/netbook-toolkit-nbtk">nbtk</a> for styling, which would have meant this experiment used Clutter.  This is more probably what a final working result would be like.  An attempt was made to use nbtk but some of the more complicated styling options appeared to be currently unsupported.)</p>
<p>libccss supported background images and reasonably complex border drawing.  There were two things we needed which it did not (yet) support, so we had to kludge those in:</p>
<ul>
<li>text styling, for the title; we only bothered to implement justification.  Our approach here is to use a simple text label for the title and to style it, rather than using explicit vector graphics as in v2.  Effects like <em>Human</em>&#8217;s shadowing would be implemented by something like CSS3&#8217;s <a href="http://www.w3.org/Style/Examples/007/text-shadow">text-shadow</a>.  More complicated arrangements like <a href="http://www.gnome.org/~tthurman/pics/metacity/themes/atlanta.png"><em>Atlanta</em></a>&#8217;s centred icons would be impossible.</li>
<li>the complete CSS box model; only borders were supported.  We made a half-hearted attempt to support <em>margin</em>, and did not even touch <em>padding</em>.  However, in so doing, we made&#8230;</li>
</ul>
<p><strong>A useful discovery: </strong>In doing this it became clear that there are two possible ways for a file format to describe vector graphics.  Either the position of everything can be represented using arithmetic expressions, which is how the current Metacity theme format works, or it can use a <a href="http://www.w3.org/TR/CSS2/box.html">hierarchical box model</a>, as HTML and CSS do.  One of our stated aims for v3 is ease of editing, and the box model appears to be a better fit for humans to understand in a drag-and-drop editor (as seen, for example, in Inkscape).  Therefore, if we do not adopt SVG or CSS for v3, it may be worthwhile to look into box-based layout models even in a custom format.</p>
<p>Here&#8217;s <a href="http://gitorious.org/metacity-theme-experiments/metacity-css/blobs/raw/master/copper.css">one draft of the CSS for <em>Human</em></a>, and the results of processing it with <a href="http://gitorious.org/metacity-theme-experiments/metacity-css/trees/master">this hacky and experimental code</a> are shown on the right (with the real thing around it for comparison).  <img src="http://www.gnome.org/~tthurman/pics/metacity/copper-1.png" alt="Example of CSS-based approximation to the Human theme" align="right" /></p>
<p><strong>Problems and challenges:</strong></p>
<ul>
<li><strong>New properties. </strong>We are certainly going to need to invent properties which are unheard of in real CSS.  (For example, corners will need to indicate the degree of rounding.)  These properties should probably be marked in some way.  Mozilla marks its new properties with a leading <strong>-moz</strong>; perhaps we should do something similar.</li>
<li><strong>Dublin Core metadata. </strong>This could be implemented using custom properties on the toplevel &#8220;theme&#8221; element, representing the author, licence, and so on.</li>
<li><strong>Named colours</strong> (especially those which refer to the GTK theme).  libccss does not allow new colour names to be defined; perhaps we should ask for this.  On the other hand, it does allow new callback functions to be created, so that you can write <tt>color: gtk("bg-selected")</tt> or something.  This allows us to get the same effect <em>at least within the CSS</em>.  However&#8230;</li>
<li><strong>Pixmaps</strong>.  This system is well-suited to defining pixmap themes, which are at least fast, easy to understand, and simple to manipulate.  However, they are generally discouraged because they scale badly and don&#8217;t recolour well when the GTK colours change.  There are two possible workarounds:
<ul>
<li>Introduce custom properties to scale and colourise the pixmaps as appropriate.  v2 is already capable of pixmap colourisation (it&#8217;s used quite heavily in <a href="http://www.gnome.org/~tthurman/pics/metacity/themes/crux.png"><em>Crux</em></a>, since that is a pixmap theme, but rarely elsewhere).</li>
<li>Use SVG images instead.  This immediately brings up the problem of how to style these images: we could of course use this very CSS to style them, but then our custom callback functions to get GTK colours would still need to be honoured somehow.</li>
</ul>
</li>
</ul>
<p><strong>Conclusions:</strong></p>
<ul>
<li>CSS has possibilities as a window border format: it is a standard and well-understood format and there are plenty of tools around to edit and parse it.  However, it is certainly not as powerful as v2 and probably cannot be.  That may not be a problem, as <a href="http://blogs.gnome.org/metacity/2009/07/13/towards-a-third-version-of-the-theme-format-some-design-goals/">we said before</a>.</li>
<li>As somebody mentioned earlier, research is needed to discover which features of v2 are commonly used, and therefore necessary in any possible v3.  We need to make a big collection of themes and score each feature with how heavily it is used.</li>
<li>Box-based layout is simpler for humans to edit (and perhaps to understand in general) than expression-based layout.</li>
</ul>
<p><em>Photo © rogdorf, cc-by-nc-sa.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/metacity/2009/07/15/copper-an-experiment-with-css/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>The window menu</title>
		<link>http://blogs.gnome.org/metacity/2009/07/13/the-window-menu/</link>
		<comments>http://blogs.gnome.org/metacity/2009/07/13/the-window-menu/#comments</comments>
		<pubDate>Mon, 13 Jul 2009 21:24:50 +0000</pubDate>
		<dc:creator>Thomas Thurman</dc:creator>
				<category><![CDATA[Thought experiments]]></category>
		<category><![CDATA[nargery]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/metacity/?p=603</guid>
		<description><![CDATA[The window menu is the menu you see when you click the menu button (which usually has the window icon on it), or right-click the titlebar.  An identical menu appears when you right-click an application&#8217;s entry in the task switcher on the panel, although this menu is owned by libwnck rather than Metacity and [...]]]></description>
			<content:encoded><![CDATA[<p><a title="French Woodland Strawberry by BeautifulRust, on Flickr" href="http://www.flickr.com/photos/beautifulrust/3542500214/"><img src="http://farm3.static.flickr.com/2043/3542500214_fd6be94135.jpg" alt="French Woodland Strawberry" width="500" height="500" align="right" /></a>The window menu is the menu you see when you click the menu button (which usually has the window icon on it), or right-click the titlebar.  An identical menu appears when you right-click an application&#8217;s entry in the task switcher on the panel, although this menu is owned by libwnck rather than Metacity and is manually synchonised.  The contents of both menus are currently fixed.  Let&#8217;s treat them as the same menu.</p>
<p>The menu currently has around a dozen options.  <em>What is the optimum length for this menu?</em></p>
<p>These are the current contents. <em> Which of these should not be in the menu by default?</em></p>
<ul>
<li><strong>Minimise</strong></li>
<li><strong>Maximise</strong></li>
<li><strong>Move</strong></li>
<li><strong>Resize</strong></li>
<li><strong>Always on top</strong> (checkbox)</li>
<li><strong>On every workspace</strong> / <strong>On only this workspace</strong> (radio buttons) ★</li>
<li><strong>Move to workspace above, to the right, below, to the left</strong> (four separate options, only the applicable ones being visible) ★</li>
<li><strong>Move to another workspace</strong> (leading to a submenu) ★</li>
<li><strong>Close</strong></li>
</ul>
<p><a href="http://blogs.gnome.org/metacity/2009/03/30/squib-of-the-day-make-the-menu-shorter/">Some say that the workspace options (★) are overkill</a>.  They are by far the most complicated options in the menu, and they take up a large amount of space even for people who do use workspaces.  Perhaps that&#8217;s not everyone; if workspaces are something that only advanced users are aware of, maybe these options ought to be enabled separately.</p>
<p>There are other things we could put on the window menu, if it doesn&#8217;t get too crowded.  <em>What extra options would you like to see there?</em></p>
<ul>
<li><strong>Take a screenshot</strong> of this window</li>
<li><strong>Share this window</strong> with another user <a href="http://www.linuxjournal.com/article/9982">using VNC</a></li>
<li><strong>Screencast this window</strong> and upload it somewhere <a href="http://live.gnome.org/Istanbul">using Istanbul</a></li>
<li>Anything you can bind a keystroke to.  (Nargery: This would be kept as a hint on the root window, encoded either as a keybinding name (e.g. &#8220;<strong>toggle_shaded</strong>&#8220;) or <a href="http://blogs.gnome.org/metacity/2009/02/09/squib-of-the-day-keep-the-menu-in-one-place/">as a representation of an EWMH command</a>.)</li>
<li>Similarly, application-specific options, given in a hint on the window itself: so your music player could have <strong>play</strong>, <strong>pause</strong>, and so on when you clicked its entry in the task switcher; consider how this could move towards replacing permanent notification applets, evolving into being part of <a href="http://blogs.gnome.org/metacity/2008/12/23/notifisation/">notifisation</a> in Metacity 2, and how useful it might be in gnome-shell.</li>
<li>By analogy with right-clicking on the desktop allowing you to set the wallpaper, perhaps &#8220;<strong>Edit window borders</strong>&#8220;, which would take you to a dialogue which let you reorder the buttons, modify which user-chosen options were in the window menu, pick a window border theme, and perhaps even do some light theme editing.</li>
<li>&#8230;your ideas here&#8230;</li>
</ul>
<p><em>Photo © Beautiful Rust, cc-by-nc-nd.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/metacity/2009/07/13/the-window-menu/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>Towards a third version of the theme format: some design goals</title>
		<link>http://blogs.gnome.org/metacity/2009/07/13/towards-a-third-version-of-the-theme-format-some-design-goals/</link>
		<comments>http://blogs.gnome.org/metacity/2009/07/13/towards-a-third-version-of-the-theme-format-some-design-goals/#comments</comments>
		<pubDate>Mon, 13 Jul 2009 17:36:29 +0000</pubDate>
		<dc:creator>Thomas Thurman</dc:creator>
				<category><![CDATA[Themes v3]]></category>
		<category><![CDATA[Thought experiments]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/metacity/?p=598</guid>
		<description><![CDATA[When we add features to the theme format, they must be added all in one go for reasons which were explained earlier.  We are currently on version 2 of the theme format.  In case there is ever a version 3, here are some of our design goals.  Not all of these may necessarily [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Eggistentialism 1.5 or Three of a Perfect Pair by bitzcelt, on Flickr" href="http://www.flickr.com/photos/bitzcelt/2382314257/"><img src="http://farm3.static.flickr.com/2171/2382314257_9993d2c07d.jpg" alt="Eggistentialism 1.5 or Three of a Perfect Pair" width="500" height="462" align="right" /></a>When we add features to the theme format, they must be added all in one go for <a href="http://blogs.gnome.org/metacity/2009/03/05/policy-about-theme-versions/">reasons which were explained earlier</a>.  We are currently on version 2 of the theme format.  In case there is ever a version 3, here are some of our design goals.  Not all of these may necessarily be met when and if it happens.  These are not in order of importance.</p>
<ol>
<li><strong>Standard format.</strong> If possible, it should use standard file formats rather than custom ones.  This helps build tools, it helps code reuse, and it helps users learn the format.</li>
<li><strong>Editable.</strong> It should be designed such that it&#8217;s possible to <a href="http://mail.gnome.org/archives/gnome-shell-list/2009-July/msg00038.html">write a theme editor</a> which is easy to understand and use.</li>
<li><strong>Delegation.</strong> It would be useful if at least some of the code to parse and render the theme files was in a pre-existing library rather than being part of Metacity itself.</li>
<li><strong>Shareability.</strong> It should be at least possible to use the same theme format with various other window managers, which could perhaps be helped by keeping the code in an LGPL library.</li>
<li><strong>Single file.</strong> There should be a standard format for keeping all files associated with a theme in a single file, at least for both distribution and installation.  This will save the end user from ever having to deal with tar or zip.</li>
<li><strong>Subthemes.</strong> It should be possible to write a theme which inherits some of its attributes from an existing parent theme.</li>
<li><strong>Named colours.</strong> It should be possible to give identifiers and descriptions to a subset of colour constants so that the theme artist can override them on the fly.  (This is perhaps already solved given that we can use colours out of GTK themes.)</li>
<li><strong>Well-defined metadata.</strong> There should be visible metadata, including licence identifiers, which can contain a list of all authors as a theme gets remixed.  Theme editors should make it easy to keep this up to date.  In keeping with our use of standard formats, we should probably use <a href="http://en.wikipedia.org/wiki/Dublin_Core#Simple_Dublin_Core">Dublin Core</a> for the fields and perhaps the same identifiers that <a href="https://usefulinc.com/doap">DOAP</a> uses for licences.  The casual theme artist should never see any of this, of course.</li>
<li><strong>Upgrade path. </strong>It should be possible to convert themes in version 1 or version 2 format to version 3 format automatically.  Conversion from other WM&#8217;s formats would be a nice touch.</li>
<li><strong>Minimum power. </strong>We don&#8217;t need to be able to do everything that v2 can do.  We do need to be able to do everything that is commonly done in v2.  (For example, v2 allows you to have a title &#8220;centred&#8221; ⅔ of the way across the titlebar.  This has probably never been used, and it&#8217;s no big problem if v3 can&#8217;t do it.  If it can&#8217;t centre the title in the middle, that&#8217;s more of a problem.)</li>
<li><strong>Maximum power. </strong>It should not be possible for the theme to get in the user&#8217;s way.  For example, it should not be possible to write a theme which obscures the contents of windows; otherwise it would not be possible to switch away from it.  Neither should it be possible to solve the <a href="http://games.slashdot.org/article.pl?sid=03/12/08/1139239">Towers of Hanoi</a> in the theme engine.  People have better things to do with their time.</li>
</ol>
<p>Your thoughts on these and your suggestions for other goals are welcome, gentle reader.</p>
<p><em>Photo copyright © bitzcelt, cc-by-nc-nd.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/metacity/2009/07/13/towards-a-third-version-of-the-theme-format-some-design-goals/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Window matching experiment</title>
		<link>http://blogs.gnome.org/metacity/2009/07/10/matches/</link>
		<comments>http://blogs.gnome.org/metacity/2009/07/10/matches/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 14:04:52 +0000</pubDate>
		<dc:creator>Thomas Thurman</dc:creator>
				<category><![CDATA[Bugs and issues]]></category>
		<category><![CDATA[Letters]]></category>
		<category><![CDATA[Metacity Labs]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/metacity/?p=592</guid>
		<description><![CDATA[At the Collabora party, Robert Ancell asked me how difficult it would be to implement window matching in Metacity.  I decided this was an interesting question and spent an hour and a half today working on it.  The results are now in the matching branch in GNOME git.  If you&#8217;d like to [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Saint Patrick's Day Matches by Bob.Fornal, on Flickr" href="http://www.flickr.com/photos/fornal/424716302/"><img src="http://farm1.static.flickr.com/184/424716302_9482c6ae63.jpg" alt="Saint Patrick's Day Matches" width="500" height="375" align="right" /></a>At the <a href="http://www.collabora.co.uk">Collabora</a> <a href="http://www.flickr.com/photos/sebr/3704021948/">party</a>, <a href="http://bobthegnome.blogspot.com/">Robert Ancell</a> asked me how difficult it would be to implement <a href="http://blogs.gnome.org/metacity/2008/11/02/window-matching/">window matching</a> in Metacity.  I decided this was an interesting question and spent an hour and a half today working on it.  The results are now in the <a href="http://git.gnome.org/cgit/metacity/log/?h=matching"><em>matching</em></a> branch in GNOME git.  If you&#8217;d like to download it and give it a try, please feel free.</p>
<p>It currently saves configuration data in a <a href="http://library.gnome.org/devel/glib/stable/glib-Key-value-file-parser.html">keyfile</a> which contains one group per window, in this format:</p>
<blockquote><p><tt>[xlogo]<br />
x=287<br />
y=178<br />
w=250<br />
h=231</tt></p></blockquote>
<p>This isn&#8217;t necessarily how it will end up: we could use GConf or perhaps some database-like format.  It uses a modified version of the system <a href="http://blogs.gnome.org/metacity/2008/11/02/window-matching/#comment-576">suggested</a> by <a href="http://izumi.plan99.net/blog">Hongli Lai</a>: if WM_WINDOW_ROLE is set, we use that to recognise the window, <em>otherwise</em> we use the window title&#8211; otherwise programs like <tt>xclock</tt> wouldn&#8217;t be matchable.  The role or title is currently represented by the group name in the keyfile.  The keyfile is saved at <tt>~/.cache/metacity/matching.conf</tt>.</p>
<p>The system stores the position and size of every window at the moment it was closed.  There is no need to edit configuration files by hand.</p>
<p>There are inevitably some caveats:</p>
<ul>
<li>There is a bug such that when windows are restored they are offset by the size of the top-left hand corner of the frame.  (In other words, the coordinates are misinterpreted as the client window&#8217;s position, not the frame&#8217;s.)</li>
<li>I haven&#8217;t tested this for scalability at all.  Keyfiles might be very inefficient when you have hundreds of records for all I know.</li>
<li>It doesn&#8217;t know about workspaces, and it should; this will probably be the next thing I add.</li>
<li>If your window was minimised or maximised, this will not be restored, and it should be.  This will probably be the next thing after that.</li>
<li>It might not be the best idea to write out the keyfile on every window close.  Probably better to keep it in memory until the WM exits.</li>
<li>It might be useful to have a switch on the window menu to lock the position and size so it restores the same way when you reload it, in case you move it.  On the other hand, this sounds like crack.</li>
</ul>
<p>Should this branch be merged when the bugs are ironed out?  <a href="http://blogs.gnome.org/metacity/2009/02/20/zenity-sessions-and-window-matching/">Should it replace WM-based session files?</a> These are good and interesting questions and ones we should discuss.  Tune in next time, gentle reader!  Or better, comment below.</p>
<p><em>Photo © Bob Fornal, cc-by-nc-sa.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/metacity/2009/07/10/matches/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Vectacity as CSS</title>
		<link>http://blogs.gnome.org/metacity/2009/07/06/libccss/</link>
		<comments>http://blogs.gnome.org/metacity/2009/07/06/libccss/#comments</comments>
		<pubDate>Mon, 06 Jul 2009 19:41:58 +0000</pubDate>
		<dc:creator>Thomas Thurman</dc:creator>
				<category><![CDATA[CSS themes]]></category>
		<category><![CDATA[Vectacity]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/metacity/?p=581</guid>
		<description><![CDATA[Davyd Madeley made an interesting suggestion for redesigning the theme format.  Assuming, as seems likely, we end up using Clutter, there&#8217;s no need to specify the structure of a window, which would need SVG.  After all, all windows have a basically similar structure.  Instead, we could style any item on the window usinga CSS file, [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Coloured boxes by Sarah G..., on Flickr" href="http://www.flickr.com/photos/dm-set/3561163436/"><img src="http://farm4.static.flickr.com/3616/3561163436_9d4b3f0d85.jpg" alt="Coloured boxes" width="404" height="500" align="right" /></a><a href="www.davyd.id.au">Davyd Madeley</a> made an interesting suggestion for <a href="http://blogs.gnome.org/metacity/category/themes/themes-v3/">redesigning the theme format</a>.  Assuming, as seems likely, we end up using <a href="http://www.clutter-project.org/">Clutter</a>, there&#8217;s no need to specify the <em>structure</em> of a window, which <a href="http://blogs.gnome.org/metacity/category/metacity-labs/vectacity/">would need SVG</a>.  After all, all windows have a basically similar structure.  Instead, we could style any item on the window usinga CSS file, parsed by libccss.</p>
<p>Don&#8217;t want a titlebar?<br />
<code>#titlebar {<br />
height: 0;<br />
}</code></p>
<p>Want a red background on the close button?<br />
<code>button#close {<br />
background-color: red;<br />
}</code></p>
<p>And so on.  I think this is an interesting idea because it seems comprehensive enough to capture all the problems we face in theme design.  I&#8217;m wondering whether it&#8217;s perhaps more powerful than necessary and whether it could cause themes to be able to be disruptive, though.</p>
<p><em>Photo © Sarah G, cc-by.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/metacity/2009/07/06/libccss/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Squib of the day: SVG theme support</title>
		<link>http://blogs.gnome.org/metacity/2009/03/18/squib-of-the-day-svg-theme-support/</link>
		<comments>http://blogs.gnome.org/metacity/2009/03/18/squib-of-the-day-svg-theme-support/#comments</comments>
		<pubDate>Wed, 18 Mar 2009 00:00:13 +0000</pubDate>
		<dc:creator>Thomas Thurman</dc:creator>
				<category><![CDATA[Bug of the day]]></category>
		<category><![CDATA[Themes v3]]></category>
		<category><![CDATA[Vectacity]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/metacity/?p=480</guid>
		<description><![CDATA[ GNOME bug 107012 brings up the perennial question of SVG support in themes, otherwise known as Vectacity. We&#8217;ve already covered this in a few places, but I think it may be worth mentioning here the two main reasons SVG-based themes is a good thing (there may be any number of other reasons they&#8217;re a [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Brutality against mosquitoes. by freebird (bobinson|ബോബിന്‍സണ്), on Flickr" href="http://www.flickr.com/photos/freemind/3236829403/"><img src="http://farm4.static.flickr.com/3320/3236829403_1c872dfe6a.jpg" alt="Brutality against mosquitoes." width="500" height="335" align="right" /></a> <a href='http://bugzilla.gnome.org/show_bug.cgi?id=107012' class='bug-link bug-link-gnome'>GNOME bug 107012</a> brings up the perennial question of SVG support in themes, otherwise known as <a href="http://blogs.gnome.org/metacity/category/metacity-labs/vectacity/">Vectacity</a>. We&#8217;ve already covered this in a few places, but I think it may be worth mentioning here the two main reasons SVG-based themes is a good thing (there may be any number of other reasons they&#8217;re a bad thing, as well):</p>
<ul>
<li>SVG is now a clear standard for vector graphics.  So theme artists will be able to reuse their existing knowledge about SVG when coming to design Metacity themes.</li>
<li>It means we can remove large amounts of code from Metacity and use whatever SVG library we end up depending on instead.  (There is a heavy presumption that this library will be GNOME&#8217;s own <a href="http://librsvg.sourceforge.net/">librsvg</a>.)  Having less code around is generally a positive thing.</li>
</ul>
<p>However, <a href="http://blogs.gnome.org/metacity/2008/12/27/take-that-descartes/">stretching SVG</a> to meet our needs, or indeed <a href="http://blogs.gnome.org/metacity/2009/02/04/version-3-themes/">stretching librsvg</a> to meet our needs, rather negates the second benefit: it&#8217;s possible that including CSS will let us do what we need, but it&#8217;s also possible that librsvg is not clever enough to let this happen without so much coaxing on our side that we may as well have written an entire SVG library of our own, which is something we&#8217;d like to avoid.</p>
<p>If Vectacity ever becomes a reality, it <em>certainly</em> needs to be possible to convert a v1 or v2 theme to Vectacity automatically.  This is partly for the theme artists&#8217; benefit, but also because it means if a Vectacity-enabled Metacity finds itself having to load a v1 or v2 theme, it can do the conversion by spawning a separate program rather than having to keep the legacy code for reading v1 and v2 themes lying around, which again negates the second benefit.</p>
<p>Forthcoming versions of SVG are <a href="http://blogs.gnome.org/metacity/2009/03/05/policy-about-theme-versions/#comment-827">specifically considering use by window managers</a>, but we may have to wait a while for them to get into a usable format. It may be best to WONTFIX this one, at least until v4.  On the other hand, the two benefits given are indeed important benefits, and I&#8217;d like to see it happen sooner.</p>
<p><em>Photo © freebird (bobinson|ബോബിന്‍സണ്), cc-by-nc-sa.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/metacity/2009/03/18/squib-of-the-day-svg-theme-support/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
