\documentclass[]{article}
\usepackage{amsmath,graphicx,supertabular,hyperref,tabularx,ifthen}
\title{TIP \#359: Extended Window Manager Hint Support}
\date{December 21, 2009}
\author{Pat Thoyts}
\urlstyle{sf}
\setlength{\parskip}{1ex}
\setlength{\parindent}{0pt}
\def\tipversion$#1${\texttt{\$#1\$}}
\def\tiplangle#1{\ensuremath{<}}
\def\tiprangle#1{\ensuremath{>}}
\def\tipbar#1{\ensuremath{|}}
\def\tipmail#1#2{\(\langle\){\small\expandafter\url{#1@#2}}\(\rangle\)}
\ifx\pdfoutput\undefined
\newcommand{\tipimage}[2]{\typeout{Make sure you download #1.eps}\ifthenelse{\lengthtest{0.8\textwidth>#2}\and\lengthtest{0pt<#2}}{\includegraphics{#1.eps}}{\includegraphics[width=0.8\textwidth]{#1.eps}}}
\newcommand{\tipxref}[1]{}
\newcommand{\tipxrefend}{}
\else
\newcommand{\tipimage}[2]{\typeout{Make sure you create #1.pdf}\ifthenelse{\lengthtest{0.8\textwidth>#2}\and\lengthtest{0pt<#2}}{\includegraphics{#1.pdf}}{\includegraphics[width=0.8\textwidth]{#1.pdf}}}
\pdfcatalog{/PageMode /UseOutlines}
\newcommand{\tipxref}[1]{\pdfannotlink attr {/C [0.5 0.5 1.0] /Border [0 0 1]} goto name {#1}}
\newcommand{\tipxrefend}{\pdfendlink}
\fi
\newenvironment{tipabstract}{\begin{abstract}}{\end{abstract}}
\begin{document}\maketitle
\begin{center}\begin{tabularx}{\linewidth}{|r@{: }X|}\hline
\textbf{TIP \#359}&\textbf{Extended Window Manager Hint Support}\\\hline
Author&

Pat Thoyts \tipmail{patthoyts}{users.sourceforge.net}
\\
Created&Monday, \(\text{21}^{\text{st}}\) December 2009\\
Type&Project\\
Tcl Version&\(8.6\)\\
State&Final\\
Vote&Done\\
Version&\tipversion$Revision: 1.7 $\\
Keywords&Tk, X11, ewmh, window manager\\
Post History&\\
\hline\end{tabularx}\end{center}
\thispagestyle{empty}\pagestyle{empty}
\begin{tipabstract}

The \textbf{wm attributes} command will be extended to accept a \textbf{-type} option when running on the X Window system to manipulate the extended window manager hints for Tk toplevel windows.
\end{tipabstract}
\tableofcontents\setcounter{page}{0}\clearpage\pagestyle{plain}

\section{Rationale}

This enhancement will enable script-level support for setting the extended window manager hints for Tk toplevel windows as specified in [\url{http://standards.freedesktop.org/wm-spec/wm-spec-latest.html}]. The \textbf{\_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 \textbf{ttk::combobox}, \textbf{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.

\section{Specification}

The \textbf{wm attributes} command for the X11 windowing system will have a new X11 platform-specific \textbf{-type} option which will return the current list of \textbf{\_NET\_WM\_WINDOW\_TYPE} atoms set for this \textbf{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 \textbf{\_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 \textbf{\_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 \textbf{ttk::combobox} dropdown listbox.

This feature is actually needed on 8.5 as well. Under compiz Tk window are inappropriately animated. The \textbf{combobox} dropdown in particular tends to bounce on Ubuntu.

\section{Reference Implementation}

A patch is available at [\url{https://sourceforge.net/support/tracker.php?aid=2918731}].

\section{Copyright}

This document has been placed in the public domain.

\section{Colophon}

\textit{TIP AutoGenerator --- written by Donal K. Fellows}
\end{document}
