| Summary: | [GTK][Quick Access] getting smaller each time it is opened | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Robert Roth <robert.roth.off> |
| Component: | SWT | Assignee: | Platform-SWT-Inbox <platform-swt-inbox> |
| Status: | RESOLVED WORKSFORME | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | ericwill, Lars.Vogel, markus.kell.r, psuzzi |
| Version: | 4.4.1 | Keywords: | triaged |
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| See Also: | https://bugs.eclipse.org/bugs/show_bug.cgi?id=479409 | ||
| Whiteboard: | |||
|
Description
Robert Roth
Most likely fixed via Bug 445900 *** This bug has been marked as a duplicate of bug 445900 *** (Un)fortunately, this bug is not directly related to bug 445900. I can reproduce this problem with SWT from before the changes for bug 445900, and it happens even on 4.5.2 and 4.4.1 on GTK2 and GTK3. (In reply to Markus Keller from comment #2) > (Un)fortunately, this bug is not directly related to bug 445900. I can > reproduce this problem with SWT from before the changes for bug 445900, and > it happens even on 4.5.2 and 4.4.1 on GTK2 and GTK3. Should we move this bug to SWT? Shell#getBounds() starts to return too small values after the call to OS.gtk_widget_size_allocate() in Shell#forceResize(). It looks like the problem is that Shell#setBounds() is called before the shell is visible. The hack for bug 136323 looks wrong, since it only adjusts x & y, but doesn't touch width & height. I did some experiments, and by trial-and-error, I found a "solution" in Shell#forceResize() that looks like it fixes this concrete scenario: int border = gtk_widget_get_mapped (shellHandle) ? OS.gtk_container_get_border_width (shellHandle) : 0; ... allocation.width = width + 2 * border; allocation.height = height + 2 * border; Unfortunately, this "solution" has a few problems: - It's obviously wrong to *add* the borders to width & height. Subtracting would make sense. I should not have tried that at all... - Shell#getBounds() returns wrong values for quite some time until after the Shell has been made visible. - When I resize the Content Assist popup, the label on the bottom gets cut off. Maybe the problem is that Shell#getSizeInPixels()/getBoundsInPixels() uses OS.gtk_widget_get_allocation() to determine the shell's size. https://developer.gnome.org/gtk3/stable/GtkWidget.html#gtk-widget-get-allocation and https://developer.gnome.org/gtk3/stable/GtkWindow.html#gtk-window-set-default-size say that this is not guaranteed to return the allocation that was previously set. I looked into a better solution, but didn't find anything I'd be comfortable to touch at this time. I cannot reproduce this issue on GTK3.22/Fedora 28/4.8 M7. It's likely this was fixed in a bunch of the sizing changes. |