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

Method display

plugins/protocols/session-lock.cpp:166–188  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

164 }
165
166 void display(std::string text)
167 {
168 if (!output)
169 {
170 LOGW("Trying to display crashed lock node on removed output");
171 return;
172 }
173
174 wf::cairo_text_t::params params(
175 1280 /* font_size */,
176 wf::color_t{0, 0, 0, 1} /* bg_color */,
177 wf::color_t{0.9, 0.9, 0.9, 1} /* fg_color */);
178 set_text_params(params);
179 // TODO: make the text smaller and display a useful message instead of a big explosion.
180 set_text(text);
181 auto layer_node = output->node_for_layer(wf::scene::layer::LOCK);
182 if (parent() == nullptr)
183 {
184 wf::scene::add_back(layer_node, shared_from_this());
185 }
186
187 wf::get_core().seat->set_active_node(shared_from_this());
188 }
189
190 void display_crashed()
191 {

Callers

nothing calls this directly

Calls 3

add_backFunction · 0.85
node_for_layerMethod · 0.80
set_active_nodeMethod · 0.80

Tested by

no test coverage detected