diff options
| author | Isaac Freund <ifreund@ifreund.xyz> | 2020-04-24 14:51:10 +0200 |
|---|---|---|
| committer | Isaac Freund <ifreund@ifreund.xyz> | 2020-04-24 14:51:10 +0200 |
| commit | 822976e3a53e2b59f75666cb2239b1daad5cab6a (patch) | |
| tree | 9db14ebbaff6a63538d2b6395d8bff4dac611734 /src/root.zig | |
| parent | 56400a5955603b8760a27f49ac4b33bcaa86b73c (diff) | |
| download | river-822976e3a53e2b59f75666cb2239b1daad5cab6a.tar.gz river-822976e3a53e2b59f75666cb2239b1daad5cab6a.tar.xz | |
Start to handle layer surfaces in cursor code
Diffstat (limited to 'src/root.zig')
| -rw-r--r-- | src/root.zig | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/src/root.zig b/src/root.zig index 9623230..a26d835 100644 --- a/src/root.zig +++ b/src/root.zig @@ -75,23 +75,6 @@ pub const Root = struct { } } - /// Finds the topmost view under the output layout coordinates lx, ly - /// returns the view if found, and a pointer to the wlr_surface as well as the surface coordinates - pub fn viewAt(self: Self, lx: f64, ly: f64, surface: *?*c.wlr_surface, sx: *f64, sy: *f64) ?*View { - // Iterate over all views of all outputs - var output_it = self.outputs.first; - while (output_it) |node| : (output_it = node.next) { - const output = &node.data; - var view_it = ViewStack(View).iterator(output.views.first, 0xFFFFFFFF); - while (view_it.next()) |view_node| { - if (view_node.view.isAt(lx, ly, surface, sx, sy)) { - return &view_node.view; - } - } - } - return null; - } - /// Clear the current focus. pub fn clearFocus(self: *Self) void { if (self.focused_view) |view| { |
