Re: bug in GDK

Wolfgang Sourdeau <wolfgang contre com> writes:

I think I have found a bug in GDK. I connect the "show" signal of my
window to a function which set defaults coordinates for that window
(position + dimensions). Sometimes (1/~15), the position is correct
but the dimensions are wrong.

I have verified everything, notably I have tested if the window was
visible, if the values were correct, etc.

Maybe this is a bug with X. Does anyone have a clue about that
problem ?

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).

Is this a child widget? If so, you should be setting the window size
in size_allocate, and the size you set should correspond in some
rational way to your allocation.

To set the position, use gtk_widget_set_uposition().


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