Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
pirvi-public
glfw
Commits
f710db65
Commit
f710db65
authored
Jan 04, 2018
by
Emmanuel Gil Peyrot
Committed by
linkmauve
Jan 29, 2018
Browse files
Ignore configure events of 0×0px
parent
0e759c94
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/wl_window.c
View file @
f710db65
...
...
@@ -318,22 +318,25 @@ static void xdgToplevelHandleConfigure(void* data,
}
}
if
(
!
maximized
&&
!
fullscreen
)
if
(
width
!=
0
&&
height
!=
0
)
{
if
(
window
->
numer
!=
GLFW_DONT_CARE
&&
window
->
denom
!=
GLFW_DONT_CARE
)
if
(
!
maximized
&&
!
fullscreen
)
{
aspectRatio
=
(
float
)
width
/
(
float
)
height
;
targetRatio
=
(
float
)
window
->
numer
/
(
float
)
window
->
denom
;
if
(
aspectRatio
<
targetRatio
)
height
=
width
/
targetRatio
;
else
if
(
aspectRatio
>
targetRatio
)
width
=
height
*
targetRatio
;
if
(
window
->
numer
!=
GLFW_DONT_CARE
&&
window
->
denom
!=
GLFW_DONT_CARE
)
{
aspectRatio
=
(
float
)
width
/
(
float
)
height
;
targetRatio
=
(
float
)
window
->
numer
/
(
float
)
window
->
denom
;
if
(
aspectRatio
<
targetRatio
)
height
=
width
/
targetRatio
;
else
if
(
aspectRatio
>
targetRatio
)
width
=
height
*
targetRatio
;
}
}
}
_glfwInputWindowSize
(
window
,
width
,
height
);
_glfwPlatformSetWindowSize
(
window
,
width
,
height
);
_glfwInputWindowDamage
(
window
);
_glfwInputWindowSize
(
window
,
width
,
height
);
_glfwPlatformSetWindowSize
(
window
,
width
,
height
);
_glfwInputWindowDamage
(
window
);
}
if
(
!
activated
&&
window
->
autoIconify
)
_glfwPlatformIconifyWindow
(
window
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment