diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-10-16 14:47:19 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-10-16 14:47:19 +0300 |
commit | 8a3520c43ab22666bf07fc5b4b6bf62995ceb87a (patch) | |
tree | abe0316bdba99ad11c4d92629f364cfcf0b813bd /src/ui/documentwidget.c | |
parent | deea90b7255455b52723de6195fbf86b156dc3ce (diff) |
Open link in new tab with middle mouse button
IssueID #8
Diffstat (limited to 'src/ui/documentwidget.c')
-rw-r--r-- | src/ui/documentwidget.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c index b540a999..1a7bf4a4 100644 --- a/src/ui/documentwidget.c +++ b/src/ui/documentwidget.c | |||
@@ -1810,6 +1810,11 @@ static iBool processEvent_DocumentWidget_(iDocumentWidget *d, const SDL_Event *e | |||
1810 | postCommand_App("navigate.forward"); | 1810 | postCommand_App("navigate.forward"); |
1811 | return iTrue; | 1811 | return iTrue; |
1812 | } | 1812 | } |
1813 | if (ev->button.button == SDL_BUTTON_MIDDLE && d->hoverLink) { | ||
1814 | postCommandf_App("open newtab:1 url:%s", | ||
1815 | cstr_String(linkUrl_GmDocument(d->doc, d->hoverLink->linkId))); | ||
1816 | return iTrue; | ||
1817 | } | ||
1813 | if (ev->button.button == SDL_BUTTON_RIGHT) { | 1818 | if (ev->button.button == SDL_BUTTON_RIGHT) { |
1814 | if (!d->menu || !isVisible_Widget(d->menu)) { | 1819 | if (!d->menu || !isVisible_Widget(d->menu)) { |
1815 | d->contextLink = d->hoverLink; | 1820 | d->contextLink = d->hoverLink; |