Windows do not adhere to Min and Max size settings in Linux builds

Another oddity - a window with Min and Max sizes set will not follow the settings in the Min and Max Width and Height settings.

<https://xojo.com/issue/50891>

which Xojo version do you use?

I’m using 2016R4.1 (for me the last usable version) - there it is ok.

[quote=365274:@Tim Jones]Another oddity - a window with Min and Max sizes set will not follow the settings in the Min and Max Width and Height settings.

<https://xojo.com/issue/50891>[/quote]

I think this is a known bug. Using the wayland backend instead of xorg. What type of linux is this?

Derk - It’s Mint 18.0 with GDK./GTK 3, not Wayland.

Axel - it’s 2017r3 for GTK-3 support.

In light of this issue, I searched for the GDK method for setting these values. I found this:

 GdkGeometry hints;
    hints.min_width = 1280;
    hints.max_width = MAX_INT;
    hints.min_height = 720;
    hints.max_height = MAX_INT;

    gtk_window_set_geometry_hints(
        GTK_WINDOW(window),
        window,
        &hints,
        (GdkWindowHints)(GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE));

It appears that this is what we need until Xojo sorts it out in the framework. However, it appears that a GdkGeometry class is more than just an array:

class GdkGeometry 
{
    public int base_height; 
    public int base_width; 
    public int height_inc; 
    public int max_aspect; 
    public int max_height; 
    public int max_width; 
    public int min_aspect; 
    public int min_height; 
    public int min_width; 
    public gravity width_inc; 
}

I suspect that the resulting call to gtk_window_set_geometry_hints would look like this:

 gtk_window_set_geometry_hints(w.Handle, NIL, ByRef theGDKGeometry, (2|4))

Any pointers about the Declare and call?

GDK.Geometry is labeled as class, but it seems to be rather a structure with most of the properties being int32, max_ and min_aspect as Single and Gravity is an enumeration value of GDK.Gravity.

I have a small repository with GTK declares as a private repository because due to some bugs or different implementations between the distros some features like the HeaderBar work only with selected distros currently.
I could however switch the repository to public and give you a short introduction on how to add the declares if you like. GTKWindow is already present but does not have many features yet.