TIP #359: Extended Window Manager Hint Support
_____________________________________________________________________________
TIP:	359
Title:	Extended Window Manager Hint Support
Version:	$Revision: 1.7 $
Authors:	Pat Thoyts <patthoyts@users.sourceforge.net>
State:	Final
Type:	Project
Tcl-Version:	8.6
Vote:	Done
Created:	Mon Dec 21 00:00:00 UTC 2009
Keywords:	Tk, X11, ewmh, window manager
Abstract
The wm attributes command will be extended to accept a -type option when running on the X Window system to manipulate the extended window manager hints for Tk toplevel windows.
Rationale
This enhancement will enable script-level support for setting the extended window manager hints for Tk toplevel windows as specified in [http://standards.freedesktop.org/wm-spec/wm-spec-latest.html]. The _NET_WM_WINDOW_TYPE hint is used to provide information to the window manager about the intended use of a window so that appropriate decoration and animation can be applied. Specific examples of this include the dropdown listbox used with ttk::combobox, tooltips, splash screens and application dialog windows. Menus also need the type hint set appropriately but this has already been handled in the C code in recent commits.
Specification
The wm attributes command for the X11 windowing system will have a new X11 platform-specific -type option which will return the current list of _NET_WM_WINDOW_TYPE atoms set for this toplevel or allow the list to be modified. The set of possible window type names is unconstrained to permit compatibility with future versions of the specification. However the window type names at the script level will be all lower-case and exclude any _NET_WM_WINDOW_TYPE_ prefix.
As specified in the freedesktop.org document, the property is a list of hints with the types specified in order of preference as window managers may not implement some types. When setting a hint, the provided name is converted to upper-case, appended to _NET_WM_WINDOW_TYPE_ and converted to an atom. This permits new hints that may be specified in the future to be handled without modification to Tk.
The Tk library scripts will set the type for all dialogs created by library functions and will set the combo hint for the ttk::combobox dropdown listbox.
This feature is actually needed on 8.5 as well. Under compiz Tk window are inappropriately animated. The combobox dropdown in particular tends to bounce on Ubuntu.
Reference Implementation
A patch is available at [https://sourceforge.net/support/tracker.php?aid=2918731].
Copyright
This document has been placed in the public domain.
_____________________________________________________________________________
Colophon
TIP AutoGenerator - written by Donal K. Fellows