summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
authorWaweic <waweic@protonmail.com>2020-11-03 13:32:17 +0100
committerWaweic <waweic@protonmail.com>2020-11-03 14:06:02 +0100
commit3c1d486284880f27dbb4ebabf0bee21ce90daca3 (patch)
tree977ce03add597b8d275fcc15fa6425864cfd0eba /src/ui
parent4e076de8be2fd29d4c6489a041cc4b67a0246c2e (diff)
DocumentWidget: Adapt new tab behaviour to keyboard browsing
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/documentwidget.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c
index 5e30cc2a..bacf8ff7 100644
--- a/src/ui/documentwidget.c
+++ b/src/ui/documentwidget.c
@@ -1796,9 +1796,13 @@ static iBool processEvent_DocumentWidget_(iDocumentWidget *d, const SDL_Event *e
1796 const iGmRun *run = i.ptr; 1796 const iGmRun *run = i.ptr;
1797 if (run->flags & decoration_GmRunFlag && 1797 if (run->flags & decoration_GmRunFlag &&
1798 visibleLinkOrdinal_DocumentWidget_(d, run->linkId) == ord) { 1798 visibleLinkOrdinal_DocumentWidget_(d, run->linkId) == ord) {
1799 const int kmods = keyMods_Sym(SDL_GetModState());
1799 postCommandf_App("open newtab:%d url:%s", 1800 postCommandf_App("open newtab:%d url:%s",
1800 (SDL_GetModState() & KMOD_PRIMARY) != 0, 1801 ((kmods & KMOD_PRIMARY) && (kmods & KMOD_SHIFT)) ? 1
1801 cstr_String(linkUrl_GmDocument(d->doc, run->linkId))); 1802 : (kmods & KMOD_PRIMARY) ? 2
1803 : 0,
1804 cstr_String(absoluteUrl_String(
1805 d->mod.url, linkUrl_GmDocument(d->doc, run->linkId))));
1802 return iTrue; 1806 return iTrue;
1803 } 1807 }
1804 } 1808 }