View: honor fullscreen requests before map
This commit is contained in:
parent
e603c5460a
commit
096e175cec
@ -510,9 +510,7 @@ pub fn map(self: *Self) !void {
|
||||
|
||||
self.output.sendViewTags();
|
||||
|
||||
if (!self.current.float) self.output.arrangeViews();
|
||||
|
||||
server.root.startTransaction();
|
||||
self.applyPending();
|
||||
}
|
||||
|
||||
/// Called by the impl when the surface will no longer be displayed
|
||||
|
@ -216,15 +216,13 @@ fn handleMap(listener: *wl.Listener(void)) void {
|
||||
|
||||
if (self.xdg_toplevel.parent != null or has_fixed_size) {
|
||||
// If the self.xdg_toplevel has a parent or has a fixed size make it float
|
||||
view.current.float = true;
|
||||
view.pending.float = true;
|
||||
view.pending.box = view.float_box;
|
||||
} else if (server.config.shouldFloat(view)) {
|
||||
view.current.float = true;
|
||||
view.pending.float = true;
|
||||
view.pending.box = view.float_box;
|
||||
}
|
||||
|
||||
self.view.pending.fullscreen = self.xdg_toplevel.requested.fullscreen;
|
||||
|
||||
// If the view has an app_id or title which is not configured to use client
|
||||
// side decorations, inform it that it is tiled.
|
||||
if (server.config.csdAllowed(view)) {
|
||||
|
@ -43,7 +43,7 @@ xwayland_surface: *wlr.XwaylandSurface,
|
||||
/// The wlroots Xwayland implementation overwrites xwayland_surface.fullscreen
|
||||
/// immediately when the client requests it, so we track this state here to be
|
||||
/// able to match the XdgToplevel API.
|
||||
last_set_fullscreen_state: bool,
|
||||
last_set_fullscreen_state: bool = false,
|
||||
|
||||
// Listeners that are always active over the view's lifetime
|
||||
destroy: wl.Listener(*wlr.XwaylandSurface) = wl.Listener(*wlr.XwaylandSurface).init(handleDestroy),
|
||||
@ -71,7 +71,6 @@ pub fn create(output: *Output, xwayland_surface: *wlr.XwaylandSurface) error{Out
|
||||
view.init(output, .{ .xwayland_view = .{
|
||||
.view = view,
|
||||
.xwayland_surface = xwayland_surface,
|
||||
.last_set_fullscreen_state = xwayland_surface.fullscreen,
|
||||
} });
|
||||
|
||||
const self = &node.view.impl.xwayland_view;
|
||||
@ -225,15 +224,13 @@ pub fn handleMap(listener: *wl.Listener(*wlr.XwaylandSurface), xwayland_surface:
|
||||
|
||||
if (self.xwayland_surface.parent != null or has_fixed_size) {
|
||||
// If the toplevel has a parent or has a fixed size make it float
|
||||
view.current.float = true;
|
||||
view.pending.float = true;
|
||||
view.pending.box = view.float_box;
|
||||
} else if (server.config.shouldFloat(view)) {
|
||||
view.current.float = true;
|
||||
view.pending.float = true;
|
||||
view.pending.box = view.float_box;
|
||||
}
|
||||
|
||||
view.pending.fullscreen = xwayland_surface.fullscreen;
|
||||
|
||||
view.map() catch {
|
||||
log.err("out of memory", .{});
|
||||
surface.resource.getClient().postNoMemory();
|
||||
|
Loading…
Reference in New Issue
Block a user