From 03e8da669ce97f08f67d6782e89eae3ca01a376e Mon Sep 17 00:00:00 2001 From: Isaac Freund Date: Mon, 30 May 2022 01:08:09 +0200 Subject: Xwayland: Rename XwaylandUnmanaged to XwaylandOverrideRedirect --- river/Cursor.zig | 24 +++--- river/Root.zig | 10 +-- river/Seat.zig | 14 ++-- river/Server.zig | 4 +- river/XwaylandOverrideRedirect.zig | 155 ++++++++++++++++++++++++++++++++++++ river/XwaylandUnmanaged.zig | 156 ------------------------------------- river/XwaylandView.zig | 8 +- river/render.zig | 10 +-- 8 files changed, 190 insertions(+), 191 deletions(-) create mode 100644 river/XwaylandOverrideRedirect.zig delete mode 100644 river/XwaylandUnmanaged.zig diff --git a/river/Cursor.zig b/river/Cursor.zig index ee47992..d02a2bd 100644 --- a/river/Cursor.zig +++ b/river/Cursor.zig @@ -37,7 +37,7 @@ const Output = @import("Output.zig"); const Seat = @import("Seat.zig"); const View = @import("View.zig"); const ViewStack = @import("view_stack.zig").ViewStack; -const XwaylandUnmanaged = @import("XwaylandUnmanaged.zig"); +const XwaylandOverrideRedirect = @import("XwaylandOverrideRedirect.zig"); const Mode = union(enum) { passthrough: void, @@ -315,9 +315,9 @@ fn handleButton(listener: *wl.Listener(*wlr.Pointer.event.Button), event: *wlr.P self.seat.focus(null); } }, - .xwayland_unmanaged => |xwayland_unmanaged| { + .xwayland_override_redirect => |override_redirect| { if (build_options.xwayland) { - self.seat.setFocusRaw(.{ .xwayland_unmanaged = xwayland_unmanaged }); + self.seat.setFocusRaw(.{ .xwayland_override_redirect = override_redirect }); } else { unreachable; } @@ -537,7 +537,7 @@ const SurfaceAtResult = struct { parent: union(enum) { view: *View, layer_surface: *LayerSurface, - xwayland_unmanaged: if (build_options.xwayland) *XwaylandUnmanaged else void, + xwayland_override_redirect: if (build_options.xwayland) *XwaylandOverrideRedirect else void, }, }; @@ -565,21 +565,21 @@ pub fn surfaceAt(self: Self) ?SurfaceAtResult { // // fullscreen: // 1. overlay layer toplevels and popups - // 2. xwayland unmanaged stuff + // 2. xwayland override redirect windows // 3. fullscreen view toplevels and popups // // non-fullscreen: // 1. overlay layer toplevels and popups // 2. top, bottom, background layer popups // 3. top layer toplevels - // 4. xwayland unmanaged stuff + // 4. xwayland override redirect windows // 5. view toplevels and popups // 6. bottom, background layer toplevels if (layerSurfaceAt(output.getLayer(.overlay).*, ox, oy)) |s| return s; if (fullscreen_view) |view| { - if (build_options.xwayland) if (xwaylandUnmanagedSurfaceAt(lx, ly)) |s| return s; + if (build_options.xwayland) if (xwaylandOverrideRedirectSurfaceAt(lx, ly)) |s| return s; var sx: f64 = undefined; var sy: f64 = undefined; if (view.surfaceAt(ox, oy, &sx, &sy)) |found| { @@ -597,7 +597,7 @@ pub fn surfaceAt(self: Self) ?SurfaceAtResult { if (layerSurfaceAt(output.getLayer(.top).*, ox, oy)) |s| return s; - if (build_options.xwayland) if (xwaylandUnmanagedSurfaceAt(lx, ly)) |s| return s; + if (build_options.xwayland) if (xwaylandOverrideRedirectSurfaceAt(lx, ly)) |s| return s; if (viewSurfaceAt(output, ox, oy)) |s| return s; @@ -721,8 +721,8 @@ fn viewSurfaceAt(output: *const Output, ox: f64, oy: f64) ?SurfaceAtResult { return null; } -fn xwaylandUnmanagedSurfaceAt(lx: f64, ly: f64) ?SurfaceAtResult { - var it = server.root.xwayland_unmanaged_views.first; +fn xwaylandOverrideRedirectSurfaceAt(lx: f64, ly: f64) ?SurfaceAtResult { + var it = server.root.xwayland_override_redirect_views.first; while (it) |node| : (it = node.next) { const xwayland_surface = node.data.xwayland_surface; var sx: f64 = undefined; @@ -737,7 +737,7 @@ fn xwaylandUnmanagedSurfaceAt(lx: f64, ly: f64) ?SurfaceAtResult { .surface = found, .sx = sx, .sy = sy, - .parent = .{ .xwayland_unmanaged = &node.data }, + .parent = .{ .xwayland_override_redirect = &node.data }, }; } } @@ -912,7 +912,7 @@ pub fn checkFocusFollowsCursor(self: *Self) void { } }, .layer_surface => {}, - .xwayland_unmanaged => assert(build_options.xwayland), + .xwayland_override_redirect => assert(build_options.xwayland), } } } diff --git a/river/Root.zig b/river/Root.zig index 7175a33..90e03de 100644 --- a/river/Root.zig +++ b/river/Root.zig @@ -28,7 +28,7 @@ const util = @import("util.zig"); const Output = @import("Output.zig"); const View = @import("View.zig"); const ViewStack = @import("view_stack.zig").ViewStack; -const XwaylandUnmanaged = @import("XwaylandUnmanaged.zig"); +const XwaylandOverrideRedirect = @import("XwaylandOverrideRedirect.zig"); const DragIcon = @import("DragIcon.zig"); new_output: wl.Listener(*wlr.Output) = wl.Listener(*wlr.Output).init(handleNewOutput), @@ -58,10 +58,10 @@ noop_output: Output = undefined, drag_icons: std.SinglyLinkedList(DragIcon) = .{}, -/// This list stores all unmanaged Xwayland windows. This needs to be in root -/// since X is like the wild west and who knows where these things will go. -xwayland_unmanaged_views: if (build_options.xwayland) - std.TailQueue(XwaylandUnmanaged) +/// This list stores all "override redirect" Xwayland windows. This needs to be in root +/// since X is like the wild west and who knows where these things will place themselves. +xwayland_override_redirect_views: if (build_options.xwayland) + std.TailQueue(XwaylandOverrideRedirect) else void = if (build_options.xwayland) .{}, diff --git a/river/Seat.zig b/river/Seat.zig index 54cd853..7fd16d3 100644 --- a/river/Seat.zig +++ b/river/Seat.zig @@ -39,14 +39,14 @@ const Output = @import("Output.zig"); const SeatStatus = @import("SeatStatus.zig"); const View = @import("View.zig"); const ViewStack = @import("view_stack.zig").ViewStack; -const XwaylandUnmanaged = @import("XwaylandUnmanaged.zig"); +const XwaylandOverrideRedirect = @import("XwaylandOverrideRedirect.zig"); const log = std.log.scoped(.seat); const PointerConstraint = @import("PointerConstraint.zig"); const FocusTarget = union(enum) { view: *View, - xwayland_unmanaged: *XwaylandUnmanaged, + xwayland_override_redirect: *XwaylandOverrideRedirect, layer: *LayerSurface, none: void, }; @@ -210,7 +210,7 @@ fn pendingFilter(view: *View, filter_tags: u32) bool { /// Switch focus to the target, handling unfocus and input inhibition /// properly. This should only be called directly if dealing with layers or -/// unmanaged xwayland views. +/// override redirect xwayland views. pub fn setFocusRaw(self: *Self, new_focus: FocusTarget) void { // If the target is already focused, do nothing if (std.meta.eql(new_focus, self.focused)) return; @@ -218,9 +218,9 @@ pub fn setFocusRaw(self: *Self, new_focus: FocusTarget) void { // Obtain the target surface const target_surface = switch (new_focus) { .view => |target_view| target_view.surface.?, - .xwayland_unmanaged => |target_xwayland_unmanaged| blk: { + .xwayland_override_redirect => |target_override_redirect| blk: { assert(build_options.xwayland); - break :blk target_xwayland_unmanaged.xwayland_surface.surface; + break :blk target_override_redirect.xwayland_surface.surface; }, .layer => |target_layer| target_layer.wlr_layer_surface.surface, .none => null, @@ -236,7 +236,7 @@ pub fn setFocusRaw(self: *Self, new_focus: FocusTarget) void { view.pending.focus -= 1; if (view.pending.focus == 0) view.setActivated(false); }, - .xwayland_unmanaged, .layer, .none => {}, + .xwayland_override_redirect, .layer, .none => {}, } // Set the new focus @@ -248,7 +248,7 @@ pub fn setFocusRaw(self: *Self, new_focus: FocusTarget) void { target_view.pending.urgent = false; }, .layer => |target_layer| assert(self.focused_output == target_layer.output), - .xwayland_unmanaged, .none => {}, + .xwayland_override_redirect, .none => {}, } self.focused = new_focus; diff --git a/river/Server.zig b/river/Server.zig index 8609554..09595a2 100644 --- a/river/Server.zig +++ b/river/Server.zig @@ -34,7 +34,7 @@ const Output = @import("Output.zig"); const Root = @import("Root.zig"); const StatusManager = @import("StatusManager.zig"); const XdgToplevel = @import("XdgToplevel.zig"); -const XwaylandUnmanaged = @import("XwaylandUnmanaged.zig"); +const XwaylandOverrideRedirect = @import("XwaylandOverrideRedirect.zig"); const XwaylandView = @import("XwaylandView.zig"); const IdleInhibitorManager = @import("IdleInhibitorManager.zig"); @@ -247,7 +247,7 @@ fn handleNewXwaylandSurface(listener: *wl.Listener(*wlr.XwaylandSurface), xwayla ); if (xwayland_surface.override_redirect) { - _ = XwaylandUnmanaged.create(xwayland_surface) catch { + _ = XwaylandOverrideRedirect.create(xwayland_surface) catch { log.err("out of memory", .{}); return; }; diff --git a/river/XwaylandOverrideRedirect.zig b/river/XwaylandOverrideRedirect.zig new file mode 100644 index 0000000..a6916ec --- /dev/null +++ b/river/XwaylandOverrideRedirect.zig @@ -0,0 +1,155 @@ +// This file is part of river, a dynamic tiling wayland compositor. +// +// Copyright 2020 The River Developers +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, version 3. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +const Self = @This(); + +const std = @import("std"); +const assert = std.debug.assert; + +const wlr = @import("wlroots"); +const wl = @import("wayland").server.wl; + +const server = &@import("main.zig").server; +const util = @import("util.zig"); + +const Box = @import("Box.zig"); +const View = @import("View.zig"); +const XwaylandView = @import("XwaylandView.zig"); +const ViewStack = @import("view_stack.zig").ViewStack; + +const log = std.log.scoped(.xwayland); + +/// The corresponding wlroots object +xwayland_surface: *wlr.XwaylandSurface, + +// Listeners that are always active over the view's lifetime +request_configure: wl.Listener(*wlr.XwaylandSurface.event.Configure) = + wl.Listener(*wlr.XwaylandSurface.event.Configure).init(handleRequestConfigure), +destroy: wl.Listener(*wlr.XwaylandSurface) = wl.Listener(*wlr.XwaylandSurface).init(handleDestroy), +map: wl.Listener(*wlr.XwaylandSurface) = wl.Listener(*wlr.XwaylandSurface).init(handleMap), +unmap: wl.Listener(*wlr.XwaylandSurface) = wl.Listener(*wlr.XwaylandSurface).init(handleUnmap), +set_override_redirect: wl.Listener(*wlr.XwaylandSurface) = + wl.Listener(*wlr.XwaylandSurface).init(handleSetOverrideRedirect), + +// Listeners that are only active while mapped +commit: wl.Listener(*wlr.Surface) = wl.Listener(*wlr.Surface).init(handleCommit), + +/// The override redirect surface will add itself to the list in Root when it is mapped. +pub fn create(xwayland_surface: *wlr.XwaylandSurface) error{OutOfMemory}!*Self { + const node = try util.gpa.create(std.TailQueue(Self).Node); + const self = &node.data; + + self.* = .{ .xwayland_surface = xwayland_surface }; + + // Add listeners that are active over the the entire lifetime + xwayland_surface.events.request_configure.add(&self.request_configure); + xwayland_surface.events.destroy.add(&self.destroy); + xwayland_surface.events.map.add(&self.map); + xwayland_surface.events.unmap.add(&self.unmap); + xwayland_surface.events.set_override_redirect.add(&self.set_override_redirect); + + return self; +} + +fn handleRequestConfigure( + _: *wl.Listener(*wlr.XwaylandSurface.event.Configure), + event: *wlr.XwaylandSurface.event.Configure, +) void { + event.surface.configure(event.x, event.y, event.width, event.height); +} + +/// Called when the xwayland surface is destroyed +fn handleDestroy(listener: *wl.Listener(*wlr.XwaylandSurface), _: *wlr.XwaylandSurface) void { + const self = @fieldParentPtr(Self, "destroy", listener); + + // Remove listeners that are active for the entire lifetime + self.request_configure.link.remove(); + self.destroy.link.remove(); + self.map.link.remove(); + self.unmap.link.remove(); + self.set_override_redirect.link.remove(); + + // Deallocate the node + const node = @fieldParentPtr(std.TailQueue(Self).Node, "data", self); + util.gpa.destroy(node); +} + +/// Called when the xwayland surface is mapped, or ready to display on-screen. +pub fn handleMap(listener: *wl.Listener(*wlr.XwaylandSurface), xwayland_surface: *wlr.XwaylandSurface) void { + const self = @fieldParentPtr(Self, "map", listener); + + const node = @fieldParentPtr(std.TailQueue(Self).Node, "data", self); + server.root.xwayland_override_redirect_views.prepend(node); + + xwayland_surface.surface.?.events.commit.add(&self.commit); + + if (self.xwayland_surface.overrideRedirectWantsFocus()) { + server.input_manager.defaultSeat().setFocusRaw(.{ .xwayland_override_redirect = self }); + } +} + +/// Called when the surface is unmapped and will no longer be displayed. +fn handleUnmap(listener: *wl.Listener(*wlr.XwaylandSurface), _: *wlr.XwaylandSurface) void { + const self = @fieldParentPtr(Self, "unmap", listener); + + const node = @fieldParentPtr(std.TailQueue(Self).Node, "data", self); + server.root.xwayland_override_redirect_views.remove(node); + + self.commit.link.remove(); + + // If the unmapped surface is currently focused, reset focus to the most + // appropriate view. + var seat_it = server.input_manager.seats.first; + while (seat_it) |seat_node| : (seat_it = seat_node.next) { + const seat = &seat_node.data; + if (seat.focused == .xwayland_override_redirect and + seat.focused.xwayland_override_redirect == self) + { + seat.focus(null); + } + } + + server.root.startTransaction(); +} + +fn handleCommit(_: *wl.Listener(*wlr.Surface), _: *wlr.Surface) void { + var it = server.root.outputs.first; + while (it) |node| : (it = node.next) node.data.damage.addWhole(); +} + +fn handleSetOverrideRedirect( + listener: *wl.Listener(*wlr.XwaylandSurface), + xwayland_surface: *wlr.XwaylandSurface, +) void { + const self = @fieldParentPtr(Self, "set_override_redirect", listener); + + log.debug("xwayland surface unset override redirect", .{}); + + assert(!xwayland_surface.override_redirect); + + if (xwayland_surface.mapped) handleUnmap(&self.unmap, xwayland_surface); + handleDestroy(&self.destroy, xwayland_surface); + + const output = server.input_manager.defaultSeat().focused_output; + const xwayland_view = XwaylandView.create(output, xwayland_surface) catch { + log.err("out of memory", .{}); + return; + }; + + if (xwayland_surface.mapped) { + XwaylandView.handleMap(&xwayland_view.map, xwayland_surface); + } +} diff --git a/river/XwaylandUnmanaged.zig b/river/XwaylandUnmanaged.zig deleted file mode 100644 index e1b1d3a..0000000 --- a/river/XwaylandUnmanaged.zig +++ /dev/null @@ -1,156 +0,0 @@ -// This file is part of river, a dynamic tiling wayland compositor. -// -// Copyright 2020 The River Developers -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, version 3. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -const Self = @This(); - -const std = @import("std"); -const assert = std.debug.assert; - -const wlr = @import("wlroots"); -const wl = @import("wayland").server.wl; - -const server = &@import("main.zig").server; -const util = @import("util.zig"); - -const Box = @import("Box.zig"); -const View = @import("View.zig"); -const XwaylandView = @import("XwaylandView.zig"); -const ViewStack = @import("view_stack.zig").ViewStack; - -const log = std.log.scoped(.xwayland); - -/// The corresponding wlroots object -xwayland_surface: *wlr.XwaylandSurface, - -// Listeners that are always active over the view's lifetime -request_configure: wl.Listener(*wlr.XwaylandSurface.event.Configure) = - wl.Listener(*wlr.XwaylandSurface.event.Configure).init(handleRequestConfigure), -destroy: wl.Listener(*wlr.XwaylandSurface) = wl.Listener(*wlr.XwaylandSurface).init(handleDestroy), -map: wl.Listener(*wlr.XwaylandSurface) = wl.Listener(*wlr.XwaylandSurface).init(handleMap), -unmap: wl.Listener(*wlr.XwaylandSurface) = wl.Listener(*wlr.XwaylandSurface).init(handleUnmap), -set_override_redirect: wl.Listener(*wlr.XwaylandSurface) = - wl.Listener(*wlr.XwaylandSurface).init(handleSetOverrideRedirect), - -// Listeners that are only active while mapped -commit: wl.Listener(*wlr.Surface) = wl.Listener(*wlr.Surface).init(handleCommit), - -/// The unmanged surface will add itself to the list of unmanaged views -/// in Root when it is mapped. -pub fn create(xwayland_surface: *wlr.XwaylandSurface) error{OutOfMemory}!*Self { - const node = try util.gpa.create(std.TailQueue(Self).Node); - const self = &node.data; - - self.* = .{ .xwayland_surface = xwayland_surface }; - - // Add listeners that are active over the the entire lifetime - xwayland_surface.events.request_configure.add(&self.request_configure); - xwayland_surface.events.destroy.add(&self.destroy); - xwayland_surface.events.map.add(&self.map); - xwayland_surface.events.unmap.add(&self.unmap); - xwayland_surface.events.set_override_redirect.add(&self.set_override_redirect); - - return self; -} - -fn handleRequestConfigure( - _: *wl.Listener(*wlr.XwaylandSurface.event.Configure), - event: *wlr.XwaylandSurface.event.Configure, -) void { - event.surface.configure(event.x, event.y, event.width, event.height); -} - -/// Called when the xwayland surface is destroyed -fn handleDestroy(listener: *wl.Listener(*wlr.XwaylandSurface), _: *wlr.XwaylandSurface) void { - const self = @fieldParentPtr(Self, "destroy", listener); - - // Remove listeners that are active for the entire lifetime - self.request_configure.link.remove(); - self.destroy.link.remove(); - self.map.link.remove(); - self.unmap.link.remove(); - self.set_override_redirect.link.remove(); - - // Deallocate the node - const node = @fieldParentPtr(std.TailQueue(Self).Node, "data", self); - util.gpa.destroy(node); -} - -/// Called when the xwayland surface is mapped, or ready to display on-screen. -pub fn handleMap(listener: *wl.Listener(*wlr.XwaylandSurface), xwayland_surface: *wlr.XwaylandSurface) void { - const self = @fieldParentPtr(Self, "map", listener); - - // Add self to the list of unmanaged views in the root - const node = @fieldParentPtr(std.TailQueue(Self).Node, "data", self); - server.root.xwayland_unmanaged_views.prepend(node); - - xwayland_surface.surface.?.events.commit.add(&self.commit); - - if (self.xwayland_surface.overrideRedirectWantsFocus()) { - server.input_manager.defaultSeat().setFocusRaw(.{ .xwayland_unmanaged = self }); - } -} - -/// Called when the surface is unmapped and will no longer be displayed. -fn handleUnmap(listener: *wl.Listener(*wlr.XwaylandSurface), _: *wlr.XwaylandSurface) void { - const self = @fieldParentPtr(Self, "unmap", listener); - - // Remove self from the list of unmanaged views in the root - const node = @fieldParentPtr(std.TailQueue(Self).Node, "data", self); - server.root.xwayland_unmanaged_views.remove(node); - - self.commit.link.remove(); - - // If the unmapped surface is currently focused, reset focus to the most - // appropriate view. - var seat_it = server.input_manager.seats.first; - while (seat_it) |seat_node| : (seat_it = seat_node.next) { - const seat = &seat_node.data; - if (seat.focused == .xwayland_unmanaged and seat.focused.xwayland_unmanaged == self) { - seat.focus(null); - } - } - - server.root.startTransaction(); -} - -fn handleCommit(_: *wl.Listener(*wlr.Surface), _: *wlr.Surface) void { - var it = server.root.outputs.first; - while (it) |node| : (it = node.next) node.data.damage.addWhole(); -} - -fn handleSetOverrideRedirect( - listener: *wl.Listener(*wlr.XwaylandSurface), - xwayland_surface: *wlr.XwaylandSurface, -) void { - const self = @fieldParentPtr(Self, "set_override_redirect", listener); - - log.debug("xwayland surface unset override redirect, switching to managed", .{}); - - assert(!xwayland_surface.override_redirect); - - if (xwayland_surface.mapped) handleUnmap(&self.unmap, xwayland_surface); - handleDestroy(&self.destroy, xwayland_surface); - - const output = server.input_manager.defaultSeat().focused_output; - const xwayland_view = XwaylandView.create(output, xwayland_surface) catch { - log.err("out of memory", .{}); - return; - }; - - if (xwayland_surface.mapped) { - XwaylandView.handleMap(&xwayland_view.map, xwayland_surface); - } -} diff --git a/river/XwaylandView.zig b/river/XwaylandView.zig index ac28f79..4a00da3 100644 --- a/river/XwaylandView.zig +++ b/river/XwaylandView.zig @@ -31,7 +31,7 @@ const Output = @import("Output.zig"); const View = @import("View.zig"); const ViewStack = @import("view_stack.zig").ViewStack; const XdgPopup = @import("XdgPopup.zig"); -const XwaylandUnmanaged = @import("XwaylandUnmanaged.zig"); +const XwaylandOverrideRedirect = @import("XwaylandOverrideRedirect.zig"); const log = std.log.scoped(.xwayland); @@ -287,20 +287,20 @@ fn handleSetOverrideRedirect( ) void { const self = @fieldParentPtr(Self, "set_override_redirect", listener); - log.debug("xwayland surface set override redirect, switching to unmanaged", .{}); + log.debug("xwayland surface set override redirect", .{}); assert(xwayland_surface.override_redirect); if (xwayland_surface.mapped) handleUnmap(&self.unmap, xwayland_surface); handleDestroy(&self.destroy, xwayland_surface); - const unmanaged = XwaylandUnmanaged.create(xwayland_surface) catch { + const override_redirect = XwaylandOverrideRedirect.create(xwayland_surface) catch { log.err("out of memory", .{}); return; }; if (xwayland_surface.mapped) { - XwaylandUnmanaged.handleMap(&unmanaged.map, xwayland_surface); + XwaylandOverrideRedirect.handleMap(&override_redirect.map, xwayland_surface); } } diff --git a/river/render.zig b/river/render.zig index 11d5372..96ab4a5 100644 --- a/river/render.zig +++ b/river/render.zig @@ -75,7 +75,7 @@ pub fn renderOutput(output: *Output) void { // Always clear with solid black for fullscreen server.renderer.clear(&[_]f32{ 0, 0, 0, 1 }); renderView(output, view, &now); - if (build_options.xwayland) renderXwaylandUnmanaged(output, &now); + if (build_options.xwayland) renderXwaylandOverrideRedirect(output, &now); } else { // No fullscreen view, so render normal layers/views server.renderer.clear(&server.config.background_color); @@ -117,7 +117,7 @@ pub fn renderOutput(output: *Output) void { renderView(output, view, &now); } - if (build_options.xwayland) renderXwaylandUnmanaged(output, &now); + if (build_options.xwayland) renderXwaylandOverrideRedirect(output, &now); renderLayer(output, output.getLayer(.top).*, &now, .toplevels); @@ -241,11 +241,11 @@ fn renderDragIcons(output: *const Output, now: *os.timespec) void { } } -/// Render all xwayland unmanaged windows that appear on the output -fn renderXwaylandUnmanaged(output: *const Output, now: *os.timespec) void { +/// Render all override redirect xwayland windows that appear on the output +fn renderXwaylandOverrideRedirect(output: *const Output, now: *os.timespec) void { const output_box = server.root.output_layout.getBox(output.wlr_output).?; - var it = server.root.xwayland_unmanaged_views.last; + var it = server.root.xwayland_override_redirect_views.last; while (it) |node| : (it = node.prev) { const xwayland_surface = node.data.xwayland_surface; -- cgit v1.2.3