Bug #9592
Implement a global cursor in Swing
Start date:
Due date:
% Done:
0%
billable:
No
vendor_id:
GCD
case_num:
version_reported:
version_resolved:
reviewer:
production:
No
env_name:
topics:
History
#1 Updated by Șerban Bursuc over 1 year ago
The goal is to implement an application wide cursor for the Swing client to be used in coordination with SetCursor from User32 API.
The web client uses a trick that inserts an HTML component with a high z-index which allows the cursor to be consistent throughout the application, however Swing lacks this. The only way known so far is to assign each widget (or their parent window) with the correct cursor. Similar articles on the internet point to the same idea:
http://www.catalysoft.com/articles/busycursor.html
However this needs to be studied.
The offending code is in SwingGuiDriver:
@Override
public void setGlobalCursor(MousePtrWrapper ptr)
{
// TODO: this should assign the cursor for the entire application, not just for ACTIVE-WINDOW
globalCursor = ptr;
int wid = WindowManager.getActiveWindow().getId().asInt();
propagate(wid, wid, globalCursor);
}