Issues

Issue #22 resolved

Set the Window Icon

Sean Donnellan
created an issue

This is a feature request for a way to set the icon on the window.

I propose love.graphics.setIcon( image )

Like SDL_WM_SetIcon in SDL.

Reason for it is makes identifying your LOVE game in Task Switcher (Alt+Tab) easier and nicer.

Comments (6)

  1. Sean Donnellan reporter

    I managed to get some time today to have a look at trying to do it myself.

    I was however not able to get it fully working, ran into some problems with the typing. Incorrect parameter type: expected userdata.

    I am sure that Creating a surface, setting an icon and then freeing the surface again is fine as the SetIcon will copy the image data, meaning it is safe to free as it is not being used. For X11, the SetIcon function will XCreatePixmap and so forth thus duplication image data and the data is copied acorss. Similarly Windows does a similar thing CreateIconFromResourceEx, so that data stored b in the surface is not accessed by the WM after the SetIcon function call.

    Sorry, for not being able to produce a fully working patch, but at the least I hope this can help as a base.

  2. Log in to comment