Re: Workspace-aware panel applet



søn, 31 10 2004 kl. 23:35 -0500, skrev Havoc Pennington:
> On Sun, 2004-10-31 at 23:27 +0100, Henrik Brink wrote:
> > søn, 31 10 2004 kl. 17:17 -0500, skrev Havoc Pennington:
> > > On Sun, 2004-10-31 at 23:12 +0200, Gediminas Paulauskas wrote:
> > > > 
> > > > The pager applet displays current workspace as selected, so it is definitely
> > > > possible. Look at that applet source (in gnome-panel module) to see how it
> > > > detects which workspace is current and when it changes - it uses libwnck which
> > > > is a library for communicating with window manager.
> > > > 
> > > 
> > > Also, if you only care about workspace libwnck is probably overkill;
> > > just monitor the _NET_CURRENT_DESKTOP property.
> > > 
> > 
> > That sounds like the way to go. What specific library is this proterty
> > in?
> 
> It's an X property on the root window. So you would use Xlib or GDK to
> monitor it. libwnck has sample code though it's probably a bit more
> complicated than the way you'd want to do it, and it uses Xlib while
> using GDK could be simpler.
> 

The GDK-way is very simple, and works fine. 

But I want my applet to display different content on each workspace, and
with the _NET_CURRENT_DESKTOP property it just returns the desktop from
wich the applet was loaded. Should i monitor a desktop-change event
(what event?), or what would be optimal?

> Havoc
> 
> 
> _______________________________________________
> gnome-devel-list mailing list
> gnome-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gnome-devel-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]