| Summary: | [GTK3] Table origin/clientArea results differ between GTK2 & GTK3 | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Michael Seele <mseele> | ||||||||||||
| Component: | SWT | Assignee: | Platform-SWT-Inbox <platform-swt-inbox> | ||||||||||||
| Status: | RESOLVED WORKSFORME | QA Contact: | |||||||||||||
| Severity: | normal | ||||||||||||||
| Priority: | P3 | CC: | ericwill, lufimtse | ||||||||||||
| Version: | 4.7.1a | Keywords: | triaged | ||||||||||||
| Target Milestone: | --- | ||||||||||||||
| Hardware: | PC | ||||||||||||||
| OS: | Linux | ||||||||||||||
| Whiteboard: | |||||||||||||||
| Attachments: |
|
||||||||||||||
Created attachment 271055 [details]
screenshot ubuntu 16.04 gtk2
Created attachment 271056 [details]
screenshot ubuntu 16.04 gtk3
Created attachment 271057 [details]
screenshot centos7 gtk2
Created attachment 271058 [details]
screenshot centos7 gtk3
Hello Michael, Thank you for the detailed bug report. Maybe in Gtk3 the height of the header needs to be retrieved via CSS or something like that. We should investigate. Does this cause a lot of trouble at the moment or so so? Hi Leo, we've implemented a workaround that adds the header height to the coordinates we get, when we use gtk3. So we found a way to work around this problem, for now. Anyway, it would make sense to fix this inconsistency. There have been some Table/Tree fixes lately that affect this. Running the snippet attached on today's master, I see that the origin is the same on GTK2 and GTK3. As for the client area, the mismatch is in the height/width right? Both the x and y are negative. It's a mismatch of the getWindowOrigin, x/y and width/height (please see the attached screenshots with the printed values) (In reply to Michael Seele from comment #8) > It's a mismatch of the getWindowOrigin, x/y and width/height (please see the > attached screenshots with the printed values) Okay, thanks for confirming. Here is the output I am seeing, running the snippet on master as of today:
GTK3.22 on X11
OS.GTK3: true
origin: Point {106, 168}
clientArea: Rectangle {-1, -26, 614, 206}
bounds: Rectangle {5, 5, 616, 208}
GTK2
OS.GTK3: false
origin: Point {106, 168}
clientArea: Rectangle {-1, -26, 645, 213}
bounds: Rectangle {5, 5, 660, 215}
As far as I can see the two most notable differences are the widths of the clientArea and bounds. There is a 7px difference between the height of the client area and bounds from GTK3 to GTK2, but this is small enough that it's probably due to trimmings and such. If it was a header the difference would be larger, closer to ~25px.
From what I can tell, the width is the problem here, not the height. Are you seeing some different output? Please try running your snippet on the latest I-build and post the results.
> From what I can tell, the width is the problem here, not the height. Are you
> seeing some different output? Please try running your snippet on the latest
> I-build and post the results.
I've tried the snippet under Ubuntu 16.04 (gtk3.18.9) and CentOS 7 (gtk3.22.10) with the I20180403 build and i can confirm that the results i get for GTK3 are correct now.
(In reply to Michael Seele from comment #11) > I've tried the snippet under Ubuntu 16.04 (gtk3.18.9) and CentOS 7 > (gtk3.22.10) with the I20180403 build and i can confirm that the results i > get for GTK3 are correct now. Okay. Is the width discrepancy an issue for you, or shall I close this ticket? > Okay. Is the width discrepancy an issue for you, or shall I close this
> ticket?
Is not an issue, you can close the ticket as fixed.
(In reply to Michael Seele from comment #13) > > Okay. Is the width discrepancy an issue for you, or shall I close this > > ticket? > > Is not an issue, you can close the ticket as fixed. Okay, thanks for the bug report and for taking the time to make a snippet. |
Created attachment 271054 [details] snippet to reproduce the bug The Results of methods org.eclipse.swt.widgets.Table.getWindowOrigin & org.eclipse.swt.widgets.Table.getClientArea differs between GTK2 & GTK3. Please see my attached snippet (you have to run it and check the output corrdinates). If you run the snippet with GTK2, the header height is included. If you run the snippet with GTK3, the header height is not included. We've tested and reproduced this under Ubuntu 16.04 (gtk3.18.9) and CentOS 7 (gtk3.22.10).