michaelforney/swc

Unable to include the header to C++ projects

Closed this issue · 2 comments

This part is a huge pain

struct swc_window
{
    char * title;
    char * class;

    struct swc_window * parent;
};

Since a variable is named "class", g++ get's confused and cannot include the header.

error: expected unqialified-id before 'class'
    char * class;
              ^

Changing the variable name however might break compability with other projects based on swc, so what should we do?
If you're ok with a variable name change, i could do the dull work of changing the variable names in the source code and make a pull request if you want.

I would suggest changing it to "app_id" to match the xdg_shell protocol. The API isn't finalized yet, so feel free to send me a pull request.

I have a patch available on my testing wm which fixes this.
Since #21 still isn't fixed i can't try it out on the newest commit, but it works just fine for me on commit a33ff2c