bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#18196: 24.4.50; crash when setting face background in terminal frame


From: martin rudalics
Subject: bug#18196: 24.4.50; crash when setting face background in terminal frame
Date: Fri, 08 Aug 2014 10:43:05 +0200

> Everything looks good. Your patch still applies fine and fixes the face
> background crash, and your commit fixes the terminal emacsclient display
> issue.

OK.  This was part one of our endeavour.  We now have to discuss with
Eli on how to proceed.  The current patch has three advantages:

(1) It doesn't violate the uniform interface where all calls to
    change_frame_size and adjust_frame_size use the window's text sizes
    as arguments.

(2) It doesn't require any change in window.c.

(3) It has been tested.

It has the following disadvantages:

(1) Code changes in term.c and w32console.c from FRAME_LINES to
    FRAME_TOTAL_LINES.

(2) change_frame_size and adjust_frame_size must be explicitly called
    with FRAME_MENU_BAR_LINES subtracted after calling get_tty_size.

Alternatively, I could try to do what I mentioned earlier: Change the
definition of FRAME_TOP_MARGIN and FRAME_TOP_MARGIN_HEIGHT so that these
do not count the menubar for TTY frames.  This means that I would have
to check every use of these macros for whether the underlying system is
a TTY or not.  This solution would have the following advantages:

(1) Code in term.c and w32console.c would remain unchanged.

(2) The calls of change_frame_size and adjust_frame_size after a
    get_tty_size would remain unchanged.

Disadvantages are:

(1) Code in window.c would have to be special cased for TTY: Affected
    are Fdelete_other_windows_internal, Fwindow_resize_apply_total and
    resize_frame_windows.

(2) I don't yet know how the two uses of FRAME_TOP_MARGIN in dispnew.c
    would be affected.  I suspect that something there might be fishy
    anyway without any visible consequences but am too silly to
    understand it.

(3) The semantics of the size arguments in change_frame_size and
    adjust_frame_size would become inconsistent wrt GUI builds.  We'd
    include the menubar for TTYs and exclude them for GUIs.

(4) We'd have to specially mention TTYs in all documentations of frame
    size parameters and functions setting or querying the size of
    frames.

Personally, I think that the real show-stopper here is (4).  One major
aim of adjust_frame_size was to provide a unified concept where
functions like `frame-text-height' and `set-frame-height' conceptually
do not count menu and tool bars throughout all builds, that is, always
refer to the "same object".

In any case I once more attach the patch I posted earlier.  Mat could
you try whether it solves Bug#18161 for you?

martin

Attachment: tty-frame-size.diff
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]