asuper0 / cfg-ip

A simple tool to config ip, written in Rust.
MIT License
7 stars 2 forks source link

RFD Issue #1

Closed Vadoola closed 8 months ago

Vadoola commented 8 months ago

I haven't had a chance to dig into your code, if I get some time later, I'll take a look see if I can resolve the issue and submit a PR.

If you get a chance first however, I'm using the RFD crate with my slint app PV Unlocker, and I'm not seeing the same issue you are. I wonder if you could get some insight into how I might be doing something differently to fix the issue you are having? Your application also looks more complex than that PV Unlocker app though, so perhaps it's not so straight forward.

asuper0 commented 8 months ago

Thanks very much for the issue, I will try your app. This could be reproduced with very simple code

// [dependencies]
// slint = "1.3.2"
// rfd = "0.12.1"
use rfd::MessageDialog;
slint::slint!{
    import { Button } from "std-widgets.slint";
    export component MainWindow inherits Window{
        width: 100px;
        height: 80px;
        callback show-dlg();
        Button { text: "button"; clicked => { show-dlg(); }}
    }
}

fn main() {
    let window = MainWindow::new().unwrap();

    window.on_show_dlg(|| {
        MessageDialog::new().set_description("hello").show();
    });
    window.run().unwrap();
}

When click the button, the window system will play the sound which means a message box is shown, but is not really shown. There also someone meet the problem, see https://github.com/slint-ui/slint/discussions/4102

asuper0 commented 8 months ago

The issue only happens when a message box is invoked. Your PV Unlocker open a file pick dialog, which would not show a message box. I list some details at https://github.com/slint-ui/slint/discussions/4102 just now.

Vadoola commented 8 months ago

Ah sorry, I should have read your note about it being the message box more closely. My mistake. Hopefully it will get resolved soon.