sciter-sdk / rust-sciter

Rust bindings for Sciter
https://sciter.com
MIT License
805 stars 75 forks source link

WindowBuilder::fixed seems not working #77

Closed 7sDream closed 4 years ago

7sDream commented 4 years ago

Bug Description

After call WindowBuilder::fixed, the window created still resizable.

Environment

OS: macOS 10.15.5, do not test in other OS sciter-rs: 0.5.50 sciter-sdk: 4.4.3.23

Code MWE

#![windows_subsystem = "windows"]

use sciter::{RuntimeOptions, SCRIPT_RUNTIME_FEATURES, WindowBuilder};

fn main() {

    let html = br#"<!DOCTYPE html>
<html lang="en">
    <head>
        <title>Still Resizable</title>
        <script type="text/tiscript">
            $(#content).text = String.printf(
                "%d.%d.%d.%d",
                (Sciter.VERSION >> 16) & 0xffff, Sciter.VERSION & 0xffff,
                (Sciter.REVISION >> 16) & 0xffff, Sciter.REVISION & 0xffff
            )
        </script>
    </head>
    <body>
        <p #content />
    </body>
</html>
"#;

    sciter::set_options(RuntimeOptions::ScriptFeatures(
        SCRIPT_RUNTIME_FEATURES::ALLOW_SYSINFO as u8
    )).unwrap();

    let mut window = WindowBuilder::main_window()
        .with_title()
        .with_pos((200, 200))
        .with_size((360, 360))
        .fixed() // This will make windows not resizable, IMHO
        .create();

    window.load_html(html, None);

    window.run_app();
}

Screenshot(about 2MB)

sciter_fixed_window_mwe

Other info

pravic commented 4 years ago

Confirmed: https://sciter.com/forums/topic/sw_resizeable-is-always-enabled-on-osx/

Works on Windows, though.

7sDream commented 4 years ago

Already fixed in SDK version 4.4.3.24, thank you and Andrew for such a quick investigation and fix.