mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-25 14:51:30 +11:00
Slight maximize/fullscreen X11 cleanup
This commit is contained in:
parent
1d97a2a506
commit
eff04394c9
|
@ -231,16 +231,6 @@ impl Window {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// set maximization
|
|
||||||
if window_attrs.maximized {
|
|
||||||
Window::set_netwm(display, window, root, "_NET_WM_STATE_MAXIMIZED_HORZ", true);
|
|
||||||
Window::set_netwm(display, window, root, "_NET_WM_STATE_MAXIMIZED_VERT", true);
|
|
||||||
}
|
|
||||||
|
|
||||||
if window_attrs.fullscreen == FullScreenState::Windowed {
|
|
||||||
Window::set_netwm(display, window, root, "_NET_WM_STATE_FULLSCREEN", true);
|
|
||||||
}
|
|
||||||
|
|
||||||
// set visibility
|
// set visibility
|
||||||
if window_attrs.visible {
|
if window_attrs.visible {
|
||||||
unsafe {
|
unsafe {
|
||||||
|
@ -357,6 +347,8 @@ impl Window {
|
||||||
|
|
||||||
window.set_title(&window_attrs.title);
|
window.set_title(&window_attrs.title);
|
||||||
window.set_decorations(window_attrs.decorations);
|
window.set_decorations(window_attrs.decorations);
|
||||||
|
window.set_maximized(window_attrs.maximized);
|
||||||
|
window.set_fullscreen_windowed(window_attrs.fullscreen == FullScreenState::Windowed);
|
||||||
|
|
||||||
if window_attrs.visible {
|
if window_attrs.visible {
|
||||||
unsafe {
|
unsafe {
|
||||||
|
|
Loading…
Reference in a new issue