Bug 562463 - [GTK] No spinning/busy cursor is seen in BusyIndicator.showWhile()
Summary: [GTK] No spinning/busy cursor is seen in BusyIndicator.showWhile()
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.11   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: 4.16 M3   Edit
Assignee: Sravan Kumar Lakkimsetti CLA
QA Contact:
URL:
Whiteboard:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2020-04-24 08:04 EDT by Oleksandr Mytrofanov CLA
Modified: 2020-12-15 04:24 EST (History)
5 users (show)

See Also:


Attachments
A simple example to test (3.38 KB, text/x-java)
2020-04-24 08:04 EDT, Oleksandr Mytrofanov CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oleksandr Mytrofanov CLA 2020-04-24 08:04:13 EDT
Created attachment 282551 [details]
A simple example to test

No spinning/busy cursor is seen in BusyIndicator.showWhile() on Linux/GTK platform until explicit update after changing cursor. There is no such issue while running in Windows.
Comment 1 Oleksandr Mytrofanov CLA 2020-04-28 06:01:24 EDT
Maybe just to add explicit update in platform-dependent code?

in SWT/gtk/org/eclipse/swt/widgets/Control.java

void setCursor (long /*int*/ cursor) {
	if (GTK.GTK4) {
		long /*int*/ surface = eventSurface ();
		GDK.gdk_surface_set_cursor(surface, cursor);
	} else {
		long /*int*/ window = eventWindow ();
		if (window != 0) {
			GDK.gdk_window_set_cursor (window, cursor);
			update(false, true); // add explicit update
		}
	}
}
Comment 2 Eugene Bova CLA 2020-04-28 12:11:20 EDT
This was introduced in 4.11 by https://bugs.eclipse.org/bugs/show_bug.cgi?id=539706

I took 4.10 where the issue is not reproducible. After removing a call to GDK.gdk_flush () in Control::setCursor (Cursor cursor) the issue starts appearing. 

Patch proposed by Oleksandr works fine for me. Tested with GTK 3.22.10 and 3.22.30 on Centos 7.
Comment 3 Karsten Thoms CLA 2020-04-28 14:23:17 EDT
Could you provide a Gerrit change?

https://wiki.eclipse.org/Platform_UI/How_to_Contribute/Oomph