mirror of
https://github.com/glfw/glfw.git
synced 2024-11-25 14:04:36 +00:00
Wayland: Fix glfwSetWindowSize resizing fs windows
glfwSetWindowSize would change the size of fullscreen mode windows as
if they were windowed mode.
(cherry picked from commit 6857995498
)
This commit is contained in:
parent
15050f5711
commit
589385aada
@ -158,6 +158,7 @@ information on what to include when reporting a bug.
|
|||||||
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
|
- [Wayland] Bugfix: `glfwRestoreWindow` assumed it was always in windowed mode
|
||||||
|
- [Wayland] Bugfix: `glfwSetWindowSize` would resize a full screen window
|
||||||
|
|
||||||
|
|
||||||
## Contact
|
## Contact
|
||||||
|
@ -548,7 +548,9 @@ static void xdgToplevelHandleConfigure(void* userData,
|
|||||||
}
|
}
|
||||||
|
|
||||||
_glfwInputWindowSize(window, width, height);
|
_glfwInputWindowSize(window, width, height);
|
||||||
_glfwPlatformSetWindowSize(window, width, height);
|
window->wl.width = width;
|
||||||
|
window->wl.height = height;
|
||||||
|
resizeWindow(window);
|
||||||
_glfwInputWindowDamage(window);
|
_glfwInputWindowDamage(window);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1903,9 +1905,16 @@ void _glfwPlatformGetWindowSize(_GLFWwindow* window, int* width, int* height)
|
|||||||
|
|
||||||
void _glfwPlatformSetWindowSize(_GLFWwindow* window, int width, int height)
|
void _glfwPlatformSetWindowSize(_GLFWwindow* window, int width, int height)
|
||||||
{
|
{
|
||||||
window->wl.width = width;
|
if (window->monitor)
|
||||||
window->wl.height = height;
|
{
|
||||||
resizeWindow(window);
|
// Video mode setting is not available on Wayland
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
window->wl.width = width;
|
||||||
|
window->wl.height = height;
|
||||||
|
resizeWindow(window);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void _glfwPlatformSetWindowSizeLimits(_GLFWwindow* window,
|
void _glfwPlatformSetWindowSizeLimits(_GLFWwindow* window,
|
||||||
|
Loading…
Reference in New Issue
Block a user