Skip to content

[GTK4] SwtFixed sizing problem on 4.20(or even 4.18) + #2826

@akurtakov

Description

@akurtakov

Running the following snippet

package org.eclipse.swt.snippets;

import org.eclipse.swt.*;
import org.eclipse.swt.layout.*;
import org.eclipse.swt.widgets.*;

public class Snippet39 {
	public static void main(String[] args) {
		Display display = new Display();
		Shell shell = new Shell(display);
		shell.setText("Snippet 39");
		shell.setLayout(new FillLayout());

		Combo combo = new Combo(shell, SWT.NONE);
		combo.setText("text");
		System.out.println(combo.getSize());
		System.out.println(combo.getBounds());


		shell.pack();
		shell.open();
		while (!shell.isDisposed()) {
			if (!display.readAndDispatch()) display.sleep();
		}
		display.dispose();
	}
}

produces only headerbar window like

Image

The output is:

Point {0, 0}
Rectangle {0, 0, 0, 0}

This hasn't been a problem in Gtk 4.16.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions