MCPcopy Create free account
hub / github.com/WayfireWM/wayfire / create_dpms_timeout

Method create_dpms_timeout

plugins/single_plugins/idle.cpp:70–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68 }
69
70 void create_dpms_timeout()
71 {
72 if (dpms_timeout <= 0)
73 {
74 timeout_dpms.disconnect();
75 return;
76 }
77
78 if (!timeout_dpms.is_connected() && is_idle)
79 {
80 is_idle = false;
81 set_state(wf::OUTPUT_IMAGE_SOURCE_DPMS, wf::OUTPUT_IMAGE_SOURCE_SELF);
82
83 return;
84 }
85
86 timeout_dpms.disconnect();
87 timeout_dpms.set_timeout(1000 * dpms_timeout, [=] ()
88 {
89 is_idle = true;
90 set_state(wf::OUTPUT_IMAGE_SOURCE_SELF, wf::OUTPUT_IMAGE_SOURCE_DPMS);
91 });
92 }
93
94 ~wayfire_idle()
95 {

Callers 1

wayfire_idle_pluginClass · 0.80

Calls 3

disconnectMethod · 0.45
is_connectedMethod · 0.45
set_timeoutMethod · 0.45

Tested by

no test coverage detected