command/attach-modes: above and below options
This commit is contained in:
committed by
Isaac Freund
parent
f6cc4de884
commit
d71bebc032
@ -60,6 +60,20 @@ pub const PendingState = struct {
|
||||
///
|
||||
/// This includes both floating/fullscreen views and those arranged in the layout.
|
||||
wm_stack: wl.list.Head(View, .pending_wm_stack_link),
|
||||
///
|
||||
/// Index of the first view in focus_stack in the wm_stack list.
|
||||
pub fn focusedIndex(self: *PendingState) ?u32 {
|
||||
var focus_stack_it = self.focus_stack.iterator(.forward);
|
||||
const focused_view = focus_stack_it.next() orelse return null;
|
||||
|
||||
var it = self.wm_stack.iterator(.forward);
|
||||
var count: u32 = 0;
|
||||
while (it.next()) |other| {
|
||||
if (other == focused_view) break;
|
||||
count += 1;
|
||||
}
|
||||
return count;
|
||||
}
|
||||
};
|
||||
|
||||
wlr_output: *wlr.Output,
|
||||
|
||||
Reference in New Issue
Block a user