[openbox] _NET_CURRENT_DESKTOP question
Ben Jansens
ben at orodu.net
Thu Jan 30 10:46:45 EST 2003
On Thu, Jan 30, 2003 at 05:39:46PM +0200, Anatoly Asviyan wrote:
>
> hi all
> i'm writing NETWM compliant taskbar and currently making it work with openbox.
> almost all features worked out of the box (!!) besides switching the desktop.
> openbox seems to ignore _NET_CURRENT_DESKTOP message sent by taskbar.
>
>
> Here is quote from http://www.freedesktop.org/standards/wm-spec/1.3/html/x110.html
>
> _NET_CURRENT_DESKTOP
>
> _NET_CURRENT_DESKTOP desktop, CARDINAL/32
>
> The index of the current desktop. This is always an integer between 0 and
> NET_NUMBER_OF_DESKTOPS - 1. This MUST be set and updated by the Window Manager.
> If a Pager wants to switch to another virtual desktop, it MUST send a
> _NET_CURRENT_DESKTOP client message to the root window:
>
> _NET_CURRENT_DESKTOP
> message_type = _NET_CURRENT_DESKTOP
> format = 32
> data.l[0] = new_index
>
> I've attached the code that does exactly that. It works OK with sawfish
> and does not work with openbox-2.1 and openbox-2.2
>
> P.S. if someone is intrested in trying a taskbar you can take it here:
> http://fbpanel.sf.net/fbpanel-0.10.tgz
> it requires GTK-1.2 and gdk_pixbuf
I should also point out in here:
cur_desktop = XInternAtom(dpy, "_NET_CURRENT_DESKTOP", True);
fprintf(stderr, "Atom(_NET_CURRENT_DESKTOP)=%d\n", cur_desktop);
if (cur_desktop == None) {
fprintf(stderr, "_NET_CURRENT_DESKTOP is unsupported\n");
exit(1);
}
This isn't the correct way to check for support. You should query:
a) _NET_SUPPORTING_WM_CHECK, and make sure the window it points to
exists and is correct.
b) _NET_SUPPORTED for the presence of _NET_CURRENT_DESKTOP in the list.
Ben
--
I am damn unsatisfied to be killed in this way.
http://www.icculus.org/openbox/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://icculus.org/pipermail/openbox/attachments/20030130/9200367d/attachment.pgp>
More information about the openbox
mailing list