Strange problem with image and event box in Windows



I've got a strange behaviour of an image in an event box in Windows. The same code works flawlessly in Linux and the problem is not fatal in Windows, just an annoyance.

I maintain a Gtk2::Image, where I put a pixmap, which I create new every time the user zooms or pans. The image is in an Gtk2::EventBox, which also is created only once. I can easily reproduce the problem by zooming into the raster, from which the pixmap is made, a couple of times. The image becomes blank and the event box does not receive events (the sub, which is connected to the button_press_event does not get executed). If I pan a bit in this state (the whole thing is in a scrollable window), the image gets recreated and is again shown and everything works. There are no warnings or errors. I have tried to debug the situation by adding few prints to the code where it creates the pixmap but I can't see anything different going on in those cases when the image gets blank compared to cases when everything works. The pixmap size is ok for example.

The fact that the event handling does not work at the same time as the image creation fails makes me think that the problem might be related to GTK.

The Windows port is in MinGW and generally everything else is working. (I reported earlier about problems compiling Gtk2, that's with the version 1.140, here I'm using 1.120 which I managed to compile with some strange hacks a while back)

Any ideas what might be the problem or how to debug?

Ari

--
Prof. Ari Jolma
Geoinformaatio- ja paikannustekniikka
Geoinformation and positioning technology
Teknillinen Korkeakoulu / Helsinki University of Technology
POBox 1200, 02015 TKK, Finland
Email: ari.jolma at tkk.fi URL: http://www.tkk.fi/~jolma




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