Re: How to move, resize and redraw a window at the same time?



Hi,

2008/5/19 Zhe Su <james su gmail com>:
>   So I'm wondering is there and method to move, resize and redraw a window
> at the same time to avoid flick?

The underlying X window system doesn't support doing this, though it
may in the future as compositing managers become the norm.

The best you can do with X is to not clear the window when it's
resized, but you can't atomically resize and repaint because those
things are separate X server commands and the server does not do
whole-screen double-buffering.

> And I'm wondering why there is no
> gtk_window_move_resize() for gtk window.

Well, setting a window size and position manually on a mapped window
is a pretty uncommon operation, so most likely nobody has asked to do
it. It probably works fine to do
gdk_window_move_resize(window_widget->window) as a workaround.

The docs on gtk_window_move(), gtk_window_set_default_size(), etc.
(and the implementation source code of same) may be of interest, if
you're digging into this area.

Havoc


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