summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-08-31 15:24:05 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-08-31 15:24:05 +0300
commit29bb2789de5b985ab440f94f9b6233d7cbb38a65 (patch)
treef123f1e515e3170f9e43b0d5a8744653ff579834
parent96fa736afa07458271d345486ab7efdc44f98c32 (diff)
SidebarWidget: Fixed setting the mouse cursor
-rw-r--r--src/ui/sidebarwidget.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c
index 011b235b..40c3f55e 100644
--- a/src/ui/sidebarwidget.c
+++ b/src/ui/sidebarwidget.c
@@ -696,10 +696,12 @@ static iBool processEvent_SidebarWidget_(iSidebarWidget *d, const SDL_Event *ev)
696 return iTrue; 696 return iTrue;
697 } 697 }
698 else if (isCommand_Widget(w, ev, "ident.reveal")) { 698 else if (isCommand_Widget(w, ev, "ident.reveal")) {
699 const iString *crtPath = 699 const iGmIdentity *ident = constHoverIdentity_SidebarWidget_(d);
700 certificatePath_GmCerts(certs_App(), constHoverIdentity_SidebarWidget_(d)); 700 if (ident) {
701 if (crtPath) { 701 const iString *crtPath = certificatePath_GmCerts(certs_App(), ident);
702 revealPath_App(crtPath); 702 if (crtPath) {
703 revealPath_App(crtPath);
704 }
703 } 705 }
704 return iTrue; 706 return iTrue;
705 } 707 }
@@ -779,7 +781,8 @@ static iBool processEvent_SidebarWidget_(iSidebarWidget *d, const SDL_Event *ev)
779 } 781 }
780 setHoverItem_SidebarWidget_(d, hover); 782 setHoverItem_SidebarWidget_(d, hover);
781 /* Update cursor. */ 783 /* Update cursor. */
782 if (contains_Widget(w, mouse)) { 784 if (contains_Widget(w, mouse) && !contains_Widget(d->resizer, mouse) &&
785 !contains_Widget(constAs_Widget(d->scroll), mouse)) {
783 const iSidebarItem *item = constHoverItem_SidebarWidget_(d); 786 const iSidebarItem *item = constHoverItem_SidebarWidget_(d);
784 if (item && d->mode != identities_SidebarMode) { 787 if (item && d->mode != identities_SidebarMode) {
785 setCursor_Window(get_Window(), item->isSeparator ? SDL_SYSTEM_CURSOR_ARROW 788 setCursor_Window(get_Window(), item->isSeparator ? SDL_SYSTEM_CURSOR_ARROW