This was working fine with 3.2. I updated to 3.4 to get the UIScene fix so my app can run on iOS 27.1. This resulted in a blizzard of new dependencies on Linux many of which were X11 things. Getting bored with trying to fix these, and knowing Wayland is now the default, I changed the manifest as below to omit the “x11” feature.
With this the app built successfully but when I ran it, it appeared in a large window, almost filling the screen, without any window decorations (title bar, borders, etc). It crashed almost immediately. It’s a Vulkan app and turning on validation told me that it was trying to create a swapchain of UINT_MAX width and height, clearly the result of not being a proper window and hence the crash.
I reverted back the original manifest and installed the missing X11 dependencies so the app would build. Now everything works.
Do I have to do something special in the app when creating a Wayland window?
libdecor is used for window decoration under Wayland. Could your issues be related to that? I don’t think it should crash without it though so maybe there is some other problem.
libdecor is installed. I tried SDL_VIDEO_WAYLAND_ALLOW_LIBDECOR=1 on the command line before my app, even though SDL’s documentation says that is the default. It did not help.
I found that, with Wayland, when called from a resize event, the surface_properties.currentExtent width and height of the current Vulkan surface are UINT32_MAX. My code was using these values to resize the swapchain, leading to the crash.
(It does this because the same code is called when VK_ERROR_OUT_OF_DATE_KHR or VK_SUBOPTIMAL_KHR errors are received during presentation and the swapchain must be recreated. It works on iOS, macOS and when using an X window on Ubuntu. Driver is Intel open-source Mesa. Not tested on Windows.)
I changed the code to use the sizes received from the event, if the currentExtent is UINT32_MAX. This has stopped the crash. However I am getting a window that fills the entire client space (I don’t know the correct name), that is the window occupies the entire screen other than the spaces used by the taskbar(?), the bar at the top, and the left-hand side bar with the app icons. There is still no window title bar or borders
The same issue happens with my OpenGL 3 app which points the finger at either SDL or Ubuntu or Gnome Desktop. Other apps all have window decorations.
I have also found that when started on the primary screen (laptop screen) the app receives a resize event telling it to resize to be maximized as I wrote before. If I click on another app’s icon, that app and the desktop appear and my app is stowed to an icon. When I click the icon to restore it, it receives a resize event telling it to resize the the size I specified in the app. But again no decorations so I can resize or drag or quit the application.
At both resize events the current surface’s currentExtent is UINT32_MAX x UINT32_MAX. Most peculiar.
If I start the app on the secondary, much larger, screen then it appears at the size requested by the app and no resize events are received.