reverted my last checkin, because I forgot that XCopyArea only works if src.depth == dest.depth
minor bugfix if in hidden mode a new tray icon appears git-svn-id: http://tint2.googlecode.com/svn/trunk@360 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
This commit is contained in:
parent
5b645eeffb
commit
0e0ae86bfa
3 changed files with 9 additions and 7 deletions
|
@ -748,6 +748,7 @@ void autohide_show(void* p)
|
||||||
else
|
else
|
||||||
XMoveResizeWindow(server.dsp, panel->main_win, panel->posx, panel->posy, panel->area.width, panel->area.height);
|
XMoveResizeWindow(server.dsp, panel->main_win, panel->posx, panel->posy, panel->area.width, panel->area.height);
|
||||||
}
|
}
|
||||||
|
refresh_systray = 1; // ugly hack, because we actually only need to call XSetBackgroundPixmap
|
||||||
panel_refresh = 1;
|
panel_refresh = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -434,10 +434,10 @@ gboolean add_icon(Window id)
|
||||||
}
|
}
|
||||||
|
|
||||||
// show the window
|
// show the window
|
||||||
if (!traywin->hide) {
|
if (!traywin->hide)
|
||||||
XMapRaised(server.dsp, traywin->tray_id);
|
XMapRaised(server.dsp, traywin->tray_id);
|
||||||
|
if (!traywin->hide && !panel->is_hidden)
|
||||||
XMapRaised(server.dsp, traywin->id);
|
XMapRaised(server.dsp, traywin->id);
|
||||||
}
|
|
||||||
|
|
||||||
// changed in systray force resize on panel
|
// changed in systray force resize on panel
|
||||||
panel->area.resize = 1;
|
panel->area.resize = 1;
|
||||||
|
@ -553,7 +553,6 @@ void systray_render_icon(TrayWindow* traywin)
|
||||||
|
|
||||||
void refresh_systray_icon()
|
void refresh_systray_icon()
|
||||||
{
|
{
|
||||||
Panel* panel = systray.area.panel;
|
|
||||||
TrayWindow *traywin;
|
TrayWindow *traywin;
|
||||||
GSList *l;
|
GSList *l;
|
||||||
for (l = systray.list_icons; l ; l = l->next) {
|
for (l = systray.list_icons; l ; l = l->next) {
|
||||||
|
@ -562,10 +561,13 @@ void refresh_systray_icon()
|
||||||
if (real_transparency || systray.alpha != 100 || systray.brightness != 0 || systray.saturation != 0)
|
if (real_transparency || systray.alpha != 100 || systray.brightness != 0 || systray.saturation != 0)
|
||||||
systray_render_icon(traywin);
|
systray_render_icon(traywin);
|
||||||
else {
|
else {
|
||||||
Pixmap pix = XCreatePixmap(server.dsp, server.root_win, traywin->width, traywin->height, server.depth);
|
// comment by andreas: I'm still not sure, what exactly we need to do here... Somehow trayicons which do not
|
||||||
XCopyArea(server.dsp, panel->temp_pmap, pix, server.gc, traywin->x, traywin->y, traywin->width, traywin->height, 0, 0);
|
// offer the same depth as tint2 does, need to draw a background pixmap, but this cannot be done with
|
||||||
|
// XCopyArea... So we actually need XRenderComposite???
|
||||||
|
// Pixmap pix = XCreatePixmap(server.dsp, server.root_win, traywin->width, traywin->height, server.depth);
|
||||||
|
// XCopyArea(server.dsp, panel->temp_pmap, pix, server.gc, traywin->x, traywin->y, traywin->width, traywin->height, 0, 0);
|
||||||
|
// XSetWindowBackgroundPixmap(server.dsp, traywin->id, pix);
|
||||||
XClearArea(server.dsp, traywin->tray_id, 0, 0, traywin->width, traywin->height, True);
|
XClearArea(server.dsp, traywin->tray_id, 0, 0, traywin->width, traywin->height, True);
|
||||||
XSetWindowBackgroundPixmap(server.dsp, traywin->id, pix);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -703,7 +703,6 @@ int main (int argc, char *argv[])
|
||||||
panel = (Panel*)systray.area.panel;
|
panel = (Panel*)systray.area.panel;
|
||||||
if (refresh_systray && !panel->is_hidden) {
|
if (refresh_systray && !panel->is_hidden) {
|
||||||
refresh_systray = 0;
|
refresh_systray = 0;
|
||||||
panel = (Panel*)systray.area.panel;
|
|
||||||
// tint2 doen't draw systray icons. it just redraw background.
|
// tint2 doen't draw systray icons. it just redraw background.
|
||||||
XSetWindowBackgroundPixmap (server.dsp, panel->main_win, panel->temp_pmap);
|
XSetWindowBackgroundPixmap (server.dsp, panel->main_win, panel->temp_pmap);
|
||||||
// force icon's refresh
|
// force icon's refresh
|
||||||
|
|
Loading…
Reference in a new issue