Commit Graph

4 Commits

Author SHA1 Message Date
Uri Lublin
fdcef17364 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.
2011-12-20 18:44:11 +02:00
Uri Lublin
5d28d1662e client controller/foreign_menu: use memmove instead of memcpy in readers
When src/dst memory areas may overlap, it's safer to use memmove.
2011-12-20 18:27:32 +02:00
Christophe Fergeau
78c1465ed3 add #include <config.h> to all source files
When using config.h, it must be the very first include in all source
files since it contains #define that may change the compilation process
(eg libc structure layout changes when it's used to enable large file
support on 32 bit x86 archs). This commit adds it at the beginning
of all .c and .cpp files
2011-05-03 14:44:10 +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