macroquad
macroquad copied to clipboard
Disabling fullscreen doesn't work
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;
}
}
Any news on this? I'm having this same issue on X.org with i3wm. OP did you ever find a fix for this?
No news, unfortunately. I recently tried it with GNOME under X11 and the bug is still present.
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 _,
);