systray: Separate reparenting from embedding
This commit is contained in:
12
src/tint.c
12
src/tint.c
@@ -1287,12 +1287,24 @@ start:
|
||||
break;
|
||||
|
||||
case ReparentNotify:
|
||||
fprintf(stderr, "ReparentNotify\n");
|
||||
if (!systray_enabled)
|
||||
break;
|
||||
panel = (Panel*)systray.area.panel;
|
||||
if (e.xany.window == panel->main_win) // reparented to us
|
||||
break;
|
||||
// FIXME: 'reparent to us' badly detected => disabled
|
||||
for (it = systray.list_icons; it; it = g_slist_next(it)) {
|
||||
TrayWindow *traywin = (TrayWindow*)it->data;
|
||||
if (traywin->win == e.xreparent.window) {
|
||||
fprintf(stderr, "win\n");
|
||||
if (traywin->parent == e.xreparent.parent) {
|
||||
fprintf(stderr, "parent\n");
|
||||
embed_icon(traywin);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case UnmapNotify:
|
||||
case DestroyNotify:
|
||||
|
||||
Reference in New Issue
Block a user