Window.moveToRect

Moves @window to @rect, aligning their anchor points.

@rect is relative to the top-left corner of the window that @window is transient for. @rect_anchor and @window_anchor determine anchor points on @rect and @window to pin together. @rect's anchor point can optionally be offset by @rect_anchor_dx and @rect_anchor_dy, which is equivalent to offsetting the position of @window.

@anchor_hints determines how @window will be moved if the anchor points cause it to move off-screen. For example, %GDK_ANCHOR_FLIP_X will replace %GDK_GRAVITY_NORTH_WEST with %GDK_GRAVITY_NORTH_EAST and vice versa if @window extends beyond the left or right edges of the monitor.

Connect to the #GdkWindow::moved-to-rect signal to find out how it was actually positioned.

Parameters

rect GdkRectangle*

the destination #GdkRectangle to align @window with

rectAnchor GdkGravity

the point on @rect to align with @window's anchor point

windowAnchor GdkGravity

the point on @window to align with @rect's anchor point

anchorHints GdkAnchorHints

positioning hints to use when limited on space

rectAnchorDx int

horizontal offset to shift @window, i.e. @rect's anchor point

rectAnchorDy int

vertical offset to shift @window, i.e. @rect's anchor point

Meta

Since

3.24