From 2856085724ff53ed363a743fcc7708f6216dbd28 Mon Sep 17 00:00:00 2001 From: Emma Broman Date: Mon, 9 Dec 2024 17:08:06 +0100 Subject: [PATCH] Use a pointing hand GLFW cursor for the web grab cursor (#3465) * Use a pointing hand GLFW cursor for the web grab cursor * Add TODO comment about custom cursor --- modules/webbrowser/src/browserclient.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/webbrowser/src/browserclient.cpp b/modules/webbrowser/src/browserclient.cpp index b266437944..dfe23d7d9e 100644 --- a/modules/webbrowser/src/browserclient.cpp +++ b/modules/webbrowser/src/browserclient.cpp @@ -128,6 +128,13 @@ bool BrowserClient::DisplayHandler::OnCursorChange(CefRefPtr, CefCur case cef_cursor_type_t::CT_NOTALLOWED: newCursor = WindowDelegate::Cursor::NotAllowed; break; + case cef_cursor_type_t::CT_GRAB: + case cef_cursor_type_t::CT_GRABBING: + // There is no "grabbing" cursors in GLFW, so for now the pointing hand to + // make web objects that use drag-n-drop look more interactive. + // @TODO (emmbr, 2024-12-09) Add custom cursors for these cases + newCursor = WindowDelegate::Cursor::PointingHand; + break; default: newCursor = WindowDelegate::Cursor::Arrow; break;