<div class="gmail_quote">On Sat, Oct 17, 2009 at 1:03 PM, Cornelius Hald <span dir="ltr"><<a href="mailto:hald@icandy.de">hald@icandy.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Sat, 2009-10-17 at 11:58 +0100, Aniello Del Sorbo wrote:<br>
><br>
> My program doesn't ask anything when you close it, but it keeps<br>
> automatically saving the document in<br>
> a temporary file. Thus at every start it loads it up and you're back<br>
> where you left.<br>
> So I thought I would call the screenshot function at the very end,<br>
> while closing down the program.<br>
><br>
> It didn't work. It didn't save the screenshot of what was there.<br>
><br>
> So I call it when I receive the expose event (like in the example) and<br>
> it does work there.<br>
> Why is that?<br>
><br>
> I still have to investigate it, but I thought the window would be<br>
> still available in my Quit function<br>
> when called from the destroy event.<br>
<br>
</div>I'm also calling it when quitting the application. I'm using the<br>
'delete-event' on my main window. There I call it just before<br>
gtk_main_quit(). It's working for me...<br>
<br>
Cheers!<br>
Conny<br>
<div><div></div><div class="h5"><br>
<br>
_______________________________________________<br>
maemo-developers mailing list<br>
<a href="mailto:maemo-developers@maemo.org">maemo-developers@maemo.org</a><br>
<a href="https://lists.maemo.org/mailman/listinfo/maemo-developers" target="_blank">https://lists.maemo.org/mailman/listinfo/maemo-developers</a><br>
</div></div></blockquote></div><br>I'm resuming an old thread, sorry!<br><br>If I call hildon_gtk_window_take_screenshot() within the callback function for the delete-event of the main app, just before gtk_main_quit(), it seems that something has already happened to the main window: it complains that it is not a GtkWindow (which usually is, as HildonWindow derives from it), but a GdkWindow, and, of course, no screenshot were taken.<br>
<br>Luca Donaggio<br>