Re: forcing immediate redraw on widget



Marc Santhoff wrote:

Hm, can it be the window manager (windowmaker)? I had big round eyes
ten minutes ago when i (for the first time ever) minimized the window
and restored it. After that the whole bar was green as should be, not
only at the places the slider had stepped!

I strongly doubt that. On restauration of a window the WM basically does
nothing else than invalidating the entire area of the window, that is
all widgets in it, so that they can be redrawn next time the main loop
enters.

Btw, minimizing + restoring a window FOR THE FIRST TIME EVER after
having programmed quite a lot in GTK+???

Try to drag other windows in front of your application, so that they
cover and then uncover your GtkHScale. You will see the same correct
behaviour then.

Graphics driver is Xfree4.3s MGA driver on Matrox MGA400 (development
machine, ASAP i will run it on the target machine for some
investigations on this issue).

I know about a machine which produces lots of drawing errors when it
comes to Java + Swing on Windows (with all Java applications). That's
why that possibility can't be ruled out completely for other systems as
well, though it was least probable.

It is 0, every time it's called.
[...]
And here it is 1, as expected.

Yes, those are the expected results. So I guess a GDK event to force a
redraw of the GtkHScale has been created just as expected. For some
reason the event just isn't handled by the GtkHScale inside the main
loop as expected. There could be a bug in gtk_widget_queue_draw () which
leads to wrong or invalid area information of the widget to be redrawn.

Another approach which just came into my mind is not to focus on the
GtkHScale only. Try to invalidate one of the PARENT CONTAINERS of your
GtkHScale instead. Eventually, when you invalidate the entire GtkWindow
you're doing mostly the same as the WM does when a minizmized window
gets restored. Invalidating the entire window will not be what you want,
though. But I suppose there are some levels of containers in between?

So, my next test will be to use another window manager (got to install
first) and test it on the target machine. The green bar on window
minimize and restore points me in a direction away from gtk ... stay
tuned for my report.

As I'm writing this I already got your report. I expected that result as
well.



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