macroquad icon indicating copy to clipboard operation
macroquad copied to clipboard

Disabling fullscreen doesn't work

Open Yoppez opened this issue 2 years ago • 3 comments

On Linux with KDE Wayland, set_fullscreen(false) actually mantains the fullscreen. I tested on Windows and it works there.

Example code:

use macroquad::prelude::*;

fn config() -> Conf {
    Conf {
        window_title: "test".to_string(),
        fullscreen: true,
        ..Default::default()
    }
}

#[macroquad::main(config)]
async fn main() {
    set_fullscreen(false);
    request_new_screen_size(800., 600.);
    loop {
        next_frame().await;
    }
}

Yoppez avatar Aug 06 '23 15:08 Yoppez

Any news on this? I'm having this same issue on X.org with i3wm. OP did you ever find a fix for this?

ElnuDev avatar Mar 25 '24 20:03 ElnuDev

No news, unfortunately. I recently tried it with GNOME under X11 and the bug is still present.

Yoppez avatar May 07 '24 01:05 Yoppez

Not an expert on X11 but changing this part in miniquad seems to work for me (remove also the return earlier) https://github.com/not-fl3/miniquad/blob/f6780f19d3592077019872850d00e5eb9e92a22d/src/native/linux_x11.rs#L181-L185

        let wm_fullscreen = (self.libx11.XInternAtom)(
            self.display,
            if fullscreen {
                b"_NET_WM_STATE_FULLSCREEN\x00" as *const u8 as *const _
            } else {
                b"\x00" as *const u8 as *const _
            },
            false as _,
        );

bolphen avatar Jun 16 '24 00:06 bolphen