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
This commit is contained in:
Emma Broman
2024-12-09 17:08:06 +01:00
committed by GitHub
parent 27e46d8cf5
commit 2856085724

View File

@@ -128,6 +128,13 @@ bool BrowserClient::DisplayHandler::OnCursorChange(CefRefPtr<CefBrowser>, 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;