# linux: fix getting the initial content size \(\#7604\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/2b383b854a034444039fa88b4a5e2845e45c4468)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 2b383b854a034444039fa88b4a5e2845e45c4468

Requested commit: 2b383b854a034444039fa88b4a5e2845e45c4468

Commit: 2b383b854a034444039fa88b4a5e2845e45c4468

Tree: 650f0e024d8630b55ac5f06165b85e6a4ea4b293

Author: Dzmitry Malyshau

Committer: GitHub

## Message

````
linux: fix getting the initial content size (#7604)

Fix found by @h3mosphere (thanks!)

Solves the Vulkan validation on start on some platforms about the
mismatched surface size, e.g.
```
VUID-VkSwapchainCreateInfoKHR-imageExtent-01274(ERROR / SPEC): msgNum: 2094043421 - Validation Error: [ VUID-VkSwapchainCreateInfoKHR-imageExtent-01274 ] Object 0: handle = 0x55dff99554c0, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x7cd0911d | vkCreateSwapchainKHR() called with imageExtent = (1920,1080), which is outside the bounds returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR(): currentExtent = (1920,1016), minImageExtent = (1920,1016), maxImageExtent = (1920,1016). The Vulkan spec states: imageExtent must be between minImageExtent and maxImageExtent, inclusive, where minImageExtent and maxImageExtent are members of the VkSurfaceCapabilitiesKHR structure returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkSwapchainCreateInfoKHR-imageExtent-01274)
```

Release Notes:
- N/A

Co-authored-by: Mikayla Maki <mikayla@zed.dev>
````

## Parents

- [862a9512b596a015c01b712409934b2e0721192a](https://git.cafe/gitcafe/zed/commit/862a9512b596a015c01b712409934b2e0721192a?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/2b383b854a034444039fa88b4a5e2845e45c4468?format=markdown)
