diff --git a/apps/background.c b/apps/background.c index 4290cef8..af37da12 100644 --- a/apps/background.c +++ b/apps/background.c @@ -12,6 +12,7 @@ */ #include #include +#include #include #include #include @@ -85,6 +86,11 @@ static void check_click(struct yutani_msg_window_mouse_event * evt) { } } +static void sig_usr2(int sig) { + yutani_set_stack(yctx, wallpaper_window, YUTANI_ZORDER_BOTTOM); + yutani_flip(yctx, wallpaper_window); +} + int main (int argc, char ** argv) { if (argc < 2 || strcmp(argv[1],"--really")) { @@ -97,6 +103,8 @@ int main (int argc, char ** argv) { return 1; } + signal(SIGUSR2, sig_usr2); + wallpaper = malloc(sizeof(sprite_t)); load_sprite(wallpaper, "/usr/share/wallpaper.bmp"); wallpaper->alpha = 0;