I've been trying to improve support for using XEmacs on window systems
with mutiple virtual desktops, in order to be able to do things like
"open a new XEmacs frame on the current desktop if there isn't one
there already, otherwise uniconify/raise an existing one". Triggering
some Lisp code via gnuclient is no problem, but there doesn't seem to
be an easy way to find out the desktop that a frame is currently on
(accessed via X11 window properties). I've tried capturing and
parsing the output of xwininfo/xprop, but this is not easy because the
X window ID (returned by x-window-id) is not the XEmacs frame's
top-level window.
So I'd like to suggest some new built-in functions, to provide access
to the desktop information:
`x-on-desktop'
Built-in function:
arguments: (&optional FRAME)
Get the ID of the desktop on which the FRAME is displayed, by reading
the _NET_WM_DESKTOP property of its top level window.
The format of this depends on the desktop system and window manager
in use. With an ICCCM-compliant window manager the result returned
is an integer representing the desktop (0 being the first), t for
all desktops, or nil if the desktop cannot be determined.
`x-current-desktop'
Built-in function:
arguments: (&optional FRAME)
Get the ID of the current desktop for the display on which the FRAME
appears, by reading the _NET_CURRENT_DESKTOP property of the root window.
The format of this depends on the desktop system and window manager
in use. With an ICCCM-compliant window manager the result returned
is an integer representing the current desktop (0 being the first),
or nil if the desktop cannot be determined.
These can then be accessed as frame properties 'on-desktop and
'current-desktop respectively.
Could these be added to the XEmacs core? I've developed a patch
(currently against 21.5.27) to add these functions, will post that if
these suggestions are acceptable.
Regards,
--
Jonathan Marten
http://www.keelhaul.demon.co.uk
Twickenham, UK jjm2(a)keelhaul.demon.co.uk
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta