output: introduce state struct
This simplifies the handling of the current/pending tags and will be used in the future for atomic layout updates involving layer surface exclusive zones.
This commit is contained in:
@ -360,13 +360,13 @@ fn layerSurfaceAt(
|
||||
/// Find the topmost visible view surface (incl. popups) at ox,oy.
|
||||
fn viewSurfaceAt(output: Output, ox: f64, oy: f64, sx: *f64, sy: *f64) ?*c.wlr_surface {
|
||||
// Focused views are rendered on top, so look for them first.
|
||||
var it = ViewStack(View).iterator(output.views.first, output.current_focused_tags);
|
||||
var it = ViewStack(View).iterator(output.views.first, output.current.tags);
|
||||
while (it.next()) |node| {
|
||||
if (!node.view.focused) continue;
|
||||
if (node.view.surfaceAt(ox, oy, sx, sy)) |found| return found;
|
||||
}
|
||||
|
||||
it = ViewStack(View).iterator(output.views.first, output.current_focused_tags);
|
||||
it = ViewStack(View).iterator(output.views.first, output.current.tags);
|
||||
while (it.next()) |node| {
|
||||
if (node.view.surfaceAt(ox, oy, sx, sy)) |found| return found;
|
||||
}
|
||||
|
Reference in New Issue
Block a user