Skip to content

Commit

Permalink
#2351 don't enable input mixin if 'keyboard' and 'mouse' flags are Fa…
Browse files Browse the repository at this point in the history
…lse, so 'top' client doesn't load it

git-svn-id: https://xpra.org/svn/Xpra/trunk@25160 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Feb 6, 2020
1 parent 629a361 commit 7b5c57c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/xpra/client/gobject_client_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def __init__(self, opts):
#don't bother with many of these things for one-off commands:
for x in ("ui_client", "wants_aliases", "wants_encodings",
"wants_versions", "wants_features", "wants_sound", "windows",
"webcam",
"webcam", "keyboard", "mouse",
):
self.hello_extra[x] = False

Expand Down
1 change: 1 addition & 0 deletions src/xpra/client/ui_client_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@ def make_hello(self):
"share" : self.client_supports_sharing,
"lock" : self.client_lock,
})
caps.update({"mouse" : True})
caps.update(self.get_keyboard_caps())
for c in CLIENT_BASES:
caps.update(c.get_caps(self))
Expand Down
6 changes: 6 additions & 0 deletions src/xpra/server/source/input_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
"""
class InputMixin(StubSourceMixin):

@classmethod
def is_needed(cls, caps : typedict) -> bool:
#the 'input' capability was only added in v4,
#so we have to enable the mixin by default:
return caps.boolget("keyboard", True) or caps.boolget("mouse", True)

def init_state(self):
self.pointer_relative = False
self.keyboard_config = None
Expand Down

0 comments on commit 7b5c57c

Please sign in to comment.