NET WM Spec implementation and changes



matthias ettrich and i have collaborate and worked on an API (in C++) that
uses raw Xlib to implement the new NET spec... we did this because KDE was
waiting on the finalization/implemenation of this spec so that it could
declare an API freeze...

so... matthias and i set out to implement the spec.  i have placed the
sources (and docs for the API) at

http://trolls.troll.no/~bhughes/

for people that want to start using it.  KDE2 has the same source in CVS
(iirc, it was committed friday), and blackbox is using it now as well.

While implementing the spec, we had a few ideas for a later
revision... namely, we wanted to talk the raw protocol (and not use
Xlib) so that we could fetch properties in one round-trip to the X
server... the API permits this now, but the implementation just uses
XGetWindowProperty() for now...

we also had a few problems with rationalizing some of the things in the
current revision (1.9e i believe...
 http://www.freedesktop.org/standards/wm-spec/ doesn't list the curent
version)...

let me outline the changes we made (i will write up a more complete 
revision to place at an easy url... and make the things we did not change
more specific)... is the spec still accessible through anon-cvs?


#1 _NET_NUMBER_OF_DESKTOPS
	For clients to change the number of desktops, send a ClientMessage
	to the root window as follows:

	message_type = _NET_NUMBER_OF_DESKTOPS
	format = 32
	data.l[0] = <new value>


#2 _NET_WM_MOVERESIZE
	For consistency, the format was chagned from 16 to 32.


#3 _NET_PROPERTIES
	This was not implemented and should be removed from the
	specification. This list of atoms would require a round-trip to
	the X server to get the list of supported
	hints/properties/messages, and then we would have to have
	another round-trip to fetch the data that we wanted from the
	client window.  With the design, we can	do this in one round trip,
	because the X server will report back what does and doesn't
	exist.


#4 _NET_WM_WINDOW_TYPE
	I don't recall when this was made to be a list of atoms, but
	for simplicity this has been changed to an enumerated value.

	Window Types:

	Normal	= 0
	Desktop	= 1
	Dock	= 2
	Toolbar	= 3
	Menu	= 4
	Dialog	= 5

	The same usage and explanation still applies.


#5 _NET_WM_STATE
	Again, this has been changed from a list of atoms to a bitfield of
	the following values (OR'ed together)

	States:

	Modal		= 1 << 0
	Sticky		= 1 << 1
	MaxVert		= 1 << 2
	MaxHoriz	= 1 << 3
	Shaded		= 1 << 4
	SkipTaskbar	= 1 << 5

	And we added a StaysOnTop (i.e. AlwaysOnTop, OmniPresent, ...)

	StaysOnTop	= 1 << 6

	Changing State:

	To change state, send a ClientMessate to the Root window as
	follows:

	message_type = _NET_WM_STATE
	format = 32
	window = <client window>
	data.l[0] = <new state>


--
Bradley T. Hughes <bhughes@trolltech.com>
Waldemar Thranes gt. 98B N-0175 Oslo, Norway
Office: +47 21 60 48 92
Mobile: +47 92 01 97 81





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