Skip to content

Commit d986b0c

Browse files
authored
Cast width and height variables to uint32_t (#223)
* Cast width and height variables to uint32_t * Apply suggestion * Remove unnecessary include --------- Co-authored-by: st0rmbtw <>
1 parent f3288dc commit d986b0c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

sources/Platform/Linux/Wayland/LinuxWindowWayland.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
#include "protocols/viewporter-client-protocol.h"
3131

3232
#include "LinuxWindowWayland.h"
33-
#include "LinuxDisplayWayland.h"
3433
#include "LinuxWaylandState.h"
3534

3635

@@ -97,8 +96,10 @@ static void XDGTopLevelHandleConfigureCallback(
9796

9897
LinuxWindowWayland::State& state = window->GetState();
9998

100-
if (width != 0 && height != 0 && (width != state.size.width || height != state.size.height))
101-
window->SetSizeInternal(Extent2D{ width, height });
99+
const Extent2D newSize = Extent2D{ static_cast<uint32_t>(width), static_cast<uint32_t>(height) };
100+
101+
if (width != 0 && height != 0 && newSize != state.size)
102+
window->SetSizeInternal(newSize);
102103
}
103104

104105
static void XDGTopLevelHandleCloseCallback(void* userData, xdg_toplevel* toplevel)

0 commit comments

Comments
 (0)