Re: no WM decorations with fvwm2



On Mon, 25 Apr 2005 07:26:19 IDT
Dov Grobgeld <dov grobgeld weizmann ac il> wrote:

The following almost works for me under fvwm2:

   if (!$do_windowed) {
       $mw->realize;
       my(@geom) = $mw->window->get_geometry();
       $mw->window->set_override_redirect(1);
       $mw->window->move($win_pos_x-$geom[0], $win_pos_y-$geom[1]);
   }

Unfortunately it still pops up at (0,0) on the screen. I.e. the move
command doesn't work.

Regards,
Dov


Thanks. Yes, Tk uses overrideredirect to do this.  I have found a way to
work around it, by using 'popup', instead of 'toplevel'   The 'move' method 
to work.  Is a 'popup' window going to work like a 'toplevel' in most cases?

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

my $window = Gtk2::Window->new('toplevel');
my $window1 = Gtk2::Window->new('popup');

$window ->signal_connect( 'destroy' => \&delete_event );
$window ->signal_connect( 'delete-event' => \&delete_event );
$window->set_size_request(300,200);
$window1->set_size_request(100,100);

my $button = Gtk2::Button->new_from_stock('gtk-quit');
$window->add( $button );
$button->signal_connect( clicked => \&delete_event );

$window->set_position('center');
#$window1->set_position('center');
$window1->move(200,200);

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

Gtk2->main;
return 0;
#####################################
sub delete_event {
Gtk2->main_quit;
return FALSE;
}  
__END__




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