Re: Using Gtk2::Helper->add_watch() or Glib::IO->add_watch



    use Gtk2 '-init', '-threads-init';

Note, however, that i have not personally played with this thread-
safety stuff to any degree, so YMMV.

Hmmm... I tried the following script on two environments

Windows XP:
Glib 1.060
Gtk2 1.060
Glib built for 2.4.2, running with 2.6.1
Gtk2 built for 2.4.9, running with 2.6.1

Debian3.1:
Glib 1.082
Gtk2 1.082
Glib built for 2.6.4, running with 2.6.4
Gtk2 built for 2.6.4, running with 2.6.4

# ---------------- #
use strict;
use warnings;
use Gtk2 '-init', '-threads-init';
my $window   = Gtk2::Window->new;
$window->set_default_size( 400, 300 );
$window->show_all();
Gtk2->main;
# ---------------- #

On debian, things work just fine. I see a window pop up and the whole
world is in order.

On win32, things are not quite so good. A window pops up but it seems
to be stuck in a loop. I see the hour-glass and the ui is not
responsive.

Is this another win32 quirk or is the version difference causing
misbehaviour ? Any ideas ?

Another thing I noticed is that the script that I sent out with the
previous email (without the  -threads-init) works fine on both win32
and debian.  But that may be just a case of "programming by
coincidence" ;)

_Ofey.



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