From 0517d5a157477a895fc2c4bb6e665c328ddd675b Mon Sep 17 00:00:00 2001 From: Harley Acheson Date: Thu, 15 Feb 2024 17:15:06 -0800 Subject: [PATCH] UI Test: Dialog Title Move Hand Cursor Mouse cursor changes to a "Hand" to indicate that popup blocks can be moved by dragging the title region. --- .../blender/editors/interface/interface_handlers.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/source/blender/editors/interface/interface_handlers.cc b/source/blender/editors/interface/interface_handlers.cc index 5a4a499bb6f..3a44a181d16 100644 --- a/source/blender/editors/interface/interface_handlers.cc +++ b/source/blender/editors/interface/interface_handlers.cc @@ -10390,6 +10390,18 @@ static int ui_handle_menu_event(bContext *C, but = ui_region_find_active_but(region); #ifdef USE_DRAG_POPUP + + /* Change cursor at top of the popup, but not on splash since that closes. */ + if (is_floating && event->type == MOUSEMOVE && block->name != "splash") { + wmWindow *win = CTX_wm_window(C); + if (inside_title && win->modalcursor != WM_CURSOR_HAND) { + WM_cursor_modal_set(win, WM_CURSOR_HAND); + } + else if (!inside_title && win->modalcursor == WM_CURSOR_HAND) { + WM_cursor_modal_restore(win); + } + } + if (menu->is_grab) { if (event->type == LEFTMOUSE) { menu->is_grab = false; -- 2.30.2