mirror of
https://github.com/swaywm/sway.git
synced 2025-11-09 13:29:49 -05:00
Start to build out window management functions
This commit is contained in:
parent
47b28bd335
commit
82bc36c681
5 changed files with 85 additions and 1 deletions
10
sway/layout.c
Normal file
10
sway/layout.c
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
#include <wlc/wlc.h>
|
||||
#include "layout.h"
|
||||
|
||||
wlc_handle get_topmost(wlc_handle output, size_t offset) {
|
||||
size_t memb;
|
||||
const wlc_handle *views = wlc_output_get_views(output, &memb);
|
||||
return (memb > 0 ? views[(memb - 1 + offset) % memb] : 0);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue