vxfw: use correct root window size
We previously passed the root window to the root surface, however the root surface could actually be smaller than the root window. This can lead to confusing rendering because it was possible for children to be rendered outside of their parent
This commit is contained in:
parent
ca4d0b6491
commit
f6871e3959
1 changed files with 5 additions and 1 deletions
|
@ -165,7 +165,11 @@ pub fn run(self: *App, widget: vxfw.Widget, opts: Options) anyerror!void {
|
|||
const surface = try widget.draw(draw_context);
|
||||
|
||||
const focused = self.wants_focus orelse focus_handler.focused.widget;
|
||||
surface.render(win, focused);
|
||||
const root_win = win.child(.{
|
||||
.width = surface.size.width,
|
||||
.height = surface.size.height,
|
||||
});
|
||||
surface.render(root_win, focused);
|
||||
try vx.render(buffered.writer().any());
|
||||
try buffered.flush();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue