Hello Paul,

> no. the window doesn't actually appear until the main event loop runs.
> if you don't believe me, remove both "hide" and the main event loop.

perhaps I should comment the code some more
--
// working version
#include <gtkmm.h>

int main(int argc, char *argv[])
{
  // create a main application class
  Gtk::Main kit(argc, argv);
  // create a window
  Gtk::Window window;
  // show the window
  window.show();

  while(true)
    // run the main loop forever
    // here the window is shown
    kit.iteration();

  return EXIT_SUCCESS;
}
--


--
// not working version
#include <gtkmm.h>

int main(int argc, char *argv[])
{
  // create a main application class
  Gtk::Main kit(argc, argv);
  // create a window
  Gtk::Window window;
  // show the window now
  window.show_now();
  // hide the window
  window.hide();
  // show the window
  window.show();

  while(true)
    // run the main loop forever
    // here the window should be shown
    kit.iteration();

  return EXIT_SUCCESS;
}
--

The difference between the two versions is, that in the second I tell the 
window to hide and aftewards to show, but in the main loop the window is _not_ 
shown, although the last command to the window was to show itself. If The 
'show_now' is not called, the window is also shown. It seems to me: If a window 
is shown, then gets the signal to hide itself, after that the signal to show 
itself before the program gets into the main loop, the hide signal is processed 
after the show signal, so not in the order of calling.
I hope, you understand my problem now.


Greetings
Diether Knof

Attachment: signature.asc
Description: Digital signature

_______________________________________________
gtkmm-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtkmm-list

Reply via email to