diff options
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/documentwidget.c | 8 |
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 | } |