mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 13:04:35 +00:00
Wayland: Fix missing fullscreen code path
glfwRestoreWindow assumed it was only called in windowed mode.
(cherry picked from commit fdc72edf81
)
This commit is contained in:
parent
562eca6f28
commit
15050f5711
@ -157,6 +157,7 @@ information on what to include when reporting a bug.
|
|||||||
- [Wayland] Bugfix: A window maximized or restored by the user would enter an
|
- [Wayland] Bugfix: A window maximized or restored by the user would enter an
|
||||||
inconsistent state
|
inconsistent state
|
||||||
- [Wayland] Bugfix: Window maximization events were not emitted
|
- [Wayland] Bugfix: Window maximization events were not emitted
|
||||||
|
- [Wayland] Bugfix: `glfwRestoreWindow` assumed it was always in windowed mode
|
||||||
|
|
||||||
|
|
||||||
## Contact
|
## Contact
|
||||||
|
@ -1975,12 +1975,20 @@ void _glfwPlatformIconifyWindow(_GLFWwindow* window)
|
|||||||
|
|
||||||
void _glfwPlatformRestoreWindow(_GLFWwindow* window)
|
void _glfwPlatformRestoreWindow(_GLFWwindow* window)
|
||||||
{
|
{
|
||||||
|
if (window->monitor)
|
||||||
|
{
|
||||||
|
// There is no way to unset minimized, or even to know if we are
|
||||||
|
// minimized, so there is nothing to do here.
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// We assume we are not minimized and acto only on maximization
|
||||||
|
|
||||||
if (window->wl.xdg.toplevel)
|
if (window->wl.xdg.toplevel)
|
||||||
{
|
{
|
||||||
if (window->wl.maximized)
|
if (window->wl.maximized)
|
||||||
xdg_toplevel_unset_maximized(window->wl.xdg.toplevel);
|
xdg_toplevel_unset_maximized(window->wl.xdg.toplevel);
|
||||||
// There is no way to unset minimized, or even to know if we are
|
}
|
||||||
// minimized, so there is nothing to do here.
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user