From 500487edd30bbefed7046a52693673973c2cc913 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Sun, 6 Dec 2020 07:50:44 +0200 Subject: Fixed truncated tab titles; unfocus input on right-click IssueID #53 --- src/app.c | 1 + src/ui/documentwidget.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/src/app.c b/src/app.c index cf8a7119..1e0a847d 100644 --- a/src/app.c +++ b/src/app.c @@ -852,6 +852,7 @@ iDocumentWidget *newTab_App(const iDocumentWidget *duplicateOf, iBool switchToNe } arrange_Widget(tabs); refresh_Widget(tabs); + postCommandf_App("tab.created id:%s", cstr_String(id_Widget(as_Widget(doc)))); return doc; } diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c index 4ac48323..7a297aa7 100644 --- a/src/ui/documentwidget.c +++ b/src/ui/documentwidget.c @@ -1529,6 +1529,11 @@ static iBool handleCommand_DocumentWidget_(iDocumentWidget *d, const char *cmd) animatePlayers_DocumentWidget_(d); return iFalse; } + else if (equal_Command(cmd, "tab.created")) { + /* Space for tab buttons has changed. */ + updateWindowTitle_DocumentWidget_(d); + return iFalse; + } else if (equal_Command(cmd, "server.showcert") && d == document_App()) { const char *unchecked = red_ColorEscape "\u2610"; const char *checked = green_ColorEscape "\u2611"; @@ -2228,6 +2233,7 @@ static iBool processEvent_DocumentWidget_(iDocumentWidget *d, const SDL_Event *e if (d->menu) { destroy_Widget(d->menu); } + setFocus_Widget(NULL); iArray items; init_Array(&items, sizeof(iMenuItem)); if (d->contextLink) { -- cgit v1.2.3