[GTK/Wayland] ContentAssistant is not resizable
Let's make sure issue is not already fixed in latest builds first.
- [x] I verified I can reproduce this issue against latest Integration Build of Eclipse SDK
Steps to reproduce
From a fresh installation and clean workspace:
- Create a Java with a source file
- Trigger completion pop-up (e.g. ctrl-space)
- The pop-up isn't properly resizable
Normally it flickers strangely, but sometimes it "catches" and resizes, but only smaller. Sometimes it gets really small and then I have to edit completion_proposal_size in .metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml to restore a usable size.
Demo of resize:
https://github.com/user-attachments/assets/c6323758-4aae-46da-82f1-a90b6a831252
Tested under this environment:
- OS & version: Ubuntu 25.04 and Ubuntu 25.10 running GTK3 on Wayland
- Eclipse IDE/Platform version (as shown in Help > About): I20251014-1810
- This only happens when
GDK_BACKEND=wayland, withGDK_BACKEND=x11and running on a xfce4 session on the same machine (via vnc as described here) the resize works ok.
Community
- [x] I understand reporting an issue to this OSS project does not mandate anyone to fix it. Other contributors may consider the issue, or not, at their own convenience. The most efficient way to get it fixed is that I fix it myself and contribute it back as a good quality patch to the project.
While this is most visible in completions, if I make a Shell with SWT.RESIZE | SWT.ON_TOP as done in CompletionProposalPopup I get the same behaviour, confirming it looks like an SWT, not JFace/PlatformUI bug.
Moving issue.
Here is a minimal example derived from Snippet344
When launching this with GDK_BACKEND=x11 this works fine, but with GDK_BACKEND=wayland it does not resize properly
/*******************************************************************************
* Copyright (c) 2000, 2013 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.swt.snippets;
/*
* Tool shell snippet: create a shell in the same style as as a CompletionProposalPopup
*
* For a list of all SWT example snippets see
* http://www.eclipse.org/swt/snippets/
*/
import static org.eclipse.swt.events.SelectionListener.*;
import org.eclipse.swt.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.layout.*;
import org.eclipse.swt.widgets.*;
public class Snippet387 {
public static void main(String[] args) {
Display display = new Display();
final Shell shell = new Shell(display);
shell.setText("Snippet 344");
shell.setLayout(new GridLayout(1, false));
Button button = new Button(shell, SWT.PUSH);
button.setText("Click me");
button.addSelectionListener(widgetSelectedAdapter(e -> {
Shell shell2 = new Shell(button.getShell(), SWT.RESIZE | SWT.ON_TOP);
shell2.setLayout(new GridLayout(1, false));
shell2.setText("CompletionProposal style shell");
Label l = new Label(shell2, SWT.LEFT);
l.setText("This is a SWT.RESIZE | SWT.ON_TOP Shell with a parent");
Point location = shell.getLocation();
shell2.setLocation(location.x + 250, location.y + 50);
shell2.pack();
shell2.open();
}));
shell.pack();
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
display.dispose();
}
}
Is this even a valid bug report - I had been using Eclipse as it ran by default on my Ubuntu machine, which meant GTK3 + GDK_BACKEND=wayland. Is this configuration supported? It not, perhaps there is a bug that GDK_BACKEND=x11 should be gently enforced?
I can reproduce the issue. SWT generally supports Wayland quite well and X11 shouldnt' be enforced as distributions are going in the Wayland only direction https://fedoraproject.org/wiki/Changes/WaylandOnlyGNOME