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



On Tue, 2008-05-20 at 12:00 +0800, Zhe Su wrote:
> Thanks a lot.
> 
> On Tue, May 20, 2008 at 11:52 AM, Havoc Pennington <hp pobox com>
> wrote:
>         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.
> If this function is ok, then I'll stick with it. Is there any side
> effect?
>  

It seems that Gtk doesn't recommend setting the window size or position
of widgets in the code.
I think violating the gtk recommendation will be the only 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.


>         
>         Havoc
> 
> _______________________________________________
> gtk-devel-list mailing list
> gtk-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-devel-list



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