I'm currently developing a game with SDL2 in C++ and I want to set my game's icon for the task bar and for the Alt-Tab switcher. I am trying to achieve this by using SDL_SetWindowIcon():
SDL_Surface* icon = IMG_Load("icon.png");
SDL_SetWindowIcon(sdlWindow, icon);
Even if my window is correctly initialized and the surface is loaded, the icon does not appear in the task bar or in the Alt-Tab switcher. I am on Ubuntu 16.04 LTS.
Does anyone know what I'm doing wrong?