Skip to content

Commit

Permalink
Wayland: Fix partial framebuffer size retrieval
Browse files Browse the repository at this point in the history
(cherry picked from commit 5f60c22)
  • Loading branch information
elmindreda committed Jul 16, 2020
1 parent 85a169f commit bd2fb9e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ information on what to include when reporting a bug.
- [X11] Bugfix: Keys pressed simultaneously with others were not always
reported (#1112,#1415,#1472,#1616)
- [Wayland] Bugfix: Repeated keys could be reported with `NULL` window (#1704)
- [Wayland] Bugfix: Retrieving partial framebuffer size would segfault


## Contact
Expand Down
6 changes: 4 additions & 2 deletions src/wl_window.c
Original file line number Diff line number Diff line change
Expand Up @@ -1118,8 +1118,10 @@ void _glfwPlatformGetFramebufferSize(_GLFWwindow* window,
int* width, int* height)
{
_glfwPlatformGetWindowSize(window, width, height);
*width *= window->wl.scale;
*height *= window->wl.scale;
if (width)
*width *= window->wl.scale;
if (height)
*height *= window->wl.scale;
}

void _glfwPlatformGetWindowFrameSize(_GLFWwindow* window,
Expand Down

0 comments on commit bd2fb9e

Please sign in to comment.