<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Standalone desktop widgets with PyGTK+</title>
	<atom:link href="http://bloc.eurion.net/archives/2009/standalone-pygtk-desktop-widgets/feed/" rel="self" type="application/rss+xml" />
	<link>http://bloc.eurion.net/archives/2009/standalone-pygtk-desktop-widgets/</link>
	<description>I would love to change the world, but they won&#039;t give me the source code...</description>
	<lastBuildDate>Thu, 26 Aug 2010 13:17:30 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: RainCT</title>
		<link>http://bloc.eurion.net/archives/2009/standalone-pygtk-desktop-widgets/comment-page-1/#comment-14715</link>
		<dc:creator>RainCT</dc:creator>
		<pubDate>Tue, 26 Jan 2010 13:28:49 +0000</pubDate>
		<guid isPermaLink="false">http://bloc.eurion.net/?p=122#comment-14715</guid>
		<description>@ Philippe Lawrence:

Just add it :).

--------------------------------------------------------------------------------------------------------

&lt;pre&gt;
import gtk
import cairo
import gobject

class TransparentWindow(gtk.Window):

    @staticmethod
    def _transparent_expose(widget, event):
        cr = widget.window.cairo_create()
        cr.set_operator(cairo.OPERATOR_CLEAR)
        region = gtk.gdk.region_rectangle(event.area)
        cr.region(region)
        cr.fill()
        return False

    def __init__(self, *args, **kwargs):
        gtk.Window.__init__(self, *args, **kwargs)
        rgba = self.get_screen().get_rgba_colormap()
        self.set_colormap(rgba)
        self.set_app_paintable(True)
        self.connect(&quot;expose-event&quot;, self._transparent_expose)

if __name__ == &quot;__main__&quot;:
    window = TransparentWindow()
    box = gtk.VBox()
    window.add(box)

    label = gtk.Label(&quot;This is a transparent window.&quot;)
    box.add(label)

    button = gtk.Button(&quot;Click me!&quot;)
    box.add(button)

    window.show_all()
    gobject.MainLoop().run()&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>@ Philippe Lawrence:</p>
<p>Just add it :).</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<pre>
import gtk
import cairo
import gobject

class TransparentWindow(gtk.Window):

    @staticmethod
    def _transparent_expose(widget, event):
        cr = widget.window.cairo_create()
        cr.set_operator(cairo.OPERATOR_CLEAR)
        region = gtk.gdk.region_rectangle(event.area)
        cr.region(region)
        cr.fill()
        return False

    def __init__(self, *args, **kwargs):
        gtk.Window.__init__(self, *args, **kwargs)
        rgba = self.get_screen().get_rgba_colormap()
        self.set_colormap(rgba)
        self.set_app_paintable(True)
        self.connect("expose-event", self._transparent_expose)

if __name__ == "__main__":
    window = TransparentWindow()
    box = gtk.VBox()
    window.add(box)

    label = gtk.Label("This is a transparent window.")
    box.add(label)

    button = gtk.Button("Click me!")
    box.add(button)

    window.show_all()
    gobject.MainLoop().run()</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Philippe Lawrence</title>
		<link>http://bloc.eurion.net/archives/2009/standalone-pygtk-desktop-widgets/comment-page-1/#comment-14691</link>
		<dc:creator>Philippe Lawrence</dc:creator>
		<pubDate>Mon, 25 Jan 2010 22:08:40 +0000</pubDate>
		<guid isPermaLink="false">http://bloc.eurion.net/?p=122#comment-14691</guid>
		<description>Hello,
Nice page, I appreciate help for your exemple quotes.py. I wish to place a button (or label ...) over a transparent window.
Thank you for your help

Philippe Lawrence (France)</description>
		<content:encoded><![CDATA[<p>Hello,<br />
Nice page, I appreciate help for your exemple quotes.py. I wish to place a button (or label &#8230;) over a transparent window.<br />
Thank you for your help</p>
<p>Philippe Lawrence (France)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hans Rödtang</title>
		<link>http://bloc.eurion.net/archives/2009/standalone-pygtk-desktop-widgets/comment-page-1/#comment-3784</link>
		<dc:creator>Hans Rödtang</dc:creator>
		<pubDate>Fri, 09 Jan 2009 21:56:47 +0000</pubDate>
		<guid isPermaLink="false">http://bloc.eurion.net/?p=122#comment-3784</guid>
		<description>RainCT: Yes, maybe it is a Metacity-specific issue (like the DOCK thing, I have heard you don&#039;t need it with KWin)</description>
		<content:encoded><![CDATA[<p>RainCT: Yes, maybe it is a Metacity-specific issue (like the DOCK thing, I have heard you don&#8217;t need it with KWin)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: RainCT</title>
		<link>http://bloc.eurion.net/archives/2009/standalone-pygtk-desktop-widgets/comment-page-1/#comment-3783</link>
		<dc:creator>RainCT</dc:creator>
		<pubDate>Fri, 09 Jan 2009 20:08:29 +0000</pubDate>
		<guid isPermaLink="false">http://bloc.eurion.net/?p=122#comment-3783</guid>
		<description>Hans: Here I can still move it, but that may just be an &quot;unexpected feature&quot; in Compiz :P. Anyway, I&#039;ll try to add a proper move function (activated by doing right click -&gt; &quot;Move&quot;).

(Note: I will probably not be able to work on this for a week because of some school work...)</description>
		<content:encoded><![CDATA[<p>Hans: Here I can still move it, but that may just be an &#8220;unexpected feature&#8221; in Compiz :P. Anyway, I&#8217;ll try to add a proper move function (activated by doing right click -> &#8220;Move&#8221;).</p>
<p>(Note: I will probably not be able to work on this for a week because of some school work&#8230;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hans Rödtang</title>
		<link>http://bloc.eurion.net/archives/2009/standalone-pygtk-desktop-widgets/comment-page-1/#comment-3782</link>
		<dc:creator>Hans Rödtang</dc:creator>
		<pubDate>Fri, 09 Jan 2009 19:23:21 +0000</pubDate>
		<guid isPermaLink="false">http://bloc.eurion.net/?p=122#comment-3782</guid>
		<description>Created a litte demo and modified it slightly, your code works great I see. http://pastebin.com/m6ce9215a

Remember that setting the DOCK hint for some (probably totally obvious) reason does so you can&#039;t move the widget with the window manager (Alt+mouse button).</description>
		<content:encoded><![CDATA[<p>Created a litte demo and modified it slightly, your code works great I see. <a href="http://pastebin.com/m6ce9215a">http://pastebin.com/m6ce9215a</a></p>
<p>Remember that setting the DOCK hint for some (probably totally obvious) reason does so you can&#8217;t move the widget with the window manager (Alt+mouse button).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: RainCT</title>
		<link>http://bloc.eurion.net/archives/2009/standalone-pygtk-desktop-widgets/comment-page-1/#comment-3781</link>
		<dc:creator>RainCT</dc:creator>
		<pubDate>Fri, 09 Jan 2009 17:15:25 +0000</pubDate>
		<guid isPermaLink="false">http://bloc.eurion.net/?p=122#comment-3781</guid>
		<description>Hans: Thanks man, you rock! I&#039;ve updated the post to add a new version using this hint.</description>
		<content:encoded><![CDATA[<p>Hans: Thanks man, you rock! I&#8217;ve updated the post to add a new version using this hint.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hans Rödtang</title>
		<link>http://bloc.eurion.net/archives/2009/standalone-pygtk-desktop-widgets/comment-page-1/#comment-3780</link>
		<dc:creator>Hans Rödtang</dc:creator>
		<pubDate>Fri, 09 Jan 2009 16:47:04 +0000</pubDate>
		<guid isPermaLink="false">http://bloc.eurion.net/?p=122#comment-3780</guid>
		<description>After some googling I found out that self.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_DOCK) should prevent the widget form disappearing when clicking &quot;Show Desktop&quot;. Haven&#039;t been able to test this myself though, but worth a try.</description>
		<content:encoded><![CDATA[<p>After some googling I found out that self.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_DOCK) should prevent the widget form disappearing when clicking &#8220;Show Desktop&#8221;. Haven&#8217;t been able to test this myself though, but worth a try.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: RainCT</title>
		<link>http://bloc.eurion.net/archives/2009/standalone-pygtk-desktop-widgets/comment-page-1/#comment-3779</link>
		<dc:creator>RainCT</dc:creator>
		<pubDate>Fri, 09 Jan 2009 15:24:51 +0000</pubDate>
		<guid isPermaLink="false">http://bloc.eurion.net/?p=122#comment-3779</guid>
		<description>Lee: Yeah, I understood that («[...] and there [in the docs] it says that it actually is to implement a desktop, so I stopped messing with»), but the blog post where I read about it presented it as if it could be useful for desktop widgets. Thanks for your comment, though!</description>
		<content:encoded><![CDATA[<p>Lee: Yeah, I understood that («[...] and there [in the docs] it says that it actually is to implement a desktop, so I stopped messing with»), but the blog post where I read about it presented it as if it could be useful for desktop widgets. Thanks for your comment, though!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wouter</title>
		<link>http://bloc.eurion.net/archives/2009/standalone-pygtk-desktop-widgets/comment-page-1/#comment-3778</link>
		<dc:creator>Wouter</dc:creator>
		<pubDate>Fri, 09 Jan 2009 12:49:39 +0000</pubDate>
		<guid isPermaLink="false">http://bloc.eurion.net/?p=122#comment-3778</guid>
		<description>Universal applets</description>
		<content:encoded><![CDATA[<p>Universal applets</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lee</title>
		<link>http://bloc.eurion.net/archives/2009/standalone-pygtk-desktop-widgets/comment-page-1/#comment-3777</link>
		<dc:creator>Lee</dc:creator>
		<pubDate>Fri, 09 Jan 2009 11:20:12 +0000</pubDate>
		<guid isPermaLink="false">http://bloc.eurion.net/?p=122#comment-3777</guid>
		<description>The &#039;desktop&#039; window hint is for the actual desktop background, which is a window in its own right, in X.  I&#039;ve never heard of a desktop window that wasn&#039;t the full size of your screen.  I&#039;ve also never heard of one that didn&#039;t compete with other desktop windows.</description>
		<content:encoded><![CDATA[<p>The &#8216;desktop&#8217; window hint is for the actual desktop background, which is a window in its own right, in X.  I&#8217;ve never heard of a desktop window that wasn&#8217;t the full size of your screen.  I&#8217;ve also never heard of one that didn&#8217;t compete with other desktop windows.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martyn</title>
		<link>http://bloc.eurion.net/archives/2009/standalone-pygtk-desktop-widgets/comment-page-1/#comment-3776</link>
		<dc:creator>Martyn</dc:creator>
		<pubDate>Fri, 09 Jan 2009 11:11:11 +0000</pubDate>
		<guid isPermaLink="false">http://bloc.eurion.net/?p=122#comment-3776</guid>
		<description>Try gtk-desktop-info...... it&#039;s very flexible</description>
		<content:encoded><![CDATA[<p>Try gtk-desktop-info&#8230;&#8230; it&#8217;s very flexible</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ivà</title>
		<link>http://bloc.eurion.net/archives/2009/standalone-pygtk-desktop-widgets/comment-page-1/#comment-3774</link>
		<dc:creator>Ivà</dc:creator>
		<pubDate>Fri, 09 Jan 2009 09:15:42 +0000</pubDate>
		<guid isPermaLink="false">http://bloc.eurion.net/?p=122#comment-3774</guid>
		<description>conky :-P</description>
		<content:encoded><![CDATA[<p>conky :-P</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dextro</title>
		<link>http://bloc.eurion.net/archives/2009/standalone-pygtk-desktop-widgets/comment-page-1/#comment-3771</link>
		<dc:creator>Dextro</dc:creator>
		<pubDate>Fri, 09 Jan 2009 00:30:51 +0000</pubDate>
		<guid isPermaLink="false">http://bloc.eurion.net/?p=122#comment-3771</guid>
		<description>Screenlets is basicaly doing what you did: their small python apps. Give them a try ;)</description>
		<content:encoded><![CDATA[<p>Screenlets is basicaly doing what you did: their small python apps. Give them a try ;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: RainCT</title>
		<link>http://bloc.eurion.net/archives/2009/standalone-pygtk-desktop-widgets/comment-page-1/#comment-3770</link>
		<dc:creator>RainCT</dc:creator>
		<pubDate>Thu, 08 Jan 2009 23:39:24 +0000</pubDate>
		<guid isPermaLink="false">http://bloc.eurion.net/?p=122#comment-3770</guid>
		<description>Vadim: Yeah, I may try them out, but not now as if I like them I may become lazy and stop working on this (which I&#039;m interested in doing because I guess I can learn a bunch more about GTK+ than what I know now by doing this) :P.</description>
		<content:encoded><![CDATA[<p>Vadim: Yeah, I may try them out, but not now as if I like them I may become lazy and stop working on this (which I&#8217;m interested in doing because I guess I can learn a bunch more about GTK+ than what I know now by doing this) :P.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vadim P.</title>
		<link>http://bloc.eurion.net/archives/2009/standalone-pygtk-desktop-widgets/comment-page-1/#comment-3768</link>
		<dc:creator>Vadim P.</dc:creator>
		<pubDate>Thu, 08 Jan 2009 23:14:06 +0000</pubDate>
		<guid isPermaLink="false">http://bloc.eurion.net/?p=122#comment-3768</guid>
		<description>Screenlets, google gadgets... ;)</description>
		<content:encoded><![CDATA[<p>Screenlets, google gadgets&#8230; ;)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
