mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -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.
This commit is contained in:
parent
51dc3beee7
commit
5d4beadc4b
@ -500,7 +500,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->touched_title = 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user