Update WM_STATE on window map/unmap
Some wine apps expect WM_STATE to be updated when mapping/unmapping windows. Unless handled properly wine app would timeout while waiting for update state Fixes #302
This commit is contained in:
parent
1b918e29b4
commit
6abdbc81a2
1 changed files with 19 additions and 0 deletions
|
|
@ -414,6 +414,15 @@ impl XState {
|
||||||
self.handle_window_properties(server_state, e.window())
|
self.handle_window_properties(server_state, e.window())
|
||||||
);
|
);
|
||||||
server_state.map_window(e.window());
|
server_state.map_window(e.window());
|
||||||
|
unwrap_or_skip_bad_window_cont!(self.connection.send_and_check_request(
|
||||||
|
&x::ChangeProperty {
|
||||||
|
mode: x::PropMode::Replace,
|
||||||
|
window: e.window(),
|
||||||
|
property: self.atoms.wm_state,
|
||||||
|
r#type: self.atoms.wm_state,
|
||||||
|
data: &[WmState::Normal as u32, x::Window::none().resource_id()],
|
||||||
|
}
|
||||||
|
));
|
||||||
}
|
}
|
||||||
xcb::Event::X(x::Event::ConfigureNotify(e)) => {
|
xcb::Event::X(x::Event::ConfigureNotify(e)) => {
|
||||||
server_state.reconfigure_window(e);
|
server_state.reconfigure_window(e);
|
||||||
|
|
@ -445,6 +454,16 @@ impl XState {
|
||||||
value_list: &[x::Cw::EventMask(x::EventMask::empty())],
|
value_list: &[x::Cw::EventMask(x::EventMask::empty())],
|
||||||
}
|
}
|
||||||
));
|
));
|
||||||
|
|
||||||
|
unwrap_or_skip_bad_window_cont!(self.connection.send_and_check_request(
|
||||||
|
&x::ChangeProperty {
|
||||||
|
mode: x::PropMode::Replace,
|
||||||
|
window: e.window(),
|
||||||
|
property: self.atoms.wm_state,
|
||||||
|
r#type: self.atoms.wm_state,
|
||||||
|
data: &[WmState::Withdrawn as u32, x::Window::none().resource_id()],
|
||||||
|
}
|
||||||
|
));
|
||||||
}
|
}
|
||||||
xcb::Event::X(x::Event::DestroyNotify(e)) => {
|
xcb::Event::X(x::Event::DestroyNotify(e)) => {
|
||||||
debug!("destroying window {:?}", e.window());
|
debug!("destroying window {:?}", e.window());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue