summaryrefslogtreecommitdiffstats
path: root/client/foreign_menu.h
diff options
context:
space:
mode:
authorUri Lublin <uril@redhat.com>2011-12-13 17:09:58 +0200
committerUri Lublin <uril@redhat.com>2011-12-20 18:44:11 +0200
commitfdcef173645e564be71f1b73d476c0716e91663d (patch)
tree7af76dfdbe4695dbc01a5af34580ce5ca666319d /client/foreign_menu.h
parenta91b0b3ff712eb2a7d91a951f2af7842495357c3 (diff)
downloadspice-fdcef173645e564be71f1b73d476c0716e91663d.tar.gz
spice-fdcef173645e564be71f1b73d476c0716e91663d.tar.xz
spice-fdcef173645e564be71f1b73d476c0716e91663d.zip
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.
Diffstat (limited to 'client/foreign_menu.h')
-rw-r--r--client/foreign_menu.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/client/foreign_menu.h b/client/foreign_menu.h
index 2fc4e535..6138087a 100644
--- a/client/foreign_menu.h
+++ b/client/foreign_menu.h
@@ -38,7 +38,7 @@ public:
class ForeignMenu : public NamedPipe::ListenerInterface {
public:
- ForeignMenu(ForeignMenuInterface *handler);
+ ForeignMenu(ForeignMenuInterface *handler, bool active = false);
virtual ~ForeignMenu();
ForeignMenu* ref() { _refs++; return this;}