mirror of
https://github.com/MezzalunaWM/Mezzaluna.git
synced 2026-03-07 19:49:53 -05:00
starting at keyboard exclusivity
This commit is contained in:
parent
a8e77be43b
commit
e5a36b4d0b
3 changed files with 26 additions and 6 deletions
|
|
@ -54,6 +54,15 @@ pub fn init(wlr_layer_surface: *wlr.LayerSurfaceV1) *LayerSurface {
|
|||
return self;
|
||||
}
|
||||
|
||||
pub fn allowKeyboard(self: *LayerSurface) void {
|
||||
if(self.wlr_layer_surface.output == null or self.wlr_layer_surface.output.?.data == null) {
|
||||
std.log.err("Layer surface does not have an associated output");
|
||||
}
|
||||
|
||||
const output: *Output = @ptrCast(@alignCast(self.wlr_layer_surface.output.?.data.?));
|
||||
output.setFocused();
|
||||
}
|
||||
|
||||
pub fn deinit(self: *LayerSurface) void {
|
||||
self.destroy.link.remove();
|
||||
self.map.link.remove();
|
||||
|
|
|
|||
|
|
@ -128,6 +128,8 @@ pub fn init(self: *Server) void {
|
|||
|
||||
// LayerShell events
|
||||
self.layer_shell.events.new_surface.add(&self.new_layer_surface);
|
||||
|
||||
self.events.exec("ServerStartPost", .{});
|
||||
}
|
||||
|
||||
pub fn deinit(self: *Server) noreturn {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue