Fix bad interaction between freespace and systray
This commit is contained in:
parent
e8869b4d87
commit
481c409617
3 changed files with 10 additions and 6 deletions
|
@ -204,7 +204,7 @@ void init_panel()
|
|||
}
|
||||
if (panel_items_order[k] == 'C')
|
||||
init_clock_panel(p);
|
||||
if (panel_items_order[k] == 'F')
|
||||
if (panel_items_order[k] == 'F' && !strstr(panel_items_order, "T"))
|
||||
init_freespace_panel(p);
|
||||
}
|
||||
set_panel_items_order(p);
|
||||
|
@ -420,7 +420,7 @@ int resize_panel(void *obj)
|
|||
}
|
||||
}
|
||||
if (panel->freespace.area.on_screen)
|
||||
panel->freespace.area.resize = 1;
|
||||
resize_freespace(&panel->freespace);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -224,7 +224,9 @@ void on_change_systray (void *obj)
|
|||
|
||||
// position and size the icon window
|
||||
XMoveResizeWindow(server.dsp, traywin->parent, traywin->x, traywin->y, traywin->width, traywin->height);
|
||||
XMoveResizeWindow(server.dsp, traywin->win, 0, 0, traywin->width, traywin->height);
|
||||
if (traywin->reparented) {
|
||||
XMoveResizeWindow(server.dsp, traywin->win, 0, 0, traywin->width, traywin->height);
|
||||
}
|
||||
}
|
||||
refresh_systray = 1;
|
||||
}
|
||||
|
@ -478,6 +480,7 @@ gboolean add_icon(Window win)
|
|||
|
||||
// Resize and redraw the systray
|
||||
systray.area.resize = 1;
|
||||
systray.area.redraw = 1;
|
||||
panel_refresh = 1;
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -496,7 +499,7 @@ gboolean reparent_icon(TrayWindow *traywin)
|
|||
XSync(server.dsp, False);
|
||||
XSetErrorHandler(old);
|
||||
if (error != FALSE) {
|
||||
printf("systray %d: cannot embed icon for window %lu pid %d\n", __LINE__, traywin->win, traywin->pid);
|
||||
printf("systray %d: cannot embed icon for window %lu parent %lu pid %d\n", __LINE__, traywin->win, traywin->parent, traywin->pid);
|
||||
remove_icon(traywin);
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -574,7 +577,7 @@ void remove_icon(TrayWindow *traywin)
|
|||
|
||||
// remove from our list
|
||||
systray.list_icons = g_slist_remove(systray.list_icons, traywin);
|
||||
//printf("remove_icon: %d\n", traywin->win);
|
||||
printf("remove_icon: %lu\n", traywin->win);
|
||||
|
||||
XSelectInput(server.dsp, traywin->win, NoEventMask);
|
||||
if (traywin->damage)
|
||||
|
|
|
@ -833,7 +833,8 @@ void event_configure_notify (Window win)
|
|||
if (traywin->win == win) {
|
||||
//printf("move tray %d\n", traywin->x);
|
||||
XMoveResizeWindow(server.dsp, traywin->parent, traywin->x, traywin->y, traywin->width, traywin->height);
|
||||
XMoveResizeWindow(server.dsp, traywin->win, 0, 0, traywin->width, traywin->height);
|
||||
if (traywin->reparented)
|
||||
XMoveResizeWindow(server.dsp, traywin->win, 0, 0, traywin->width, traywin->height);
|
||||
panel_refresh = 1;
|
||||
refresh_systray = 1;
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue