Communicating with window managers through a JNI wrapper

Matthias Käppler m.kaeppler at googlemail.com
Thu Nov 8 02:52:08 PST 2007


Hi,

we're developing a Java project that requires communication with the
operating system's window management in order to perform basic operations on
windows such as maximizing, minimizing, hiding and so forth. This interface
has already been implemented for the Win32 API, and we are now targeting
UNIX/Linux platforms running X11.

The problem is that there is very few documentation on the web regarding X11
programming and even less documentation on how to interact with window
managers in a way that is independent of the actual window manager
implementation. As far as I understand, the NetWM standard is an effort to
allow just that, is that correct?

I have already started work on that wrapper and played around with sending
client messages, some of which are successfully interpreted by the window
manager I am running (GNOME's Metacity), and some are not.

For example, while I am able to send minimize hints to X11 (e.g. via
XIconifyWindow), there doesn't seem to be a way to reverse that state to
normal. I tried sending a WM_CHANGE_STATE client message with the
NormalState flag set but that didn't work. I have since started to read
source codes of various window managers but I can't seem to figure out how
you do that.

Meanwhile, I doubt that this whole NetWM standard thing is really what we
need. I feel like I am starting to rewrite functionality the window manager
is supposed to implement. I only want to trigger that behaviour via a
standard API, not rewrite it from scratch. For example, when I am sending
_NET_WM_STATE messages, are these messages interpreted by the window manager
at all or are they directly interpreted by the X11 server?

So, maybe I'm just completey targeting this issue the wrong way? Can you
give me (being new to X11 programming) some advice on how to tackle this
problem?

Thanks in advance.

Best regards,
Matthias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg/attachments/20071108/bbd37e83/attachment.html>


More information about the xorg mailing list