Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for XIconifyWindow and unminimizing from taskbars #1035

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/bspwm.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ motion_recorder_t motion_recorder;
xcb_atom_t WM_STATE;
xcb_atom_t WM_TAKE_FOCUS;
xcb_atom_t WM_DELETE_WINDOW;
xcb_atom_t WM_CHANGE_STATE;
int exit_status;

bool auto_raise;
Expand Down Expand Up @@ -399,6 +400,7 @@ void setup(void)
GETATOM(WM_STATE)
GETATOM(WM_DELETE_WINDOW)
GETATOM(WM_TAKE_FOCUS)
GETATOM(WM_CHANGE_STATE)
#undef GETATOM

const xcb_query_extension_reply_t *qep = xcb_get_extension_data(dpy, &xcb_randr_id);
Expand Down
1 change: 1 addition & 0 deletions src/bspwm.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ extern motion_recorder_t motion_recorder;
extern xcb_atom_t WM_STATE;
extern xcb_atom_t WM_TAKE_FOCUS;
extern xcb_atom_t WM_DELETE_WINDOW;
extern xcb_atom_t WM_CHANGE_STATE;
extern int exit_status;

extern bool auto_raise;
Expand Down
6 changes: 6 additions & 0 deletions src/events.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,8 @@ void client_message(xcb_generic_event_t *evt)
loc.node == mon->desk->focus) {
return;
}
set_hidden(loc.monitor, loc.desktop, loc.node, false);
arrange(loc.monitor, loc.desktop);
focus_node(loc.monitor, loc.desktop, loc.node);
} else if (e->type == ewmh->_NET_WM_DESKTOP) {
coordinates_t dloc;
Expand All @@ -337,6 +339,10 @@ void client_message(xcb_generic_event_t *evt)
}
} else if (e->type == ewmh->_NET_CLOSE_WINDOW) {
close_node(loc.node);
} else if (e->type == WM_CHANGE_STATE) {
set_hidden(loc.monitor, loc.desktop, loc.node,
e->data.data32[0] == XCB_ICCCM_WM_STATE_ICONIC || e->data.data32[0] == XCB_ICCCM_WM_STATE_WITHDRAWN);
arrange(loc.monitor, loc.desktop);
}
}

Expand Down