at 1 you are doing forward declaration.
you declare the interface of a function in the header file. that way the compiler would know that function swap
exists and it takes two int pointers but returns nothing.
from the outside of that module that’s all it needs to know. it can compile them separately and link them together later dynamically.
you’re separating swap interface in the header file from its implementation in the .c file that contains the body of the function.
In case this is a compositor issue, there is a keybind on KDE that lets you toggle it off. Easier than switching it in the settings every time.