GDK Window Gravity linux vs. Win32



Hi,

I'm using CamelBox
http://code.google.com/p/camelbox/
for my Gtk2 on win32, Vista Basic.

On linux, the following script works fine, positioning
the windows in each corner, totally visible.
On Windows, the positions are wrong, and they are only partially visible.

Can someone with a Gtk2 going on Win32 test this and see
if it's Gtk2 or CamelBox making the error. Or does windows
anchor it's windows differently?

My linux has the toolbar at the top, while windows
has the toolbar at the bottom. Does this after window anchors?

#!/usr/bin/perl -w
use strict;
use Glib qw/TRUE FALSE/;
use Gtk2 -init;

my ($xscr, $yscr) = (Gtk2::Gdk->screen_width, Gtk2::Gdk->screen_height);
print "$xscr $yscr\n";

my $window = Gtk2::Window->new;
$window->set_border_width(10);
$window->set_title('Window 0');
my $width = 300;
my $height = 100;
$window->set_size_request($width,$height);
$window->set_gravity('GDK_GRAVITY_SOUTH_EAST');
$window->signal_connect( delete_event => sub { Gtk2->main_quit; 1 } );
$window->move($xscr,$yscr);

my $window1 = Gtk2::Window->new;
$window1->set_border_width(10);
$window1->set_title('Window 1');
$window1->set_size_request($width,$height);
$window1->set_gravity('GDK_GRAVITY_SOUTH_WEST');
$window1->move(0,$yscr);

my $window2 = Gtk2::Window->new;
$window2->set_border_width(10);
$window2->set_title('Window 2');
$window2->set_size_request($width,$height);
$window2->set_gravity('GDK_GRAVITY_NORTH_WEST');
$window2->move(0,0);

my $vbox = Gtk2::VBox->new;
my $b    = Gtk2::Button->new_from_stock( "gtk-close" );
$b->signal_connect('button_press_event' => sub { exit  });
$vbox->pack_start( $b, TRUE, TRUE, 0 );
$window->add( $vbox );
$vbox->show_all;

$window->show_all();
$window1->show_all();
$window2->show_all();

Gtk2->main;
__END__


Thanks,
zentara



-- 
I'm not really a human, but I play one on earth.
http://zentara.net/Remember_How_Lucky_You_Are.html 



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