Bug 577600

Summary: [GTK4] ToolTip Balloon and visible crashes ControlExample
Product: [Eclipse Project] Platform Reporter: Alexander Kurtakov <akurtakov>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: jmajano
Version: 4.23   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
See Also: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/188787
https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=89b9748b3c2fca8cf35778f4d890fb9edbcbf666
Whiteboard:
Bug Depends on: 577835    
Bug Blocks: 540385    

Description Alexander Kurtakov CLA 2021-12-02 14:44:08 EST
(SWT:44564): Gdk-CRITICAL **: 21:42:42.544: gdk_monitor_get_geometry: assertion 'GDK_IS_MONITOR (monitor)' failed
Exception in thread "main" java.lang.UnsatisfiedLinkError: 'void org.eclipse.swt.internal.gtk3.GTK3.gtk_window_resize(long, int, int)'
	at org.eclipse.swt.internal.gtk3.GTK3.gtk_window_resize(Native Method)
	at org.eclipse.swt.widgets.ToolTip.configure(ToolTip.java:177)
	at org.eclipse.swt.widgets.ToolTip.setVisible(ToolTip.java:850)
	at org.eclipse.swt.examples.controlexample.ToolTipTab.setExampleWidgetVisibility(ToolTipTab.java:235)
	at org.eclipse.swt.examples.controlexample.Tab.setExampleWidgetState(Tab.java:1778)
	at org.eclipse.swt.examples.controlexample.ToolTipTab.setExampleWidgetState(ToolTipTab.java:221)
	at org.eclipse.swt.examples.controlexample.Tab.recreateExampleWidgets(Tab.java:1615)
	at org.eclipse.swt.examples.controlexample.Tab.lambda$0(Tab.java:327)
	at org.eclipse.swt.events.SelectionListener$1.widgetSelected(SelectionListener.java:84)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:252)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
Comment 1 Eclipse Genie CLA 2021-12-13 11:11:27 EST
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/188787
Comment 2 Joel Majano CLA 2021-12-13 11:19:40 EST
With this patch, ToolTip Balloon functionality is disabled until replacement functions can be found for the sea of them used in ToolTip.configure(). In the meantime, an error will be printed stating that configure() is not working and that ToolTip Balloon functionality is not available.
Comment 4 Joel Majano CLA 2021-12-15 12:19:16 EST
When ToolTip is selected visible, and "Show in tray" is also selected, a GTK3 only function gets called. Currently investigating but since StatusIcon was removed in GTK4 replacement is technically possible in X11, but not in Wayland without the use of external libraries. See https://discourse.gnome.org/t/what-to-use-instead-of-statusicon-in-gtk4-to-display-the-icon-in-the-system-tray/7175 for more details. 

Also, GtkPopover will be explored as a replacement for ToolTips with SWT.BALLOON style since their visual representation is similar.