summaryrefslogtreecommitdiff
path: root/src/ui/documentwidget.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-07-12 12:47:41 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-07-12 12:47:41 +0300
commitfe5c564a6d0b99223b2ad56e1856f651a49f2f46 (patch)
treeb93ba8ee2ff9c205242b411744836afc96bcaf25 /src/ui/documentwidget.c
parentaea927e6932fd2ef415b1f592d1c7a137ee0511f (diff)
Update link visited status when navigating
When an URL is visited, ensure that links to that URL update their visual state.
Diffstat (limited to 'src/ui/documentwidget.c')
-rw-r--r--src/ui/documentwidget.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c
index b59233c7..6524d454 100644
--- a/src/ui/documentwidget.c
+++ b/src/ui/documentwidget.c
@@ -1029,6 +1029,7 @@ static void showOrHidePinningIndicator_DocumentWidget_(iDocumentWidget *d) {
1029} 1029}
1030 1030
1031static void documentWasChanged_DocumentWidget_(iDocumentWidget *d) { 1031static void documentWasChanged_DocumentWidget_(iDocumentWidget *d) {
1032 updateVisitedLinks_GmDocument(d->doc);
1032 documentRunsInvalidated_DocumentWidget_(d); 1033 documentRunsInvalidated_DocumentWidget_(d);
1033 updateWindowTitle_DocumentWidget_(d); 1034 updateWindowTitle_DocumentWidget_(d);
1034 updateVisible_DocumentWidget_(d); 1035 updateVisible_DocumentWidget_(d);
@@ -2417,6 +2418,11 @@ static iBool handleCommand_DocumentWidget_(iDocumentWidget *d, const char *cmd)
2417 } 2418 }
2418 return iFalse; 2419 return iFalse;
2419 } 2420 }
2421 if (equal_Command(cmd, "visited.changed")) {
2422 updateVisitedLinks_GmDocument(d->doc);
2423 invalidateVisibleLinks_DocumentWidget_(d);
2424 return iFalse;
2425 }
2420 if (equal_Command(cmd, "document.render")) /* `Periodic` makes direct dispatch to here */ { 2426 if (equal_Command(cmd, "document.render")) /* `Periodic` makes direct dispatch to here */ {
2421// printf("%u: document.render\n", SDL_GetTicks()); 2427// printf("%u: document.render\n", SDL_GetTicks());
2422 if (SDL_GetTicks() - d->drawBufs->lastRenderTime > 150) { 2428 if (SDL_GetTicks() - d->drawBufs->lastRenderTime > 150) {