[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [arm/release] fix: panel overlap if sighup toggles being a relay



commit 121d0dfc41a8f65f6fe336a10c29f6d310f99468
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Mon Jul 11 14:41:59 2011 -0700

    fix: panel overlap if sighup toggles being a relay
    
    If we sighup or reconnect to a tor instance and this toggles having an ORPort
    then the height of the header panel can change, causing overlap with the panel
    below it (this causes flickering of the overlapped content). Redrawing the
    whole display if this happens.
---
 src/cli/headerPanel.py |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/src/cli/headerPanel.py b/src/cli/headerPanel.py
index f80eff8..e64a6de 100644
--- a/src/cli/headerPanel.py
+++ b/src/cli/headerPanel.py
@@ -418,10 +418,19 @@ class HeaderPanel(panel.Panel, threading.Thread):
     """
     
     if eventType in (torTools.State.INIT, torTools.State.RESET):
+      initialHeight = self.getHeight()
       self._isTorConnected = True
       self._haltTime = None
       self._update(True)
-      self.redraw(True)
+      
+      if self.getHeight() != initialHeight:
+        # We're toggling between being a relay and client, causing the height
+        # of this panel to change. Redraw all content so we don't get
+        # overlapping content.
+        cli.controller.getController().requestRedraw(True)
+      else:
+        # just need to redraw ourselves
+        self.redraw(True)
     elif eventType == torTools.State.CLOSED:
       self._isTorConnected = False
       self._haltTime = time.time()



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits