Commit Graph

3 Commits

Author SHA1 Message Date
Uri Lublin
df17a852fa client: foreign-menu: pass "active" param when creating a ForeignMenu (#769020)
The default stays the same -- false.

A race could prevent setting ForeignMenu::_active correctly.
That happened when Application::on_app_activated was called before
_foriegn_menu was created. When foriegn_menu was created its
_active defaults to false, and that has not changed, until focus
was taken out and back in spice-client window.

This caused usbrdr to sometimes not auto-share devices, unless
the user switched focus to a different application and back to
spicec.

The fix updates ForiegnMenu::_active upon creation.
(cherry picked from commit fdcef17364)
2011-12-21 13:05:12 +02:00
Uri Lublin
baa375e8b5 client controller/foreign_menu: use memmove instead of memcpy in readers
When src/dst memory areas may overlap, it's safer to use memmove.
(cherry picked from commit 5d28d1662e)
2011-12-21 12:58:07 +02:00
Arnon Gilboa
20c550d278 spicec: add foreign menu
Spice foreign menu enables external control of the client menu.

The foreignmenu protocol enables an external application to:
add a submenu, set its title, clear it, add/modify/remove an item etc.

Foreign menu is based on the cross-platform named pipe.
2010-10-18 10:03:46 +02:00