Re: GDK bug



Carlos Pereira <carlos pehoe civil ist utl pt> writes:
Calling gdk_window_move_resize() in show isn't guaranteed to work at
all. GTK can change it, the window manager can change it. You are
going behind everyone's back, subverting the system, sometimes the
system will notice and decide to put you in line. ;-)

Is this a toplevel window? If so, use gtk_window_set_default_size()
(to simulate a user-resized size) or gtk_widget_set_usize() (to force
a minimum size).

gtk_window_set_default_size() and gtk_widget_set_usize()
are great to start a new top window (I use both) but
for example to increase a window to full screen and then back,
gtk_window_set_default_size() and gtk_widget_set_usize()
don't work: gtk_widget_set_usize() can be used to increase 
but not to decrease a window; gtk_window_set_default_size()
defines the initial size, but not the current size.

The good news are, gdk_window_move_resize() works great for me,
I tried it with different WM and different Linux distributions,
with different X servers, no problem at all, of course I am not 
playing tricks with this, just changing the size, really (I don't 
even call gtk_widget_show afterwards).


This is a fine thing, gtk_window_set_size() in GTK 2 on an
already-visible window just does gdk_window_move_resize() basically.

However it isn't OK to do this in a show signal handler, I wouldn't
expect that to work so well. And even if it does it doesn't make any
kind of sense why you'd do it there.

Havoc




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