How to hide windows & show again later in the same position



How do you hide a window and then show it in the same position
again later?

This is what I'm doing at present:

static gint
close_window (GtkWidget  *widget,
	      GdkEvent   *event,
	      gpointer    data)
{
  gint x, y;
  /* remember position - doesn't work properly yet - moves down each time */
  gdk_window_get_position(widget->window, &x, &y);
  gtk_widget_set_uposition(widget, x, y);
  gtk_widget_hide(widget);
  return TRUE;
}

However, gdk_window_get_position returns the position of the window
without the window manager border, whereas gtk_widget_set_uposition
sets the position of the window including the wm border.

So, is there a way of getting the position of the window including the wm
border?

Damon




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]