Looks like sawfish likes WM_WINDOW_STATE_ICONIC more than NETWM_STATE_HIDDEN.

This commit is contained in:
Sanel Zukan 2012-12-17 22:26:55 +00:00
parent fc4474f1c7
commit a3f2a79d5f
2 changed files with 6 additions and 6 deletions

View File

@ -48,9 +48,10 @@ EDELIB_NS_USING(netwm_window_get_title)
EDELIB_NS_USING(netwm_window_get_icon)
EDELIB_NS_USING(netwm_window_set_state)
EDELIB_NS_USING(NETWM_STATE_ACTION_TOGGLE)
EDELIB_NS_USING(NETWM_STATE_ACTION_ADD)
EDELIB_NS_USING(NETWM_STATE_MAXIMIZED)
EDELIB_NS_USING(NETWM_STATE_HIDDEN)
EDELIB_NS_USING(wm_window_set_state)
EDELIB_NS_USING(WM_WINDOW_STATE_ICONIC)
static Fl_Pixmap image_window(window_xpm);
@ -89,8 +90,8 @@ static void restore_cb(Fl_Widget*, void *b) {
static void minimize_cb(Fl_Widget*, void *b) {
TaskButton *bb = (TaskButton*)b;
netwm_window_set_state(bb->get_window_xid(), NETWM_STATE_HIDDEN, NETWM_STATE_ACTION_ADD);
redraw_whole_panel(bb);
/* WM_WINDOW_STATE_ICONIC is safer on other window managers than NETWM_STATE_HIDDEN */
wm_window_set_state(bb->get_window_xid(), WM_WINDOW_STATE_ICONIC);
}
static void maximize_cb(Fl_Widget*, void *b) {

View File

@ -269,9 +269,8 @@ void Taskbar::activate_window(TaskButton *b) {
/* active or restore minimized */
netwm_window_set_active(xid, 1);
update_active_button(xid);
update_active_button(false, xid);
/* TODO: use stack for this (case when this can't handle: minimize three window, out of four on the workspace) */
prev_active = curr_active;
curr_active = b;
}