On Thu, Jan 05, 2012 at 04:03:11PM +0000, Thomas Adam wrote:
> On 5 January 2012 15:06, Jim Diamond <[email protected]> wrote:
> > "Correct"? It would seem to me that there should not be unusable
> > space at the bottom of the window, and some change between 9.12 and
> > 9.14 has caused this to appear, at least on my system ("urxvt -pe
> > tabbed" in both cases). This seems much more like a regression than
> > something which is "correct".
>
> This is the problem (main.C):
>
> // When the size of the vt window is not a multiple of the cell
> // size, i.e., when the wm does not honour our size hints, there are
> // extra areas not covered by the terminal screen. Such gaps, when a
> // bg pixmap is set, would have to be cleared manually to properly
> // refresh the background. We take the simpler route and shrink the
> // vt window so as to avoid creating gaps.
> width = ncol * fwidth;
> height = nrow * fheight;
>
> Setting width/height like this is just bogus; when tabbed changes the
> window size via XMoveResizeWindow() the resize increment hints are
> honoured *because* the resultant window with tabbed drawn falls within
> the boundaries.
Bogus why? Note that width and height are the dimensions of the terminal
(vt) window, not of the main (parent) window. However, looking at the
tabbed extension, I see that it uses $term->{width,height} in
'configure' to resize the main window, and $term->{width,height}
(bogusly?) map to the corresponding dimension of the terminal window.
This is possibly the reason of the bug. I think the fix is to have
$term->width and $term->height return the corresponding dimension of the
main window. Does the attached patch solve the problem?
Emanuele
diff --git a/src/rxvtperl.xs b/src/rxvtperl.xs
index f2d4b50..56dee51 100644
--- a/src/rxvtperl.xs
+++ b/src/rxvtperl.xs
@@ -1108,10 +1108,22 @@ rxvt_term::locale ()
OUTPUT:
RETVAL
+int
+rxvt_term::width ()
+ CODE:
+ RETVAL = THIS->szHint.width;
+ OUTPUT:
+ RETVAL
+
+int
+rxvt_term::height ()
+ CODE:
+ RETVAL = THIS->szHint.height;
+ OUTPUT:
+ RETVAL
+
#define TERM_OFFSET(sym) offsetof (TermWin_t, sym)
-#define TERM_OFFSET_width TERM_OFFSET(width)
-#define TERM_OFFSET_height TERM_OFFSET(height)
#define TERM_OFFSET_fwidth TERM_OFFSET(fwidth)
#define TERM_OFFSET_fheight TERM_OFFSET(fheight)
#define TERM_OFFSET_fbase TERM_OFFSET(fbase)
@@ -1128,10 +1140,8 @@ rxvt_term::locale ()
#define TERM_OFFSET_top_row TERM_OFFSET(top_row)
int
-rxvt_term::width ()
+rxvt_term::fwidth ()
ALIAS:
- width = TERM_OFFSET_width
- height = TERM_OFFSET_height
fwidth = TERM_OFFSET_fwidth
fheight = TERM_OFFSET_fheight
fbase = TERM_OFFSET_fbase
_______________________________________________
rxvt-unicode mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/rxvt-unicode