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

Thanks a lot.

On Tue, May 20, 2008 at 11:52 AM, Havoc Pennington <hp pobox com> wrote:

2008/5/19 Zhe Su <>:
>   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.
If this function is ok, then I'll stick with it. Is there any side effect?

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.


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