summaryrefslogtreecommitdiff
path: root/src/ui/sidebarwidget.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/sidebarwidget.c')
-rw-r--r--src/ui/sidebarwidget.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c
index 3b02f85c..6dc1e9f2 100644
--- a/src/ui/sidebarwidget.c
+++ b/src/ui/sidebarwidget.c
@@ -527,14 +527,14 @@ static iBool processEvent_SidebarWidget_(iSidebarWidget *d, const SDL_Event *ev)
527 updateItems_SidebarWidget_(d); 527 updateItems_SidebarWidget_(d);
528 } 528 }
529 else if (equal_Command(cmd, "bookmark.copy")) { 529 else if (equal_Command(cmd, "bookmark.copy")) {
530 const iSidebarItem *item = d->menuItem; //hoverItem_ListWidget(d->list); 530 const iSidebarItem *item = d->menuItem;
531 if (d->mode == bookmarks_SidebarMode && item) { 531 if (d->mode == bookmarks_SidebarMode && item) {
532 SDL_SetClipboardText(cstr_String(&item->url)); 532 SDL_SetClipboardText(cstr_String(&item->url));
533 } 533 }
534 return iTrue; 534 return iTrue;
535 } 535 }
536 else if (equal_Command(cmd, "bookmark.edit")) { 536 else if (equal_Command(cmd, "bookmark.edit")) {
537 const iSidebarItem *item = d->menuItem; //hoverItem_ListWidget(d->list); 537 const iSidebarItem *item = d->menuItem;
538 if (d->mode == bookmarks_SidebarMode && item) { 538 if (d->mode == bookmarks_SidebarMode && item) {
539 setFlags_Widget(w, disabled_WidgetFlag, iTrue); 539 setFlags_Widget(w, disabled_WidgetFlag, iTrue);
540 iWidget *dlg = makeBookmarkEditor_Widget(); 540 iWidget *dlg = makeBookmarkEditor_Widget();
@@ -660,6 +660,7 @@ static iBool processEvent_SidebarWidget_(iSidebarWidget *d, const SDL_Event *ev)
660 &item->url, 660 &item->url,
661 collect_String(newRange_String(urlHost_String(&item->url))), 661 collect_String(newRange_String(urlHost_String(&item->url))),
662 0x1f310 /* globe */); 662 0x1f310 /* globe */);
663 postCommand_App("focus.set id:bmed.title");
663 } 664 }
664 } 665 }
665 else if (equal_Command(cmd, "history.clear")) { 666 else if (equal_Command(cmd, "history.clear")) {
@@ -678,7 +679,7 @@ static iBool processEvent_SidebarWidget_(iSidebarWidget *d, const SDL_Event *ev)
678 } 679 }
679 return iTrue; 680 return iTrue;
680 } 681 }
681 } 682 }
682 if (ev->type == SDL_MOUSEMOTION && !isVisible_Widget(d->menu)) { 683 if (ev->type == SDL_MOUSEMOTION && !isVisible_Widget(d->menu)) {
683 const iInt2 mouse = init_I2(ev->motion.x, ev->motion.y); 684 const iInt2 mouse = init_I2(ev->motion.x, ev->motion.y);
684 if (contains_Widget(d->resizer, mouse)) { 685 if (contains_Widget(d->resizer, mouse)) {
@@ -733,7 +734,9 @@ static iBool processEvent_SidebarWidget_(iSidebarWidget *d, const SDL_Event *ev)
733 } 734 }
734 } 735 }
735 } 736 }
736 processContextMenuEvent_Widget(d->menu, ev, {}); 737 if (hoverItem_ListWidget(d->list) || isVisible_Widget(d->menu)) {
738 processContextMenuEvent_Widget(d->menu, ev, {});
739 }
737 return processEvent_Widget(w, ev); 740 return processEvent_Widget(w, ev);
738} 741}
739 742