[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Can someone explain this code in xterm.c?
From: |
Kim F. Storm |
Subject: |
Can someone explain this code in xterm.c? |
Date: |
25 Apr 2003 03:56:33 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 |
In x_set_window_size_1, the vertical_scroll_bar_extra setting may be
set to a non-integral fraction of the canonical column width of the
frame:
(rms 25-Jul-95): f->output_data.x->vertical_scroll_bar_extra
(kwzh 28-Sep-94): = (!FRAME_HAS_VERTICAL_SCROLL_BARS (f)
(kwzh 28-Sep-94): ? 0
(kwzh 28-Sep-94): : FRAME_SCROLL_BAR_PIXEL_WIDTH (f) > 0
(kwzh 20-Sep-94): ? FRAME_SCROLL_BAR_PIXEL_WIDTH (f)
(rms 25-Jul-95): : (FRAME_SCROLL_BAR_COLS (f) * FONT_WIDTH
(f->output_data.x->font)));
Anywhere else (including the normal X widget case, GTK, W32, and MAC
ports), the vertical_scroll_bar_extra is set to an multiple of the
canonical column width.
This setting is used in the calculation of the total width of the
frame window (in macro CHAR_TO_PIXEL_WIDTH), but in other parts of the
code, the width of the scroll bar _area_ is always calculated as the
number of scroll bar colums multiplied by the font width (canonical x
unit).
According to the comments on x_set_window_size_1, it is only used if F
doesn't have a widget, but I'm not sure how to interpret that ...
can the frame not have a widget, but still have scroll bars under X
or GTK?
I really wonder whether that code really works (or is used at all).
So can someone please tell me under what circumstances that code is
used, and how it is intended to work if the rest of the code expects
the frame window to be a multiple of the canonical column width.
Thanks!
- Can someone explain this code in xterm.c?,
Kim F. Storm <=