code: update to wlroots 0.14.0
This commit is contained in:
parent
d3a9e96f7d
commit
41874b47ae
@ -37,7 +37,7 @@ installed:
|
||||
- [zig](https://ziglang.org/download/) 0.8.0
|
||||
- wayland
|
||||
- wayland-protocols
|
||||
- [wlroots](https://github.com/swaywm/wlroots) 0.13.0
|
||||
- [wlroots](https://github.com/swaywm/wlroots) 0.14.0
|
||||
- xkbcommon
|
||||
- libevdev
|
||||
- pixman
|
||||
|
2
deps/zig-wlroots
vendored
2
deps/zig-wlroots
vendored
@ -1 +1 @@
|
||||
Subproject commit c85fe796d932731ead64e916c90fdfc3d1e1269a
|
||||
Subproject commit c5f759484ec2bb6afdee54053f5b0aaccf060131
|
@ -47,10 +47,7 @@ pub fn init(drag_icon: *DragIcon, seat: *Seat, wlr_drag_icon: *wlr.Drag.Icon) vo
|
||||
wlr_drag_icon.events.unmap.add(&drag_icon.unmap);
|
||||
wlr_drag_icon.surface.events.new_subsurface.add(&drag_icon.new_subsurface);
|
||||
|
||||
// There may already be subsurfaces present on this surface that we
|
||||
// aren't aware of and won't receive a new_subsurface event for.
|
||||
var it = wlr_drag_icon.surface.subsurfaces.iterator(.forward);
|
||||
while (it.next()) |s| Subsurface.create(s, .{ .drag_icon = drag_icon });
|
||||
Subsurface.handleExisting(wlr_drag_icon.surface, .{ .drag_icon = drag_icon });
|
||||
}
|
||||
|
||||
fn handleDestroy(listener: *wl.Listener(*wlr.Drag.Icon), wlr_drag_icon: *wlr.Drag.Icon) void {
|
||||
|
@ -66,10 +66,7 @@ pub fn init(self: *Self, output: *Output, wlr_layer_surface: *wlr.LayerSurfaceV1
|
||||
// we do want our listener called in order to send the initial configure.
|
||||
handleCommit(&self.commit, wlr_layer_surface.surface);
|
||||
|
||||
// There may already be subsurfaces present on this surface that we
|
||||
// aren't aware of and won't receive a new_subsurface event for.
|
||||
var it = wlr_layer_surface.surface.subsurfaces.iterator(.forward);
|
||||
while (it.next()) |s| Subsurface.create(s, .{ .layer_surface = self });
|
||||
Subsurface.handleExisting(wlr_layer_surface.surface, .{ .layer_surface = self });
|
||||
}
|
||||
|
||||
fn handleDestroy(listener: *wl.Listener(*wlr.LayerSurfaceV1), wlr_layer_surface: *wlr.LayerSurfaceV1) void {
|
||||
|
@ -71,10 +71,18 @@ pub fn create(wlr_subsurface: *wlr.Subsurface, parent: Parent) void {
|
||||
wlr_subsurface.events.unmap.add(&subsurface.unmap);
|
||||
wlr_subsurface.surface.events.new_subsurface.add(&subsurface.new_subsurface);
|
||||
|
||||
// There may already be subsurfaces present on this surface that we
|
||||
// aren't aware of and won't receive a new_subsurface event for.
|
||||
var it = wlr_subsurface.surface.subsurfaces.iterator(.forward);
|
||||
while (it.next()) |s| Subsurface.create(s, parent);
|
||||
Subsurface.handleExisting(wlr_subsurface.surface, parent);
|
||||
}
|
||||
|
||||
/// Create Subsurface structs to track subsurfaces already present on the
|
||||
/// given surface when river becomes aware of the surface as we won't
|
||||
/// recieve a new_subsurface event for them.
|
||||
pub fn handleExisting(surface: *wlr.Surface, parent: Parent) void {
|
||||
var below_it = surface.subsurfaces_below.iterator(.forward);
|
||||
while (below_it.next()) |s| Subsurface.create(s, parent);
|
||||
|
||||
var above_it = surface.subsurfaces_above.iterator(.forward);
|
||||
while (above_it.next()) |s| Subsurface.create(s, parent);
|
||||
}
|
||||
|
||||
fn handleDestroy(listener: *wl.Listener(*wlr.Subsurface), wlr_subsurface: *wlr.Subsurface) void {
|
||||
|
@ -77,10 +77,7 @@ pub fn create(wlr_xdg_popup: *wlr.XdgPopup, parent: Parent) void {
|
||||
wlr_xdg_popup.base.events.new_popup.add(&self.new_popup);
|
||||
wlr_xdg_popup.base.surface.events.new_subsurface.add(&self.new_subsurface);
|
||||
|
||||
// There may already be subsurfaces present on this surface that we
|
||||
// aren't aware of and won't receive a new_subsurface event for.
|
||||
var it = wlr_xdg_popup.base.surface.subsurfaces.iterator(.forward);
|
||||
while (it.next()) |s| Subsurface.create(s, parent);
|
||||
Subsurface.handleExisting(wlr_xdg_popup.base.surface, parent);
|
||||
}
|
||||
|
||||
fn handleDestroy(listener: *wl.Listener(*wlr.XdgSurface), wlr_xdg_surface: *wlr.XdgSurface) void {
|
||||
|
@ -68,10 +68,7 @@ pub fn init(self: *Self, view: *View, xdg_surface: *wlr.XdgSurface) void {
|
||||
xdg_surface.events.new_popup.add(&self.new_popup);
|
||||
xdg_surface.surface.events.new_subsurface.add(&self.new_subsurface);
|
||||
|
||||
// There may already be subsurfaces present on this surface that we
|
||||
// aren't aware of and won't receive a new_subsurface event for.
|
||||
var it = xdg_surface.surface.subsurfaces.iterator(.forward);
|
||||
while (it.next()) |s| Subsurface.create(s, .{ .view = view });
|
||||
Subsurface.handleExisting(xdg_surface.surface, .{ .view = view });
|
||||
}
|
||||
|
||||
pub fn deinit(self: *Self) void {
|
||||
|
Loading…
Reference in New Issue
Block a user