Fixing long standing issue with tray space when tray icon gets destroyed.

When tray icon gets destroyed, space it was occupying would not be cleaned, yielding wholes inside taskbar. Fixing by explicitly hiding and deleting FLTK window which holded application tray window.
This commit is contained in:
Sanel Zukan 2012-12-20 01:50:00 +00:00
parent eed00b3fbc
commit 3df8f4ed7e
2 changed files with 8 additions and 2 deletions

View File

@ -205,7 +205,8 @@ void Tray::add_to_tray(Fl_Widget *win) {
w(w() + win->w() + TRAY_ICONS_SPACE); w(w() + win->w() + TRAY_ICONS_SPACE);
distribute_children(); distribute_children();
redraw();
//redraw();
EDE_PANEL_GET_PANEL_OBJECT(this)->relayout(); EDE_PANEL_GET_PANEL_OBJECT(this)->relayout();
} }
@ -213,10 +214,13 @@ void Tray::remove_from_tray(Fl_Widget *win) {
remove(win); remove(win);
w(w() - win->w() - TRAY_ICONS_SPACE); w(w() - win->w() - TRAY_ICONS_SPACE);
win->hide();
delete win;
distribute_children(); distribute_children();
redraw();
EDE_PANEL_GET_PANEL_OBJECT(this)->relayout(); EDE_PANEL_GET_PANEL_OBJECT(this)->relayout();
EDE_PANEL_GET_PANEL_OBJECT(this)->redraw();
} }
int Tray::handle(int e) { int Tray::handle(int e) {

View File

@ -186,6 +186,8 @@ void Taskbar::update_task_buttons(void) {
XSelectInput(fl_display, wins[i], PropertyChangeMask | StructureNotifyMask); XSelectInput(fl_display, wins[i], PropertyChangeMask | StructureNotifyMask);
b->callback((Fl_Callback*)button_cb, this); b->callback((Fl_Callback*)button_cb, this);
add(b); add(b);
need_full_redraw = true;
} }
} }