Skip to content

[Linux] SWT 4.39 - Tree with size "preferred" disappears #3025

@pbi-qfs

Description

@pbi-qfs

Describe the bug
A tree control with size "preferred" is not visible or disappears when changing the style.

To Reproduce

  • Install SWT Controls demo as described in https://eclipse.dev/eclipse/swt/examples.html
  • Open Controls demo (standalone or as view in Eclipse)
  • Select "Tree" tab -> Tree already is (almost invisible)
  • Select a fixed size, then "preferred" again, or resize the window -> Tree is visible
  • Toggle any style, w.g. SWT.CHECK -> Tree disappears

Expected behavior
The tree should be visible all the time.

Screenshots
Image

Image

Environment:

  1. Select the platform(s) on which the behavior is seen:
    • All OS
    • Windows
    • Linux
    • macOS
  1. Additional OS info (e.g. OS version, Linux Desktop, etc)
  • Seen on: Ubuntu 18, 20, 24
  1. JRE/JDK version
  • JDK 21 (Tested: Zulu)
  • JDK 25 (Tested: Zulu, Temurin, Oracle)

Version since
4.39M1, still seen in M2

Workaround (or) Additional context
Maybe unrelated: When opening the SWT Controls view in Eclipse, this error is logged six times in the console:

(Eclipse:37891): Gtk-WARNING **: 12:36:28.297: gtk_widget_size_allocate(): attempt to allocate widget with width -5 and height 0

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