Community
Participate
Working Groups
Created attachment 231220 [details] ControlExample bug in GTK 3.8 screenshot I use: F19a 64bit, GTK 3.8, Eclipse Juno How to reproduce: 1. Open ControlExample 2. Switch Tab You will see: SWT:5325): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion `width >= 0' failed (SWT:5325): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion `width >= 0' failed (SWT:5325): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width -5 and height 32670 in the console. In attached screenshot you can see how it looks graphically.
(In reply to comment #0) > Created attachment 231220 [details] > ControlExample bug in GTK 3.8 screenshot > > I use: F19a 64bit, GTK 3.8, Eclipse Juno > > How to reproduce: > > 1. Open ControlExample > 2. Switch Tab > > You will see: > SWT:5325): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: > assertion `width >= 0' failed > > (SWT:5325): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: > assertion `width >= 0' failed > > (SWT:5325): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate > widget with width -5 and height 32670 > > in the console. > > In attached screenshot you can see how it looks graphically. After numerous tests if appears to me that changes in GTK 3.8 imply that if widget is hidden, widget_size_allocate() does not allocate size properly. Here is the patch, which makes widget visible, before GridLayout in ControlExample allocates size for it: http://fedorapeople.org/cgit/aspektor/public_git/eclipse.platform.swt.git/commit/?h=bug_408505 I would be glad to hear your thoughts on that one.
Silenio, could we target this for Kepler ? It prevents many misrendering issues with Gtk 3.8.
It is quite late for this (RC3 week), but we can try to fix it for 4.3, since it only affects GTK3. I have not been able to test the patch yet but I believe it has a quite bad side effect: widgets that are not visible will become visible by calling Control.setBounds(). This most certainly will break other places.
(In reply to comment #3) > It is quite late for this (RC3 week), but we can try to fix it for 4.3, > since it only affects GTK3. > > I have not been able to test the patch yet but I believe it has a quite bad > side effect: widgets that are not visible will become visible by calling > Control.setBounds(). This most certainly will break other places. I suppose it is a silly proposal, but we can hide widget after widget_allocation is done... Otherwise widgets there are hidden are not shown at all.
(In reply to comment #4) > I suppose it is a silly proposal, but we can hide widget after > widget_allocation is done... Otherwise widgets there are hidden are not > shown at all. Maybe hiding the widget again after size_allocate is ok. It might cause unexpected redraws though (which may affect performance). I am getting Fedora 19 beta to be able to reproduce the problem and try the fix out.
(In reply to comment #5) > (In reply to comment #4) > > I suppose it is a silly proposal, but we can hide widget after > > widget_allocation is done... Otherwise widgets there are hidden are not > > shown at all. > > Maybe hiding the widget again after size_allocate is ok. It might cause > unexpected redraws though (which may affect performance). I am getting > Fedora 19 beta to be able to reproduce the problem and try the fix out. You will also get numerous of GSignal errors when you run Eclipse in F19. I have proposed a solution for this here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=407077
(In reply to comment #3) > It is quite late for this (RC3 week), but we can try to fix it for 4.3, > since it only affects GTK3. > > I have not been able to test the patch yet but I believe it has a quite bad > side effect: widgets that are not visible will become visible by calling > Control.setBounds(). This most certainly will break other places. Silenio addressing your issue, I have updated my patch. Now it will check if widget is visible, show it, allocate size and hide it right away. I have tested it with ControlExample and it works the same as the previous patch, which I have posted. I would appreciate your feedback. The updated patch can be found here: http://fedorapeople.org/cgit/aspektor/public_git/eclipse.platform.swt.git/commit/?h=widget_show_2
*** Bug 408503 has been marked as a duplicate of this bug. ***
Slightly modified to show/hide only for GTK 3.8 or newer is pushed to master. http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=c7907f96191641b1b0c373205c20d6cc221d8499