mirror of
https://github.com/edeproject/ede.git
synced 2023-08-10 21:13:03 +03:00
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:
parent
eed00b3fbc
commit
3df8f4ed7e
@ -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) {
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user