"Sharing" the glfw mouse callback

I am searching for an efficient way of “sharing” the mouse input between imgui and the rendering application where the mouseis used as camera movement.
The environment is Vulkan with glfw window management. Imgui is used for overlays. Should I be registering the appropriate mouse callback with glfw in the imgui draw function and the main render draw function everytime or is there a better established way of dealing this scenario

imgui_impl_glfw.cpp automatically chain up callbacks so if you have installed a callback before Initialization the back-end, it’ll call yours as well.

You may also initialize the back-ends with bool install_callbacks=false then you’ll need to call the ImGuiImpl_XXX callbacks declared in imgui_impl_glfw.h yourself.

@ocornut: Thanks for your response in particular and for ImGui in general; the more I learn about it the more I admire it.
Your suggestion worked well for me with one issue; would it be possible somehow that when mouse action(right click for example) has taken place over an imGui entity (overlay in my case) it should not call my callbacks.
Is there a slick way around this?

This is covered in the FAQ How can I tell whether to dispatch mouse/keyboard to Dear ImGui or to my application? in imgui.cpp.