libsdl-org / SDL

Simple Directmedia Layer
https://libsdl.org
zlib License
8.7k stars 1.63k forks source link

Resizing Issue with SDL_WINDOW_BORDERLESS on Xorg [SDL3] #9942

Open Farouk123456 opened 1 month ago

Farouk123456 commented 1 month ago

Hello I’m learning vulkan and want to create a custom title bar, so I used SDL_WINDOW_BORDERLESS to remove decorations but then resizing got super glitchy i.e. image not updating for seconds I don’t think it’s an issue in swap chain recreation because if I turn on decoration everything works fine also if I run my code in Wayland it works as well its only when using borderless on x11 that I get glitches

here is my code https://pastebin.com/kJmqzVfM

I’m using SDL3 and HitTesting for my window Any help would be appreciated

Farouk123456 commented 1 month ago

The issue definitely seems to be in hittesting on X11 if i implement my own resizing it is buttery smooth Maybe i just implemented hittesting wrong ?

slouken commented 1 month ago

Can you provide a link to a full project, so we can build and run it here?

Farouk123456 commented 1 month ago

I already did its only that file in the pastebin link Just compile it with clang and it will work

Farouk123456 commented 4 weeks ago

Looked into the SDL code, seems like this should fix it https://github.com/libsdl-org/SDL/pull/7686

Farouk123456 commented 3 weeks ago

Implemented #7686 myself with vulkan IDK why the merger was saying that vulkan doesn't work with it because it works like a charm for anyone who is interested, here is my code:

Vulkan Engine.zip