if its a qt application then run in a console "QT_QPA_PLATFORM=xcb program_name", if it's a gtk application i think it's "GDK_BACKEND=x11" though I'm not entirely sure.
I have to do this with LMMS as on sway click and drag doesn't work for some odd reason