mirror of
https://github.com/cage-kiosk/cage.git
synced 2026-06-29 13:14:40 -04:00
cage: add support for wlr-output-power-management
This implements the zwlr_output_power_management_v1 protocol, which allow clients such as swayidle to toggle display power state. Outputs are intentionally not removed per the discussion in #245. A dpms_powered_off flag is tracked on each output to prevent a DPMS "on" request from re-enabling an output that was disabled via wlr-output-management rather than DPMS. The protocol generation/dep additions is heavily inspired by swaywm Fixes #245
This commit is contained in:
parent
79e1e0dfaa
commit
7e44e3c832
7 changed files with 199 additions and 1 deletions
26
protocols/meson.build
Normal file
26
protocols/meson.build
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
wayland_scanner_dep = dependency('wayland-scanner', native: true)
|
||||
wayland_scanner = find_program(
|
||||
wayland_scanner_dep.get_variable('wayland_scanner'),
|
||||
native: true,
|
||||
)
|
||||
|
||||
wl_protos_src = []
|
||||
|
||||
protocols = [
|
||||
'wlr-output-power-management-unstable-v1.xml',
|
||||
]
|
||||
|
||||
foreach xml : protocols
|
||||
wl_protos_src += custom_target(
|
||||
xml.underscorify() + '_c',
|
||||
input: xml,
|
||||
output: '@BASENAME@-protocol.c',
|
||||
command: [wayland_scanner, 'private-code', '@INPUT@', '@OUTPUT@'],
|
||||
)
|
||||
wl_protos_src += custom_target(
|
||||
xml.underscorify() + '_server_h',
|
||||
input: xml,
|
||||
output: '@BASENAME@-protocol.h',
|
||||
command: [wayland_scanner, 'server-header', '@INPUT@', '@OUTPUT@'],
|
||||
)
|
||||
endforeach
|
||||
Loading…
Add table
Add a link
Reference in a new issue