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



Thanks, Daniel

> Just calling hide() should work.  Do you have a simple test case so we
> can reproduce the problem?

I'll give you the simpliest programm,

* mwin.h
__________________________________________

#ifndef MWIN_H
#define MWIN_H

#include <gtkmm.h>

class MWIN : public Gtk::Window
{
public:
  MWIN ();
  virtual ~MWIN ();

};
#endif
___________________________________________

* mwin.cc
___________________________________________
#include "./mwin.h"

MWIN::MWIN()
{
  hide();
}

MWIN::~MWIN()
{
}
____________________________________________

* main.cc
_____________________________________________
#include <gtkmm/main.h>
#include "./mwin.h"

int main (int argc, char *argv[])
{
  Gtk::Main kit (argc, argv);

  MWIN main_window;

  Gtk::Main::run (main_window);

  return 0;
}
______________________________________________

Besides the hide() in MWIN::MWIN(), the only way (I find) to close the
window (and therefore, to finish the programm...)  is using the x
control button of the window.

I compiled this, using

$ g++ mwin.cc main.cc -o mwin `pkg-config --cflags --libs gtkmm-2.4`


Any idea ??

S.


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