wm: allow clients to upgrade session caps

This patch adds the handling neccessary for clients to upgrade the cap
quota of their GUI session. Until now, the upgrade mechanism supported
only RAM quota.

The limitation became visible once a client - in the particular case the
motif_decorator - attempted the cap upgrade of its GUI session. The cap
quota would arrive at the wm, but the wm would keep it instead of
forwarding the quota to nitpicker. This resulted in an infinite retry
loop at the motif_decorator, ultimatedly depleting all its cap quota.
This commit is contained in:
Norman Feske 2021-03-26 16:15:59 +01:00
parent f839b3ecba
commit 27527bf165
2 changed files with 2 additions and 4 deletions

View File

@ -328,8 +328,7 @@ struct Wm::Decorator_gui_session : Genode::Rpc_object<Gui::Session>,
void upgrade(const char *args)
{
size_t const ram_quota = Arg_string::find_arg(args, "ram_quota").ulong_value(0);
_gui_session.upgrade_ram(ram_quota);
_gui_session.upgrade(Genode::session_resources_from_args(args));
}
Pointer::Position last_observed_pointer_pos() const

View File

@ -813,8 +813,7 @@ class Wm::Gui::Session_component : public Rpc_object<Gui::Session>,
void upgrade(char const *args)
{
size_t const ram_quota = Arg_string::find_arg(args, "ram_quota").ulong_value(0);
_session.upgrade_ram(ram_quota);
_session.upgrade(Genode::session_resources_from_args(args));
}
void try_to_init_real_child_views()