Bug#341715: Specifying BORDER => 0 causes widgets not to be displayed.
Package: libcurses-widgets-perl
Version: 1.997-2
Severity: normal
Tags: patch
I found a bug in which specifying BORDER => 0 in the widget creation causes
a message to be displayed about wrong geometry. I found the bug and I believe
I have fixed it.
-- System Information:
Debian Release: 3.0
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Versions of packages libcurses-widgets-perl depends on:
ii libcurses-perl 1.12-1 Curses interface for Perl
ii perl 5.8.7-4 Larry Wall's Practical Extraction
libcurses-widgets-perl recommends no packages.
-- no debconf information
--- Widgets-orig.pm Thu Nov 14 14:49:29 2002
+++ Widgets.pm Fri Dec 2 09:28:04 2005
@@ -719,6 +719,7 @@
my $self = shift;
my $mwh = shift;
my $active = shift;
+ my $conf = $self->{CONF};
my (@geom, $dwh, $cwh);
# Get the canvas geometry and create a window handle to it
@@ -730,7 +731,7 @@
$self->_caption($dwh);
# Get the content area geometry and create a window handle to it
- $cwh = $self->_canvas($dwh, $self->_cgeometry);
+ $cwh = $$conf{BORDER} ? $self->_canvas($dwh, $self->_cgeometry) : $dwh;
unless (defined $cwh) {
$dwh->delwin;
return 0;
@@ -740,8 +741,10 @@
$self->_cursor($cwh) if $active;
# Flush the changes to the screen and release the window handles
- $cwh->refresh;
- $cwh->delwin;
+ if ($$conf{BORDER}) {
+ $cwh->refresh;
+ $cwh->delwin;
+ }
$dwh->refresh;
$dwh->delwin;
Reply to: