Toplevel Geometry Management

»extendBindtags« is the workhorse of the rtl toplevel management. »extendBindtags« adds a ToplevelMap bindgroup to the specified toplevel window.

ToplevelMap contains a single event handler for the Destroy event. The command destroyToplevel gets called when the toplevel window is destroyed.

»extendBindtags« also calls displayToplevel, to reuse the previous geometry settings for the given toplevel window.

»displayToplevel« gets called in response to a Destroy event. »destroyToplevel« records the current geometry of the used toplevel window and stores this geometry inside the option database under the resource name ».historyGeometry«.

The geometry value stored in ».historyGeometry« is later reused by displayToplevel . »destroyToplevel« only stores the width and height of a toplevel window, when it was altered by the user.

Called from within extendBindtags. »displayToplevel« reads the ».historyGeometry« value for the provided toplevel window from the option database and alters the geometry of the toplevel window.

»displayToplevel« ensures that the displayed toplevel window appears inside the screen. It centers the toplevel window in the screen when the history values are off-screen.

The toplevel window is centered in the parent toplevel window, when no value for ».historyGeometry« is stored inside the option database. This however does not work for the Tk-root (.) window, children of the Tk-root window are centered in the screen.

Groups the given toplevel window with its parent and makes it transient.

»transientToplevel« is disabled under AQUA®.