SDL window no title

I am trying to get a SDL2 program into a snap and got it running and opening a window but a small issue it has no title.

Window creation c++ code

  g_main_window = SDL_CreateWindow(
    "Program Window (512x284)",
    SDL_WINDOWPOS_CENTERED,
    SDL_WINDOWPOS_CENTERED,
    WINDOW_WIDTH,
    WINDOW_HEIGHT,
    SDL_WINDOW_OPENGL
  );

window outside snap

I have tried various plugs just copying vlc and warzone2100 hoping to hit something but no luck. Does anyone know what I am missing?

I added how it should look in original post here is how the snap looks (I can only add one image per post)

window inside snap

I have simplified the title program as much as I can so that I can be sure its something with snap

#include <SDL2/SDL.h>

int main() {
    SDL_Init(SDL_INIT_VIDEO);

    SDL_Window* w = SDL_CreateWindow(
        "Title",
        SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED,
        800, 600, 0);

    SDL_Event event;
    while(SDL_WaitEvent(&event))
        if(event.type == SDL_QUIT) break;

    SDL_DestroyWindow(w);
    SDL_Quit();
}```

I tried debugging snap and got a message

DBus access
Suggestion:
* try adding 'screen-inhibit-control' to 'plugs'

So I added it (im not sure why it needs dbus access) now there are no messages that look bad everything is allowed but its still not getting a title so my next area to look in is maybe something is different from the build library and the snap library but that seems odd