Simplify systray icon management (attempt to fix issue 480)
git-svn-id: http://tint2.googlecode.com/svn/trunk@751 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
This commit is contained in:
committed by
mrovi9000@gmail.com
parent
e49e05ad69
commit
eb1244a415
16
src/tint.c
16
src/tint.c
@@ -832,8 +832,9 @@ void event_configure_notify (Window win)
|
||||
traywin = (TrayWindow*)l->data;
|
||||
if (traywin->tray_id == win) {
|
||||
//printf("move tray %d\n", traywin->x);
|
||||
XMoveResizeWindow(server.dsp, traywin->id, traywin->x, traywin->y, traywin->width, traywin->height);
|
||||
XResizeWindow(server.dsp, traywin->tray_id, traywin->width, traywin->height);
|
||||
XResizeWindow(server.dsp, traywin->tray_id, traywin->width, traywin->width);
|
||||
traywin->ignore_remaps = 2;
|
||||
XReparentWindow(server.dsp, traywin->tray_id, ((Panel*)systray.area.panel)->main_win, traywin->x, traywin->y);
|
||||
panel_refresh = 1;
|
||||
return;
|
||||
}
|
||||
@@ -1264,7 +1265,11 @@ start:
|
||||
break;
|
||||
for (it = systray.list_icons; it; it = g_slist_next(it)) {
|
||||
if (((TrayWindow*)it->data)->tray_id == e.xany.window) {
|
||||
remove_icon((TrayWindow*)it->data);
|
||||
if (((TrayWindow*)it->data)->ignore_remaps > 0) {
|
||||
((TrayWindow*)it->data)->ignore_remaps--;
|
||||
} else {
|
||||
remove_icon((TrayWindow*)it->data);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1408,10 +1413,7 @@ start:
|
||||
XDamageNotifyEvent* de = &event_union.de;
|
||||
for (l = systray.list_icons; l ; l = l->next) {
|
||||
traywin = (TrayWindow*)l->data;
|
||||
if ( traywin->id == de->drawable ) {
|
||||
systray_render_icon(traywin);
|
||||
break;
|
||||
}
|
||||
systray_render_icon(traywin);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user