Re: changing hidden window position



Mihai Bazon <mishoo infoiasi ro> writes:

I'm using gdk_window_move to set a window's position.  My problem
is that the window must be visible before doing that.

For instance (erroneous code):

  GtkWidget *win = gtk_window_new(..);
  ...
  gdk_window_move(win->window, x, y);
  gtk_widget_show(win);

But it works like this:

  GtkWidget *win = gtk_window_new(..);
  ...
  gtk_widget_show(win); /* show the window first */
  gdk_window_move(win->window, x, y);

This results in unpleasant flicker.  How to solve this?


Use gtk_widget_set_uposition() to set the position.

Havoc




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