{{newin|[[0.9.0]]|090|type=callback}}
Called when the window is resized, for example if the user resizes the window, or if <code>love.window.setMode</code> is called with an unsupported width or height in fullscreen and the window chooses the closest appropriate size.
== Function ==
=== Synopsis ===
<source lang="lua">
love.resize( w, h )
</source>
=== Arguments ===
{{param|number|w|The new width.}}
{{param|number|h|The new height.}}
=== Returns ===
Nothing.
== Notes ==
Calls to <code>love.window.setMode</code> will '''only''' trigger this event if the width or height of the window after the call doesn't match the requested width and height. This can happen if a fullscreen mode is requested which doesn't match any supported mode, or if the fullscreen type is [[FullscreenType|'desktop']] and the requested width or height don't match the desktop resolution.

Since [[11.0]], this function returns width and height in DPI-scaled units rather than pixels.
== Example ==
<source lang="lua">
function love.resize(w, h)
  print(("Window resized to width: %d and height: %d."):format(w, h))
end
</source>
== See Also ==
* [[parent::love]]
* [[love.window.setMode]]
* [[love.window.setFullscreen]]
* [[love.conf]]
[[Category:Callbacks]]
{{#set:Description=Called when the window is resized.}}
{{#set:Subcategory=Window}}
== Other Languages ==
{{i18n|love.resize}}