summaryrefslogtreecommitdiffstats
path: root/perl-install/my_gtk.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/my_gtk.pm')
-rw-r--r--perl-install/my_gtk.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/perl-install/my_gtk.pm b/perl-install/my_gtk.pm
index 7d92617ad..82ed7040c 100644
--- a/perl-install/my_gtk.pm
+++ b/perl-install/my_gtk.pm
@@ -11,6 +11,7 @@ use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK);
@EXPORT_OK = map { @$_ } values %EXPORT_TAGS;
use Gtk;
+use c;
1;
@@ -200,6 +201,7 @@ sub _create_window($$) {
my ($o, $title) = @_;
$o->{window} = new Gtk::Window;
$o->{window}->set_title($title);
+ $o->{window}->signal_connect("expose_event" => sub { c::XSetInputFocus($o->{window}->window->XWINDOW) }) if $my_gtk::force_focus;
$o->{window}->signal_connect("delete_event" => sub { $o->{retval} = undef; Gtk->main_quit });
$o->{window}
}