mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-21 00:23:16 +00:00
Add Input::Session::exclusive() interface
This interface allows a GUI client to express the intent to exclusively observe relative motion events while locking the absolute pointer position. This patch merely extends the interface without implementing it. As this change touches os/include/input/component.h, it moves the manage/dissolve operations into the class, ensuring the call of dissolve at destruction time. Issue #5355
This commit is contained in:
committed by
Christian Helmuth
parent
318d641266
commit
d7830a0ce6
@ -247,7 +247,7 @@ struct Framebuffer::Session_component : Genode::Rpc_object<Framebuffer::Session>
|
||||
** Main program **
|
||||
******************/
|
||||
|
||||
struct Gui_fb::Main : View_updater
|
||||
struct Gui_fb::Main : View_updater, Input::Session_component::Action
|
||||
{
|
||||
Env &_env;
|
||||
|
||||
@ -316,10 +316,19 @@ struct Gui_fb::Main : View_updater
|
||||
/*
|
||||
* Input and framebuffer sessions provided to our client
|
||||
*/
|
||||
Input::Session_component _input_session { _env, _env.ram() };
|
||||
Input::Session_component _input_session { _env.ep(), _env.ram(), _env.rm(), *this };
|
||||
|
||||
/**
|
||||
* Input::Session_component::Action interface
|
||||
*/
|
||||
void exclusive_input_requested(bool enabled) override
|
||||
{
|
||||
_gui.input.exclusive(enabled);
|
||||
}
|
||||
|
||||
Framebuffer::Session_component _fb_session { _env.pd(), _gui, *this, _initial_mode() };
|
||||
|
||||
Static_root<Input::Session> _input_root { _env.ep().manage(_input_session) };
|
||||
Static_root<Input::Session> _input_root { _input_session.cap() };
|
||||
|
||||
/*
|
||||
* Attach root interfaces to the entry point
|
||||
|
@ -113,6 +113,8 @@ class Input::Session_component : public Rpc_object<Session>
|
||||
}
|
||||
|
||||
void sigh(Signal_context_capability sigh) override { _sigh = sigh; }
|
||||
|
||||
void exclusive(bool) override { }
|
||||
};
|
||||
|
||||
#endif /* _INPUT_SESSION_COMPONENT_H_ */
|
||||
|
Reference in New Issue
Block a user