Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 529532

Summary: [GTK3] Mouse-over table header shows selection at first table row
Product: [Eclipse Project] Platform Reporter: Simeon Andreev <simeon.danailov.andreev>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED NOT_ECLIPSE QA Contact:
Severity: normal    
Priority: P3 CC: akurtakov, ericwill, gautier.desaintmartinlacaze, loskutov
Version: 4.7.2Keywords: triaged
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Screenshot showing the selected first row, due to mouse-over column headers.
none
Screenshot of example table in A Widget Factory, based on GTK3. none

Description Simeon Andreev CLA 2018-01-08 09:46:53 EST
Created attachment 272172 [details]
Screenshot showing the selected first row, due to mouse-over column headers.

See attached screenshot.

To reproduce, mouse-over column headers in any E.g. the preference page for hot-keys (org.eclipse.ui.internal.keys.NewKeysPreferencePage, uses org.eclipse.jface.viewers.TableViewer), or the preference page for proxies (org.eclipse.ui.internal.net.ProxyEntriesComposite, uses ).


SWT snippet:

public static void main (String [] args) {
	Display display = new Display();
	Shell shell = new Shell(display);
	shell.setLayout(new FillLayout());
	shell.setSize(300, 200);
	shell.setText("Bug");

	Table table = new Table(shell, SWT.BORDER);
	table.setHeaderVisible(true);

	TableColumn column = new TableColumn(table, SWT.NONE);
	column.setText("hello");

	int n = 5;
	for (int i = 0; i < n; ++i) {
		TableItem item = new TableItem(table, SWT.NONE);
		item.setText("row " + i);
	}

	column.pack();
	table.select(n - 1);

	shell.open();
	while (!shell.isDisposed()) {
	  if (!display.readAndDispatch())
	    display.sleep();
	}
	display.dispose();
}

Run and mouse-over the header of the only header. Observe that the first row is shown as hovered on.


Observed on Eclipse 4.7 and Eclipse 4.8 under RHEL 7.2 with GTK3.14. I did not observe this on Windows 10, Eclipse 4.8.

Seen in:

Eclipse SDK
Version: Oxygen.2 (4.7.2)
Build id: M20171130-0510

Eclipse SDK
Version: Photon (4.8)
Build id: I20171217-2000

Environment:

RHEL 7.2
gtk3-3.14.13-16.el7.x86_64
Comment 1 Simeon Andreev CLA 2018-01-08 09:50:17 EST
Created attachment 272173 [details]
Screenshot of example table in A Widget Factory, based on GTK3.

Attached example for standard GTK3 table, shown with https://github.com/valr/awf.

Behaviour in the table is OK.
Comment 2 Alexander Kurtakov CLA 2018-01-15 14:11:06 EST
I'm afraid this is theme specific or smth that is fixed in newer versions of GTK. Can't reproduce it on Fedora 27 with GTK 3.22. Do you mind trying it with Adwaita so we can know whether it's theming issue?
Comment 3 Alexander Kurtakov CLA 2018-03-05 13:34:02 EST
If not interested in this one anymore I'll assume it works for you and/or is theme specific issue and close this one in a week.
Comment 4 Simeon Andreev CLA 2018-03-07 03:33:46 EST
Sorry, looks like I missed Comment #2.

I checked with GTK 3.22.10, same problem.

I checked with Adwaita, no problem.

However with Adwaita I don't see any row highlighting on mouse-over. Only on selection.

I'll open a ticket for this in our bug tracker, and will eventually come back to it. If its not theme related I'll open a new Eclipse ticket. So this can be closed.
Comment 5 Simeon Andreev CLA 2018-03-07 03:39:18 EST
I'm guessing its sufficient to add "row highlight on mouse-over" to the custom .css. But no time to find out exactly the lines in our theme for this.
Comment 6 Eric Williams CLA 2018-08-16 14:52:20 EDT
(In reply to Simeon Andreev from comment #4)
> Sorry, looks like I missed Comment #2.
> 
> I checked with GTK 3.22.10, same problem.
> 
> I checked with Adwaita, no problem.
> 
> However with Adwaita I don't see any row highlighting on mouse-over. Only on
> selection.
> 
> I'll open a ticket for this in our bug tracker, and will eventually come
> back to it. If its not theme related I'll open a new Eclipse ticket. So this
> can be closed.

Closing.