At Thu, 4 Oct 2012 09:01:23 -0700 (PDT) =?ISO-8859-1?Q?Mar=EDa_San_Jos=E9_Seco?= <
mcarmen...@gmail.com> wrote:
>
> Yes, I only iconify and the result is that.
>
> My main app is made in C++ code, but i call wish command with my tcl/tk and=
> the result is a window that i can't minimize completely.
You *have* to call Tcl_DoOneEvent regularly, typically *every time*
through your main loop.
It is generally *simplier* to have the Tcl/Tk be the main program and
have the C++ code as a loadable shared library, exposing descrete
function calls or instance methods. Even if the Tcl/Tk code does
little more that just call the C++ code and implement the GUI (eg
almost all of the -command scripts are calls to the C++ code's
functions or methods). Even then you need to be careful to have the
C++ code either call Tcl_DoOneEvent() itself or not have any actually
*long* loops or (long) I/O bound code in the C++ code (nothing that
waits on something like a pipe or socket). It is *very important* for
the Tcl event handler loop to BE the main loop of the program,
otherwise the GUI will simply hang and be 'non-responsive' (including
failing to iconify, etc.).
Note:
If you are doing something like this in your C++ code (including using
the low level fork()/exec() functions):
system("wish foo.tcl");
and foo.tcl does not call 'exit', the window won't go away when the
program runs to the end of file on foo.tcl.
You message is not clear what you are doing.
>
> Thanks a lot.
>
> El jueves, 4 de octubre de 2012 17:51:47 UTC+2, Robert Heller escribi=F3:
> > At Thu, 4 Oct 2012 07:46:26 -0700 (PDT) =3D?ISO-8859-1?Q?Mar=3DEDa_San_Jo=
> s=3DE9_Seco?=3D <
mcarmen...@gmail.com> wrote:
> >=20
> >=20
> >=20
> > >=20
> >=20
> > > Hello,
> >=20
> > >=20
> >=20
> > > I have a C++ program that executes a tcl/tk program, but i want to
> >=20
> > > minimize my window. I'm using "wm iconify $w" but this doesn't really
> >=20
> > > minimize my window. It stays in my desktop like an Xterm icon.
> >=20
> >=20
> >=20
> > Are you giving time to the Tcl/Tk event loop? Eg. are you calling
> >=20
> > Tcl_DoOneEvent?=20
> >=20
> >=20
> >=20
> > >=20
> >=20
> > > Thanks in advance.
> >=20
> > >=20
> >=20
> > > Regards,
> >=20
> > >=20
> >=20
> > > Maria
> >=20
> > > =20
> >=20
> >=20
> >=20
> > --=20
> >=20
> >=20
> >=20
> > () ascii ribbon campaign -- against html e-mail
> >=20