Winop

Name

winop − Perform assorted window operations

Synopsis

winop lower ?window? …

winop map ?window? …

winop move window x y

winop raise ?window? …

winop snap window photoName

winop unmap ?window? …

winop warpto ?window?

Description

The winop command performs various window operations on Tk windows using low-level Xlib function calls to work around window manager pecularities.

Introduction

Tk has several commands for manipulating its windows: raise, lower, wm, etc. These commands ask the window manager to perform operations on Tk windows. In some cases, a particular window manager won’t perform the operation as expected.

For example, if you positioned a toplevel window using wm geometry, the window may not actually be at those particular coordinates. The position of the window may be offset by dimensions of the title bar added by the window manager.

In situations like these, the winop command can be used to workaround these difficulties. Instead, it makes low-level Xlib (such XRaiseWindow and XMapWindow) calls to perform these operations.

toplevel .top
wm withdraw .top

# Set the geometry to make the window manager
# place the window.
wm geometry .top +100+100

# Move the window to the desired location
# and "update" to force the window manager
# to recognize it.
winop move .top 100 100
update

wm deiconify .top
winop move .top 100 100

Operations

The following operations are available for the winop command: