Re: Fwd: strange behaviour of hide()... or not ?



Am Mittwoch, den 06.05.2009, 15:08 +0200 schrieb Sever P A:
> Hello,
> 
> Thanks a lot, but...
> 
> I think that I must to reformulate the question...

No, I understood you.

> With the code that I send you two messages before, besides the hide()
> present in it, I reach to see permanently (on the screen) the
> Gtk::Window (i.e., the NWIN main_window) when the programm runs. The
> only way to destroy this window (and stop the programm) is clicking on
> the x button of the that window. Is this ok ?

It's not the only way.  Calling hide() works just as you expect it to --
that is, it triggers the hide signal to which Gtk::Main::run() connects
a handler that in turn calls Gtk::Main::quit() to exit the main loop.

The problem is simply that in your testcase, you are calling hide()
before Gtk::Main::run(), so the signal handler is not even installed
yet.  Also, the hide() at that point doesn't have any effect anyway
because the window is not visible yet.

The comments I added to your code point out where what happens.

--Daniel




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