mirror of
https://github.com/rust-windowing/winit.git
synced 2026-09-01 06:10:07 -04:00
Slight maximize/fullscreen X11 cleanup
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user