diff options
| -rwxr-xr-x | socketserver.py | 10 | 
1 files changed, 10 insertions, 0 deletions
| diff --git a/socketserver.py b/socketserver.py index 0a7e9d4..57000d8 100755 --- a/socketserver.py +++ b/socketserver.py @@ -48,6 +48,7 @@ class Handler(object):          self.socket = socket.socket()
          self.socket.bind((configuration["host"], int(configuration["port"])))
 +        print("Listening on", configuration["host"], ":",int(configuration["port"]))
          self.socket.listen(100)
          self.socket.setblocking(False)
          c = waitEvent()
 @@ -119,12 +120,21 @@ class Handler(object):              return
          if self.application_name is not None:
 +            # As we have a name in the configuration to associate with, use
 +            # this name as a reference
              title = self.application_name
          else:
              # Associate the layout with the current window
              title = component.queryUtility(desktopEvent.IDesktop).getForegroundWindowTitle()
          self.layout_queue.put((js, title))
 +        # The application name is hardcoded in the code, and should be reported
 +        # in the configuration or somewhere else.
 +
 +        # The name of the current application is not reliable because the
 +        # message can be send with some lattency.
 +        self.layout_queue.put((js, self.application_name))
 +
      def _send(self:object, conn:socket, mask:int, text) -> None:
          """ Internal method used to dispatch the message to the socket.  """
          try:
 | 
