mirror of
https://github.com/rkd77/elinks.git
synced 2024-11-04 08:17:17 -05:00
Don't retry get_window_title
Call get_window_title() at most once per terminal, even if it fails.
If ELinks is configured with X11 support, get_window_title() calls
XOpenDisplay(), which can sleep if $DISPLAY does not respond.
This delay was previously incurred every time ELinks changed the
title. Besides, if ELinks had already changed the title, setting
ditrm->orig_title = get_window_title(); did not make sense anyway.
(cherry picked from elinks-0.12 commit 5d4beadc4b
)
Conflicts:
src/terminal/kbd.c:
get_window_title has a codepage parameter in 0.13.GIT.
This commit is contained in:
parent
6f4c95cc7f
commit
263c1836cb
@ -515,7 +515,10 @@ dispatch_special(unsigned char *text)
|
||||
if (ditrm->remote)
|
||||
break;
|
||||
|
||||
if (!ditrm->orig_title)
|
||||
/* If ditrm->touched_title is 0, then
|
||||
* ditrm->orig_title should be NULL,
|
||||
* but check it to prevent any leak. */
|
||||
if (!ditrm->orig_title && !ditrm->touched_title)
|
||||
ditrm->orig_title = get_window_title(
|
||||
ditrm->title_codepage);
|
||||
ditrm->touched_title = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user