Hi, Screen redraws are performed during idle time in the main loop. So if you want to wait for the screen to be redraw with out the window and then execute some code you will need to add an idle call back, but at a lower priority. What will happen is the normal signals will occur when we ask for the window to be destroyed, on the "destroy" signal we add an idle call back. We then let control return back to the main loop. All other idle call backs happen that deal with redraws, then our idle call back gets run after all the others as it has a lower priority.

I am really not that good at Python, but give this a go. What I think is happening is although our redraws were done when we did the screen shot and had nothing else to do, other applications were still doing their redraws and they still had the remains of our windows image. To get around this I have used a time-out of 1 second instead of waiting for our work to be done. Hopefully in this time we would have done our work to destroy the window and the other applications would have done their redraws.

I am not sure their is a way to wait for all other applications to do their redraws. If there is then I am sure it would be pretty low level possibly at the X11 level.

Who is online

Users browsing this forum: No registered users and 5 guests

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum