Skip to content

Commit

Permalink
#1838: fix readonly mode
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@19373 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed May 23, 2018
1 parent 2bd6af3 commit b058b43
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/unittests/unit/server/server_mixins_option_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def test_all(self):
"printing",
"file-transfer",
"mmap",
#"readonly",
"readonly",
"dbus-proxy",
"remote-logging",
"windows",
Expand Down
19 changes: 11 additions & 8 deletions src/xpra/x11/x11_server_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,14 +345,15 @@ def get_ui_info(self, proto, wids=None, *args):
log("do_get_info thread=%s", threading.current_thread())
info = GTKServerBase.get_ui_info(self, proto, wids, *args)
#this is added here because the server keyboard config doesn't know about "keys_pressed"..
with xsync:
info.setdefault("keyboard", {}).update({
"state" : {
"keys_pressed" : tuple(self.keys_pressed.keys())
},
"fast-switching" : True,
"layout-group" : X11Keyboard.get_layout_group(),
})
if not self.readonly:
with xsync:
info.setdefault("keyboard", {}).update({
"state" : {
"keys_pressed" : tuple(self.keys_pressed.keys())
},
"fast-switching" : True,
"layout-group" : X11Keyboard.get_layout_group(),
})
sinfo = info.setdefault("server", {})
try:
from xpra.x11.gtk2.composite import CompositeHelper
Expand Down Expand Up @@ -437,6 +438,8 @@ def reenable_keymap_changes(*args):


def clear_keys_pressed(self):
if self.readonly:
return
keylog("clear_keys_pressed()")
#make sure the timer doesn't fire and interfere:
self.cancel_key_repeat_timer()
Expand Down

0 comments on commit b058b43

Please sign in to comment.