NAME
X11::Protocol::WM -- window manager things for client programs
SYNOPSIS
use X11::Protocol::WM;
DESCRIPTION
This is some window manager related functions for use by client programs. There's a lot a client can get or set, but only a few here yet.
FUNCTIONS
WM Hints
X11::Protocol::WM::set_wm_hints ($X, $window, key=>value, ...)-
Set the
WM_HINTSproperty on$window(an XID). For example,X11::Protocol::WM::set_wm_hints ($X, $my_window, input => 1, initial_state => 'NormalState', icon_pixmap => $my_pixmap);The key/value parameters are as follows.
input integer 0 or 1 initial_state enum string or number icon_pixmap pixmap XID (integer), depth 1 icon_window window XID (integer) icon_x integer coordinate icon_y integer coordinate icon_mask pixmap XID (integer) window_group window XID (integer) urgency booleaninputshould be 1 if the client wants the window manager to give$windowthe keyboard input focus usingSetInputFocus(or if you ask forWM_TAKE_FOCUSinWM_PROTOCOLSthen with a ClientMessage instead).inputshould be 0 if the window manager should not give the focus, either because$windowis output-only, or if you putWM_TAKE_FOCUSinWM_PROTOCOLSthen because the client willSetInputFocusto itself on a suitable button press etc.initial_statecan be a string or number. "NormalState" or "IconicState" are allowed by the ICCCM as a desired initial state.NormalState 1 IconicState 3icon_pixmapshould be a bitmap (depth 1). The window manager will choose suitable contrasting colours. If that's not enough then anicon_windowcan be used with either with a suitable background or drawn on-demand (Expose events etc). The window manager might set aWM_ICON_SIZEproperty on the root window for good icon sizes to use but there's nothing in this module to retrieve that yet.urgencytrue means the window is important and the window manager should draw the user's attention to it in some way. The client can change this at any time to reflect current importance.
WM Transient For
X11::Protocol::WM::set_wm_transient_for ($X, $window, $transient_for)-
Set the
WM_TRANSIENT_FORproperty on$window(an XID).$transient_foris another window XID, orundefif$windowis not transient for anything."Transient for" means
$windowis some sort of dialog or menu related to the$transient_forwindow. The window manager will generally iconify$windowtogether with its$transient_for, etc.
Net WM Window Type
X11::Protocol::WM::set_net_wm_window_type ($X, $window, $window_type)-
Set the
_NET_WM_WINDOW_TYPEproperty on$window(an XID).$window_typeis a type string as follows from the EWMH,NORMAL DIALOG DESKTOP DOCK TOOLBAR MENU UTILITY SPLASH
EXPORTS
Nothing is exported by default, but the functions can be requested in usual Exporter style,
use X11::Protocol::WM 'set_wm_hints';
set_wm_hints ($X, $window, input => 1, ...);
Or just called with full package name
use X11::Protocol::WM;
X11::Protocol::WM::set_wm_hints ($X, $window, input => 1, ...);
There's no :all tag since this module is meant as a grab-bag of functions and to import as-yet unknown things would be asking for name clashes.
SEE ALSO
X11::Protocol, X11::Protocol::Other
HOME PAGE
http://user42.tuxfamily.org/x11-protocol-other/index.html
LICENSE
Copyright 2011 Kevin Ryde
X11-Protocol-Other is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.
X11-Protocol-Other is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with X11-Protocol-Other. If not, see <http://www.gnu.org/licenses/>.