* reference point. So, to place a window in the bottom right corner
* you would first set gravity to south east, then write:
* <literal>gtk_window_move (window, gdk_screen_width () - window_width,
- * gdk_screen_height () - window_height)</literal>.
+ * gdk_screen_height () - window_height)</literal> (note that this
+ * example does not take multi-head scenarios into account).
*
* The Extended Window Manager Hints specification at <ulink
* url="http://www.freedesktop.org/Standards/wm-spec">
* nice table of gravities in the "implementation notes" section.
*
* The gtk_window_get_position() documentation may also be relevant.
- *
- **/
+ */
void
gtk_window_move (GtkWindow *window,
gint x,
}
state = gdk_window_get_state (widget->window);
- window->iconify_initially = state & GDK_WINDOW_STATE_ICONIFIED;
- window->maximize_initially = state & GDK_WINDOW_STATE_MAXIMIZED;
- window->stick_initially = state & GDK_WINDOW_STATE_STICKY;
- priv->above_initially = state & GDK_WINDOW_STATE_ABOVE;
- priv->below_initially = state & GDK_WINDOW_STATE_BELOW;
+ window->iconify_initially = (state & GDK_WINDOW_STATE_ICONIFIED) != 0;
+ window->maximize_initially = (state & GDK_WINDOW_STATE_MAXIMIZED) != 0;
+ window->stick_initially = (state & GDK_WINDOW_STATE_STICKY) != 0;
+ priv->above_initially = (state & GDK_WINDOW_STATE_ABOVE) != 0;
+ priv->below_initially = (state & GDK_WINDOW_STATE_BELOW) != 0;
}
static void
widget = GTK_WIDGET (window);
priv = GTK_WINDOW_GET_PRIVATE (window);
- priv->above_initially = setting;
+ priv->above_initially = setting != FALSE;
if (setting)
priv->below_initially = FALSE;
widget = GTK_WIDGET (window);
priv = GTK_WINDOW_GET_PRIVATE (window);
- priv->below_initially = setting;
+ priv->below_initially = setting != FALSE;
if (setting)
priv->above_initially = FALSE;