1
0
Fork 0
forked from wry/wry

xwayland: fix mapping of windows whose size is already correct at map time

IntelliJ in particular opens new windows with the exact same size as the
existing window. In a mono layout, this is the resulting window size.
For some reason, IntelliJ will not draw itself properly if it doesn't
get resized after mapping. So send a dummy 1x1 configure at map time.
This commit is contained in:
Julian Orth 2022-05-07 00:11:08 +02:00
parent 5e21e00059
commit cc090b1d0f
2 changed files with 50 additions and 36 deletions

View file

@ -198,17 +198,19 @@ pub enum Change {
impl Xwindow {
pub fn new(data: &Rc<XwindowData>, surface: &Rc<WlSurface>) -> Self {
let tld = ToplevelData::new(
&data.state,
data.info.title.borrow_mut().clone().unwrap_or_default(),
Some(surface.client.clone()),
);
tld.pos.set(surface.extents.get());
Self {
id: data.state.node_ids.next(),
seat_state: Default::default(),
data: data.clone(),
surface: surface.clone(),
display_link: Default::default(),
toplevel_data: ToplevelData::new(
&data.state,
data.info.title.borrow_mut().clone().unwrap_or_default(),
Some(surface.client.clone()),
),
toplevel_data: tld,
}
}