mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 13:04:35 +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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1902,11 +1904,18 @@ void _glfwPlatformGetWindowSize(_GLFWwindow* window, int* width, int* height)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void _glfwPlatformSetWindowSize(_GLFWwindow* window, int width, int height)
|
void _glfwPlatformSetWindowSize(_GLFWwindow* window, int width, int height)
|
||||||
|
{
|
||||||
|
if (window->monitor)
|
||||||
|
{
|
||||||
|
// Video mode setting is not available on Wayland
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
window->wl.width = width;
|
window->wl.width = width;
|
||||||
window->wl.height = height;
|
window->wl.height = height;
|
||||||
resizeWindow(window);
|
resizeWindow(window);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void _glfwPlatformSetWindowSizeLimits(_GLFWwindow* window,
|
void _glfwPlatformSetWindowSizeLimits(_GLFWwindow* window,
|
||||||
int minwidth, int minheight,
|
int minwidth, int minheight,
|
||||||
|
Loading…
Reference in New Issue
Block a user