From fdcef173645e564be71f1b73d476c0716e91663d Mon Sep 17 00:00:00 2001 From: Uri Lublin Date: Tue, 13 Dec 2011 17:09:58 +0200 Subject: 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. --- client/application.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'client/application.cpp') diff --git a/client/application.cpp b/client/application.cpp index decf8a19..e120dfe7 100644 --- a/client/application.cpp +++ b/client/application.cpp @@ -599,7 +599,7 @@ int Application::run() void Application::on_start_running() { - _foreign_menu.reset(new ForeignMenu(this)); + _foreign_menu.reset(new ForeignMenu(this, _active)); if (_enable_controller) { _controller.reset(new Controller(this)); return; -- cgit