<?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; nargery</title>
	<atom:link href="http://blogs.gnome.org/metacity/category/nargery/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>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>Squib of the day: talking to ourselves</title>
		<link>http://blogs.gnome.org/metacity/2009/03/21/squib-of-the-day-talking-to-ourselves/</link>
		<comments>http://blogs.gnome.org/metacity/2009/03/21/squib-of-the-day-talking-to-ourselves/#comments</comments>
		<pubDate>Sat, 21 Mar 2009 00:00:05 +0000</pubDate>
		<dc:creator>Thomas Thurman</dc:creator>
				<category><![CDATA[Bug of the day]]></category>
		<category><![CDATA[nargery]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/metacity/?p=528</guid>
		<description><![CDATA[Metacity knows when a program is loaded, but hasn&#8217;t yet started, by using the startup notification specification.  In  GNOME bug 114384, the suggestion is raised that when Metacity opens a new program (say, from a keybinding) it should also tell itself that the program is loading in the same way.
This seems entirely reasonable.
Photo © [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Box of badgers (closeup) by janetmck, on Flickr" href="http://www.flickr.com/photos/janetmck/390538557/"><img src="http://farm1.static.flickr.com/168/390538557_3b6c0a5601.jpg" alt="Box of badgers (closeup)" width="500" height="375" align="right" /></a>Metacity knows when a program is loaded, but hasn&#8217;t yet started, by using the <a href="http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt">startup notification specification</a>.  In  <a href='http://bugzilla.gnome.org/show_bug.cgi?id=114384' class='bug-link bug-link-gnome'>GNOME bug 114384</a>, the suggestion is raised that when Metacity opens a new program (say, from a keybinding) it should also tell itself that the program is loading in the same way.</p>
<p>This seems entirely reasonable.</p>
<p><em>Photo © Janet McKnight, cc-by.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/metacity/2009/03/21/squib-of-the-day-talking-to-ourselves/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>On enhancements which need changes to the EWMH</title>
		<link>http://blogs.gnome.org/metacity/2009/03/16/ewmh/</link>
		<comments>http://blogs.gnome.org/metacity/2009/03/16/ewmh/#comments</comments>
		<pubDate>Mon, 16 Mar 2009 02:50:52 +0000</pubDate>
		<dc:creator>Thomas Thurman</dc:creator>
				<category><![CDATA[Bugs and issues]]></category>
		<category><![CDATA[EWMH]]></category>
		<category><![CDATA[Policy]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/metacity/?p=497</guid>
		<description><![CDATA[ Some of the enhancements which have been suggested need some sort of hint to be set on windows.  For example, the recent squib about a special style for warning windows could only work if warning windows were marked in some way, and at present they&#8217;re not.  Similarly, drag and drop can only work better [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/sahrizvi/367604596/"><img src="http://farm1.static.flickr.com/180/367604596_1bef47b2b4.jpg?v=0" alt="" align="right" /></a> Some of the enhancements which have been suggested need some sort of hint to be set on windows.  For example, the recent squib about <a href="http://blogs.gnome.org/metacity/2009/03/16/squib-of-the-day-special-frame-style-for-warning-dialogues/">a special style for warning windows</a> could only work if warning windows were marked in some way, and at present they&#8217;re not.  Similarly, <a href="http://blogs.gnome.org/metacity/2009/03/09/yes-dragon-drop-its-a-pun/">drag and drop</a> can only work better if the window manager is warned which clicks start a drag and which don&#8217;t.  This too will need a new hint.</p>
<p>There are two ways this can be done.  The simplest way is to use a hint whose name begins <strong>_METACITY</strong>; this doesn&#8217;t require us to talk to anyone.  It&#8217;s sometimes one way of starting the process of adding a feature like this.  Of course, it means that the feature&#8217;s unlikely ever to work with any other window manager.</p>
<p>The better and more extensible way is to make a new standard hint, one beginning <strong>_NET_WM</strong>.  This means adding the hint to the <a href="http://standards.freedesktop.org/wm-spec/wm-spec-latest.html">Extended Window Manager Hints</a> standard (the EWMH).  Changing this standard means arguing it out on <a href="http://mail.gnome.org/mailman/listinfo/wm-spec-list">the wm-spec list</a>.  The maintainers would like not to be the only ones to raise new ideas on this list.</p>
<p>In either case, the toolkits (such as GTK) will then need to be updated to mark the relevant windows with the relevant hints, and finally the applications will probably need to be updated to use the new functionality in the toolkits.  You can see, gentle reader, that enhancements like these are the source of more work than the average enhancement.  They may nevertheless be worth the effort.</p>
<p>This entry exists mainly so that we can link to it when the issue comes up.</p>
<p><em>Photo © !!sahrizvi!! (back in Dubai) !!, cc-by-nc-nd.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/metacity/2009/03/16/ewmh/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Squib of the day: Special frame style for warning dialogues</title>
		<link>http://blogs.gnome.org/metacity/2009/03/16/squib-of-the-day-special-frame-style-for-warning-dialogues/</link>
		<comments>http://blogs.gnome.org/metacity/2009/03/16/squib-of-the-day-special-frame-style-for-warning-dialogues/#comments</comments>
		<pubDate>Mon, 16 Mar 2009 00:00:17 +0000</pubDate>
		<dc:creator>Thomas Thurman</dc:creator>
				<category><![CDATA[Bug of the day]]></category>
		<category><![CDATA[EWMH]]></category>
		<category><![CDATA[Themes v3]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/metacity/?p=475</guid>
		<description><![CDATA[ GNOME bug 102548 suggests that warning dialogues should have a special frame style, and it&#8217;s suggested that this could look like safety tape wrapped around the edge.
This is not unlike the special frame style suggested here for root windows.  However, while there&#8217;s already a way for the window manager to tell whether a window [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/robyn-gallagher/2426911381/"><img src="http://farm3.static.flickr.com/2081/2426911381_a55afef008.jpg?v=0" alt="" align="right" /></a> <a href='http://bugzilla.gnome.org/show_bug.cgi?id=102548' class='bug-link bug-link-gnome'>GNOME bug 102548</a> suggests that warning dialogues should have a special frame style, and it&#8217;s suggested that this could look like safety tape wrapped around the edge.</p>
<p>This is not unlike the special frame style <a href="http://blogs.gnome.org/metacity/2009/03/04/squib-of-the-day-as-root/#comment-810">suggested here</a> for root windows.  However, while there&#8217;s already a way for the window manager to tell whether a window belongs to the superuser, there&#8217;s currently no way to tell whether a window is a warning, so <a href="http://blogs.gnome.org/metacity/2009/03/16/ewmh/">this would need a change made to the EWMH</a> and then need all the toolkits fixing to use it.  It&#8217;s thus rather nontrivial, although it may still be worth it if it helps users.</p>
<p><a href="http://blogs.gnome.org/metacity/2009/03/05/policy-about-theme-versions/">Because this requires a change to the theme format, it must be committed first on a branch.</a></p>
<p>I am seriously entertaining the idea of doing away with the <em>window</em> and <em>frame_style_set</em> tags in v3 of the format, and just using tags on frame styles such as <em>maximized, shaded, focused, unfocused, root, warning, modal, </em>and so on, with some well-defined and intuitive rule about how to break ties:</p>
<p><tt>&lt;frame_style geometry="foo" <strong>tags="border focused maximized"&gt;</strong><br />
&lt;piece position="title"&gt;   ...</tt></p>
<p><em>Photo © Robin Gallagher, cc-by.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/metacity/2009/03/16/squib-of-the-day-special-frame-style-for-warning-dialogues/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Squib of the day: Drag and drop should work properly</title>
		<link>http://blogs.gnome.org/metacity/2009/03/09/yes-dragon-drop-its-a-pun/</link>
		<comments>http://blogs.gnome.org/metacity/2009/03/09/yes-dragon-drop-its-a-pun/#comments</comments>
		<pubDate>Mon, 09 Mar 2009 00:00:16 +0000</pubDate>
		<dc:creator>Thomas Thurman</dc:creator>
				<category><![CDATA[Bug of the day]]></category>
		<category><![CDATA[EWMH]]></category>
		<category><![CDATA[Switching]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/metacity/?p=420</guid>
		<description><![CDATA[In  GNOME bug 80984 (closely related to  GNOME bug 76672), someone is asking for the window manager to help out with drag-and-drop.  The problem is that a drag-and-drop operation should not raise the window it begins in, because raising that window could obscure the window you&#8217;re planning to drop the object into.
This is [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Dragon by wili_hybrid, on Flickr" href="http://www.flickr.com/photos/wili/2628869994/"><img src="http://farm4.static.flickr.com/3055/2628869994_087a85722c.jpg" alt="Dragon" width="500" height="333" align="right" /></a>In  <a href='http://bugzilla.gnome.org/show_bug.cgi?id=80984' class='bug-link bug-link-gnome'>GNOME bug 80984</a> (closely related to  <a href='http://bugzilla.gnome.org/show_bug.cgi?id=76672' class='bug-link bug-link-gnome'>GNOME bug 76672</a>), someone is asking for the window manager to help out with drag-and-drop.  The problem is that a drag-and-drop operation should not raise the window it begins in, because raising that window could obscure the window you&#8217;re planning to drop the object into.</p>
<p>This is a reasonable and important request.  It is, however, not at all simple.  Metacity is the program which decides whether to raise the window, and there is currently no way for Metacity to know you&#8217;re about to start a drag-and-drop operation.</p>
<p>One rather crappy workaround is to tell it by holding down <strong>Super</strong> or <strong>AltGr</strong>.  This works, but it&#8217;s not elegant.  The system should be able to <em>know</em>.</p>
<p>This is not what raise_on_click does.  Please forget about raise_on_click.  It won&#8217;t solve your problem.</p>
<p>The correct answer is <a href="http://blogs.gnome.org/metacity/2009/03/16/ewmh/">fixing this in the EWMH</a>.  Luboš had an idea about this back in 2004 called <a href="http://mail.gnome.org/archives/wm-spec-list/2004-April/msg00013.html"><strong>_NET_WM_TAKE_ACTIVITY</strong></a>, and Elijah improved on this later with a more complicated idea called <a href="http://mail.gnome.org/archives/wm-spec-list/2004-October/msg00008.html"><strong>_NET_WM_MOUSE_ACTION</strong></a>.  Getting this into Metacity is  <a href='http://bugzilla.gnome.org/show_bug.cgi?id=152952' class='bug-link bug-link-gnome'>GNOME bug 152952</a>.  Whatever happens, it&#8217;s going to need changes to GTK and to various applications, particularly including Nautilus (the file manager).</p>
<p><a href="http://blogs.gnome.org/metacity/2008/06/11/drag-and-drop/">Far more of a detailed writeup, including feedback from some of the people involved, is found in this entry.</a> Your chronicler believes that implementing this is worth the fairly considerable effort to fix.</p>
<p><em>Photo © wili-hybrid, cc-by.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/metacity/2009/03/09/yes-dragon-drop-its-a-pun/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Squib of the day: keep the menu in one place</title>
		<link>http://blogs.gnome.org/metacity/2009/02/09/squib-of-the-day-keep-the-menu-in-one-place/</link>
		<comments>http://blogs.gnome.org/metacity/2009/02/09/squib-of-the-day-keep-the-menu-in-one-place/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 16:21:58 +0000</pubDate>
		<dc:creator>Thomas Thurman</dc:creator>
				<category><![CDATA[Bug of the day]]></category>
		<category><![CDATA[Thought experiments]]></category>
		<category><![CDATA[nargery]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/metacity/?p=392</guid>
		<description><![CDATA[At present the system menu, which you see when you right-click anywhere on the titlebar, left-click the menu button, or right-click an entry on the pager, is hard-coded separately into Metacity and libwnck, and required to be the same in both places.
I&#8217;ve been considering the idea of making it a property on the root window [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://flickr.com/photos/appaloosa/74598793/"><img src="http://farm1.static.flickr.com/39/74598793_d9ac2924d7.jpg" alt="" align="right" /></a>At present the system menu, which you see when you right-click anywhere on the titlebar, left-click the menu button, or right-click an entry on the pager, is hard-coded separately into Metacity and libwnck, and required to be the same in both places.</p>
<p>I&#8217;ve been considering the idea of making it a property on the root window called, say, _METACITY_SYSTEM_MENU.  Let&#8217;s think about how this could look.  It would need multiple lines, and multiple fields for each line; so let&#8217;s say the lines are delimited by newlines and the fields by tabs, for easier processing.  The first field in a line would dictate the function of the line.  If it began with a star it would be something special, and we only need to define two of these, &#8220;*workspacemove&#8221; for &#8220;move up, down, left, right a workspace&#8221; and &#8220;*workspacemenu&#8221; for the submenu of workspaces.</p>
<p>Let&#8217;s say, though, that if it began with a colon it would represent an EWMH message.  A naive approach would be to send these messages when they were chosen; a more efficient approach would be to fake one up and pretend it had been received, to avoid the round trip to the X server.  NARGERY: <small>Let&#8217;s say that it consists of a number of subfields separated by colons; the first is the atom for the message_type; the second is &#8220;W&#8221; if the window field is to be filled in with the ID of the current window, and empty otherwise; the third and following are the contents of data.l[<em>n</em>], with any decimal integer standing for itself, a blank standing for zero, a dot followed by any characters representing an atom, S standing for a source indication and T for the current server time.  Trailing blanks can be omitted.  (For these purposes we pretend that toggling _NET_WM_STATE_HIDDEN minimises and un-minimises.)</small></p>
<p>Alternatively we could simplify matters by using a percentage sign followed by one of the names of the keybinding actions, such as <strong>%close</strong>.  This would be simpler but less portable to other window managers, if this ever became some kind of a standard.</p>
<p>The remainingfields for an action would be the string which represented it in the current locale and possibly a string representing the keybinding, in case we didn&#8217;t want to work it out for ourselves.</p>
<p>Given all this, we&#8217;d avoid duplicating the menu in both programs, and more importantly we&#8217;d make it possible to add entries to the menu, as requested in  <a href='http://bugzilla.gnome.org/show_bug.cgi?id=345233' class='bug-link bug-link-gnome'>GNOME bug 345233</a> and elsewhere.  It has been suggested, for example, that if you have a program installed that allows you to share windows across the network, every window should give you the option of doing so in the system menu.  That could quite easily be done using &#8220;<strong>%run_command_<em>n</em></strong>&#8221; here.</p>
<p>(Written during a long compile, so apologies if it rambles.  Also bear in mind that squibs of the day are supposed to be blue-sky ideas!)</p>
<p><em>Photo © appaloosa, cc-by-nc-nd.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/metacity/2009/02/09/squib-of-the-day-keep-the-menu-in-one-place/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Metacity and D-Bus</title>
		<link>http://blogs.gnome.org/metacity/2009/01/24/metacity-and-d-bus/</link>
		<comments>http://blogs.gnome.org/metacity/2009/01/24/metacity-and-d-bus/#comments</comments>
		<pubDate>Sat, 24 Jan 2009 21:14:08 +0000</pubDate>
		<dc:creator>Thomas Thurman</dc:creator>
				<category><![CDATA[EWMH]]></category>
		<category><![CDATA[Thought experiments]]></category>
		<category><![CDATA[nargery]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/metacity/?p=266</guid>
		<description><![CDATA[ GNOME bug 531512 suggests that Metacity should have a D-Bus interface.  On the face of it, this is a good idea.  However, the problem lies in the existing EWMH specification, which allows a program to request operations from a window manager&#8211; simply put, it&#8217;s pretty much exactly what a D-Bus interface would be, but [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Zarko Drincic - The Electric Bus (Awarded by National Geographic Magazine) by Zarko Drincic, on Flickr" href="http://www.flickr.com/photos/zarkodrincic/2110838835/"><img src="http://farm3.static.flickr.com/2148/2110838835_f7ee719e73.jpg" alt="Zarko Drincic - The Electric Bus (Awarded by National Geographic Magazine)" width="500" height="374" align="right" /></a> <a href='http://bugzilla.gnome.org/show_bug.cgi?id=531512' class='bug-link bug-link-gnome'>GNOME bug 531512</a> suggests that Metacity should have a D-Bus interface.  On the face of it, this is a good idea.  However, the problem lies in the existing <a href="http://standards.freedesktop.org/wm-spec/wm-spec-1.3.html">EWMH specification</a>, which allows a program to request operations from a window manager&#8211; simply put, it&#8217;s pretty much exactly what a D-Bus interface would be, but it already exists.  If we also exposed a D-Bus interface, even one called &#8220;org.freedesktop.WM&#8221; instead of &#8220;org.gnome.Metacity&#8221;, we wouldn&#8217;t be gaining anything we don&#8217;t already have, and then people would begin using it and their programs wouldn&#8217;t be compatible with other EWMH window managers.  So every WM that implements the EWMH would have to expose the same D-Bus interface, which sounds like a lot of work for not much return.  On the other hand, we could have a separate program which exposed a D-Bus interface which translated the methods into EWMH messages, and which could be used with any EWMH window manager.  Would that do as well?  What do you think, gentle reader?</p>
<p><em>Photo copyright Zarko Drincic, cc-by-nd. </em></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/metacity/2009/01/24/metacity-and-d-bus/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Theme speed</title>
		<link>http://blogs.gnome.org/metacity/2008/12/29/theme-speed/</link>
		<comments>http://blogs.gnome.org/metacity/2008/12/29/theme-speed/#comments</comments>
		<pubDate>Mon, 29 Dec 2008 18:52:55 +0000</pubDate>
		<dc:creator>Thomas Thurman</dc:creator>
				<category><![CDATA[How-to]]></category>
		<category><![CDATA[Themes]]></category>
		<category><![CDATA[nargery]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/metacity/?p=245</guid>
		<description><![CDATA[The speed Metacity renders decorations depends on the theme in use.  If you want to time all the themes installed and view them, use:

for G in $(locate metacity-theme-1&#124;grep /usr/share/themes&#124;cut -d/ -f5); do metacity-theme-viewer $G; done

Mean client-side times on my system to draw each frame, in ascending order of speed:

Prelude (the theme given in the [...]]]></description>
			<content:encoded><![CDATA[<p>The speed Metacity renders decorations depends on the theme in use.  If you want to time all the themes installed and view them, use:</p>
<ul>
<li>for G in $(locate metacity-theme-1|grep /usr/share/themes|cut -d/ -f5); do metacity-theme-viewer $G; done</li>
</ul>
<p>Mean client-side times on my system to draw each frame, in ascending order of speed:</p>
<ul>
<li><a href="http://blogs.gnome.org/metacity/2008/12/29/a-simple-theme-prelude/">Prelude (the theme given in the previous post)</a>: 1.3ms</li>
<li>Bright: 1.9ms</li>
<li>Atlanta: 2.0ms</li>
<li>Mist: 2.1ms</li>
<li>AgingGorilla: 2.2ms</li>
<li>Metabox: 2.2ms</li>
<li>Simple: 2.3ms</li>
<li>Esco: 2.4ms</li>
<li>Glider: 3.7ms</li>
<li>Crux: 3.8ms</li>
<li>DarkRoom: 3.9ms</li>
<li>ClearlooksClassic: 4.3ms</li>
<li>Glossy: 4.5ms</li>
<li>Clearlooks: 4.6ms</li>
<li>Inverted: 4.6ms</li>
<li>Human: 6.0ms</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/metacity/2008/12/29/theme-speed/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
