Skip to content

Commit

Permalink
honour readonly flag too
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@19463 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed May 26, 2018
1 parent b7baf5d commit 4ccf7bd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/xpra/server/rfb/rfb_server.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# This file is part of Xpra.
# Copyright (C) 2017 Antoine Martin <antoine@devloop.org.uk>
# Copyright (C) 2017-2018 Antoine Martin <antoine@devloop.org.uk>
# Xpra is released under the terms of the GNU GPL v2, or, at your option, any
# later version. See the file COPYING for details.

Expand All @@ -22,6 +22,7 @@
class RFBServer(object):

def init(self):
self.readonly = False
self.rfb_buttons = 0
self.x11_keycodes_for_keysym = {}
if POSIX and not OSX:
Expand Down Expand Up @@ -103,7 +104,7 @@ def _process_rfb_authenticated(self, proto, _packet):
start_refresh()

def _process_rfb_PointerEvent(self, _proto, packet):
if not server_features.input_devices:
if not server_features.input_devices or self.readonly:
return
buttons, x, y = packet[1:4]
wid = self._get_rfb_desktop_wid()
Expand All @@ -118,7 +119,7 @@ def _process_rfb_PointerEvent(self, _proto, packet):
self.rfb_buttons = buttons

def _process_rfb_KeyEvent(self, proto, packet):
if not server_features.input_devices:
if not server_features.input_devices or self.readonly:
return
source = self._server_sources.get(proto)
if not source:
Expand Down

0 comments on commit 4ccf7bd

Please sign in to comment.