Fix systray rendering when compositor off
This commit is contained in:
@@ -359,13 +359,7 @@ void draw_launcher_icon(void *obj, cairo_t *c)
|
|||||||
|
|
||||||
// Render
|
// Render
|
||||||
imlib_context_set_image(launcherIcon->image);
|
imlib_context_set_image(launcherIcon->image);
|
||||||
if (server.real_transparency) {
|
render_image(launcherIcon->area.pix, 0, 0);
|
||||||
render_image(launcherIcon->area.pix, 0, 0);
|
|
||||||
} else {
|
|
||||||
imlib_context_set_blend(1);
|
|
||||||
imlib_context_set_drawable(launcherIcon->area.pix);
|
|
||||||
imlib_render_image_on_drawable(0, 0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Imlib_Image scale_icon(Imlib_Image original, int icon_size)
|
Imlib_Image scale_icon(Imlib_Image original, int icon_size)
|
||||||
|
|||||||
@@ -350,13 +350,7 @@ void draw_task_icon (Task *tsk, int text_width)
|
|||||||
|
|
||||||
// Render
|
// Render
|
||||||
imlib_context_set_image (tsk->icon[tsk->current_state]);
|
imlib_context_set_image (tsk->icon[tsk->current_state]);
|
||||||
if (server.real_transparency) {
|
render_image(tsk->area.pix, pos_x, panel->g_task.icon_posy);
|
||||||
render_image(tsk->area.pix, pos_x, panel->g_task.icon_posy);
|
|
||||||
} else {
|
|
||||||
imlib_context_set_blend(1);
|
|
||||||
imlib_context_set_drawable(tsk->area.pix);
|
|
||||||
imlib_render_image_on_drawable(pos_x, panel->g_task.icon_posy);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -404,6 +404,13 @@ int imageEmpty(DATA32* data, int w, int h)
|
|||||||
|
|
||||||
void render_image(Drawable d, int x, int y)
|
void render_image(Drawable d, int x, int y)
|
||||||
{
|
{
|
||||||
|
if (!server.real_transparency) {
|
||||||
|
imlib_context_set_blend(1);
|
||||||
|
imlib_context_set_drawable(d);
|
||||||
|
imlib_render_image_on_drawable(x, y);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
int w = imlib_image_get_width(), h = imlib_image_get_height();
|
int w = imlib_image_get_width(), h = imlib_image_get_height();
|
||||||
|
|
||||||
Pixmap pixmap = XCreatePixmap(server.dsp, server.root_win, w, h, 32);
|
Pixmap pixmap = XCreatePixmap(server.dsp, server.root_win, w, h, 32);
|
||||||
|
|||||||
Reference in New Issue
Block a user