From ae2c53f52b79ac9a8fe484bc2509a6deff47dc62 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 6 Apr 2023 21:19:44 +0300 Subject: SL-19534 Fixed 'working' cursor flicker --- indra/llwindow/llwindow.h | 3 ++- indra/newview/llinventorypanel.cpp | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/llwindow/llwindow.h b/indra/llwindow/llwindow.h index 0edf39f6ef..802a3b5213 100644 --- a/indra/llwindow/llwindow.h +++ b/indra/llwindow/llwindow.h @@ -118,7 +118,8 @@ public: // Sets cursor, may set to arrow+hourglass virtual void setCursor(ECursorType cursor) { mNextCursor = cursor; }; - virtual ECursorType getCursor() const; + virtual ECursorType getCursor() const; + virtual ECursorType getNextCursor() const { return mNextCursor; }; virtual void updateCursor() = 0; virtual void captureMouse() = 0; diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index f97f07f52c..0589b5b3f3 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -1270,8 +1270,10 @@ BOOL LLInventoryPanel::handleHover(S32 x, S32 y, MASK mask) { BOOL handled = LLView::handleHover(x, y, mask); if(handled) - { - ECursorType cursor = getWindow()->getCursor(); + { + // getCursor gets current cursor, setCursor sets next cursor + // check that children didn't set own 'next' cursor + ECursorType cursor = getWindow()->getNextCursor(); if (LLInventoryModelBackgroundFetch::instance().folderFetchActive() && cursor == UI_CURSOR_ARROW) { // replace arrow cursor with arrow and hourglass cursor -- cgit v1.2.3