Package: gdk

Function gdk:window-move-to-rect

Lambda List

gdk:window-move-to-rect (window rect ranchor wanchor hints dx dy)

Arguments

window -- a gdk:window object to move
rect -- a gdk:rectangle instance for the destination to align window with
ranchor -- a gdk:gravity value for the point on rect to align with window's anchor point
wanchor -- a gdk:gravity value for the point on window to align with rect's anchor point
hints -- a gdk:anchor-hints value for the positioning hints to use when limited on space
dx -- an integer for the horizontal offset to shift window, that is rect's anchor point
dy -- an integer for the vertical offset to shift window, that is rect's anchor point

Details

Moves the window to rect, aligning their anchor points. rect is relative to the top-left corner of the window that window is transient for. ranchor and wanchor determine anchor points on rect and window to pin together. rect's anchor point can optionally be offset by dx and dy, which is equivalent to offsetting the position of window.

hints determines how window will be moved if the anchor points cause it to move off-screen. For example, :flip-x will replace :north-west with :north-east and vice versa if window extends beyond the left or right edges of the monitor.

Connect to the "moved-to-rect" signal to find out how it was actually positioned.
 

See also

#2025-08-23