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

Method init

plugins/single_plugins/switcher.cpp:195–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

193
194 public:
195 void init() override
196 {
197 if (!wf::get_core().is_gles2())
198 {
199 const char *render_type =
200 wf::get_core().is_vulkan() ? "vulkan" : (wf::get_core().is_pixman() ? "pixman" : "unknown");
201 LOGE("switcher: requires GLES2 support, but current renderer is ", render_type);
202 return;
203 }
204
205 output->add_key(
206 wf::option_wrapper_t<wf::keybinding_t>{"switcher/next_view"},
207 &next_view_binding);
208 output->add_key(
209 wf::option_wrapper_t<wf::keybinding_t>{"switcher/prev_view"},
210 &prev_view_binding);
211 output->connect(&view_disappeared);
212
213 input_grab = std::make_unique<wf::input_grab_t>("switcher", output, this, nullptr, nullptr);
214 grab_interface.cancel = [=] () {deinit_switcher();};
215 }
216
217 void handle_keyboard_key(wf::seat_t*, wlr_keyboard_key_event event) override
218 {

Callers

nothing calls this directly

Calls 5

is_gles2Method · 0.80
is_vulkanMethod · 0.80
is_pixmanMethod · 0.80
connectMethod · 0.80
add_keyMethod · 0.45

Tested by

no test coverage detected