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

Method _set_alpha

plugins/window-rules/view-action-interface.cpp:391–403  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

389}
390
391void view_action_interface_t::_set_alpha(float alpha)
392{
393 alpha = std::clamp(alpha, 0.1f, 1.0f);
394
395 // Apply view transformer if needed and set alpha.
396 auto tr = wf::ensure_named_transformer<wf::scene::view_2d_transformer_t>(
397 _nontoplevel, wf::TRANSFORMER_2D, "alpha", _nontoplevel);
398 if (fabs(tr->alpha - alpha) > FLT_EPSILON)
399 {
400 tr->alpha = alpha;
401 _nontoplevel->damage();
402 }
403}
404
405void view_action_interface_t::_set_geometry(int x, int y, int w, int h)
406{

Callers

nothing calls this directly

Calls 2

clampFunction · 0.85
damageMethod · 0.45

Tested by

no test coverage detected