Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 390034 - Widget.gtk_widget_set_visible() for GTK>=3.0
Summary: Widget.gtk_widget_set_visible() for GTK>=3.0
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.2   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 4.3 M4   Edit
Assignee: Silenio Quarti CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 340067
  Show dependency tree
 
Reported: 2012-09-20 11:53 EDT by Silenio Quarti CLA
Modified: 2012-11-16 10:44 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Silenio Quarti CLA 2012-09-20 11:53:01 EDT
See bug#388419 for more details.

It seems there is no replacement for GTK_WIDGET_SET_FLAGS(widget, GTK_VISIBLE), so the only alternative I see right now is to turn off the optimization in Control.moveHandle() if >=3.0.  There is another place where Widget.gtk_widget_set_visible() is used (Control.setVisible()). I quick look tells that we are hiding the widget twice (BAD).  We need to figure out why the code is there and if there is a alternative.
Comment 1 Silenio Quarti CLA 2012-10-29 15:58:02 EDT
For now, I have disabled the optimization in Control.moveHandle() for GTK3.

http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=0eca4ceb4b73c304aa698da22e77c215f055707d
Comment 2 Silenio Quarti CLA 2012-11-02 17:13:20 EDT
With the fix for bug#393156, the performance problem I mentioned in

https://bugs.eclipse.org/bugs/show_bug.cgi?id=388419#c21

does not happen anymore. Our implementation of GtkScrollable does not queue a redraw for the whole widget.

I have also changed the implementation of Control.setVisible() to call gtk_widget_set_can_focus() instead of gtk_widget_set_visible(). 

http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=65c6d780b85871c0cfac3975fce13f0f3df8b482