diff options
author | Daniel P. Berrangé <berrange@redhat.com> | 2019-01-10 12:00:45 +0000 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2019-01-21 09:43:13 +0100 |
commit | a8260d3876389eb52ca5c62ed4d80cdb7e025c85 (patch) | |
tree | acf70c8ec9214f7c7560c180fbbc531ad75c830d /ui/sdl2.c | |
parent | 681d61362d3f766a00806b89d6581869041f73cb (diff) |
ui: install logo icons to $prefix/share/icons
QEMU currently installs logos to $prefix/share/qemu/ which means no GUI
toolkit or applications can find them by default.
The accepted standards for desktop applications declare that application
logos / icons should be installed under $prefix/share/icons, so use this
directory location.
Pre-rendered icons are provided at the standard sizes expected for GUI
applications, along with the scalable SVG, to ensure maximum portability.
The PNGs are rendered from the SVG using inkscape, however, this is not
wired up into the default make rules to avoid requiring inkscape as a
mandatory tool in build systems / developer workstations.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-id: 20190110120047.25369-2-berrange@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui/sdl2.c')
-rw-r--r-- | ui/sdl2.c | 16 |
1 files changed, 6 insertions, 10 deletions
@@ -762,7 +762,6 @@ static void sdl2_display_early_init(DisplayOptions *o) static void sdl2_display_init(DisplayState *ds, DisplayOptions *o) { uint8_t data = 0; - char *filename; int i; SDL_SysWMinfo info; @@ -837,15 +836,12 @@ static void sdl2_display_init(DisplayState *ds, DisplayOptions *o) } /* Load a 32x32x4 image. White pixels are transparent. */ - filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, "qemu-icon.bmp"); - if (filename) { - SDL_Surface *image = SDL_LoadBMP(filename); - if (image) { - uint32_t colorkey = SDL_MapRGB(image->format, 255, 255, 255); - SDL_SetColorKey(image, SDL_TRUE, colorkey); - SDL_SetWindowIcon(sdl2_console[0].real_window, image); - } - g_free(filename); + SDL_Surface *image = SDL_LoadBMP(CONFIG_QEMU_ICONDIR + "/hicolor/32x32/apps/qemu.bmp"); + if (image) { + uint32_t colorkey = SDL_MapRGB(image->format, 255, 255, 255); + SDL_SetColorKey(image, SDL_TRUE, colorkey); + SDL_SetWindowIcon(sdl2_console[0].real_window, image); } gui_grab = 0; |