Separate View from its implementation

This is done in preperation for Xwayland support
This commit is contained in:
Isaac Freund
2020-04-25 21:40:26 +02:00
parent 609eeae6f4
commit 454e2454b6
9 changed files with 231 additions and 150 deletions

View File

@ -147,10 +147,11 @@ pub const Seat = struct {
}) {
return;
}
// Obtain the target wlr_surface
const target_wlr_surface = switch (focus_target) {
.view => |target_view| target_view.wlr_xdg_surface.surface,
.layer => |target_layer| target_layer.wlr_layer_surface.surface,
.view => |target_view| target_view.wlr_surface.?,
.layer => |target_layer| target_layer.wlr_layer_surface.surface.?,
.none => null,
};