mirror of
https://github.com/cage-kiosk/cage.git
synced 2026-07-02 00:06:10 -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
3
output.h
3
output.h
|
|
@ -18,6 +18,8 @@ struct cg_output {
|
|||
struct wl_listener frame;
|
||||
|
||||
struct wl_list link; // cg_server::outputs
|
||||
|
||||
bool dpms_powered_off;
|
||||
};
|
||||
|
||||
void handle_output_manager_apply(struct wl_listener *listener, void *data);
|
||||
|
|
@ -25,5 +27,6 @@ void handle_output_manager_test(struct wl_listener *listener, void *data);
|
|||
void handle_output_layout_change(struct wl_listener *listener, void *data);
|
||||
void handle_new_output(struct wl_listener *listener, void *data);
|
||||
void output_set_window_title(struct cg_output *output, const char *title);
|
||||
void handle_output_power_manager_set_mode(struct wl_listener *listener, void *data);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue