]> git.neil.brown.name Git - edlib.git/commitdiff
server: don't hold reference to the display pane.
authorNeilBrown <neil@brown.name>
Wed, 28 Jun 2023 09:11:43 +0000 (19:11 +1000)
committerNeilBrown <neil@brown.name>
Wed, 28 Jun 2023 21:03:47 +0000 (07:03 +1000)
The display pane will soon not be available as creation a display will
transparently stack various things on top of it.
So use "Display:close" instead of .close() and just hold the top level.

.term and .disp are often the same now. I wonder if we need both.

Signed-off-by: NeilBrown <neil@brown.name>
DOC/TODO.md
python/lib-server.py

index 08a20033d511f1857c47afa45de579b5af12554f..41e08a6d41edb4577b4c245f3cf79d6887123848 100644 (file)
@@ -177,6 +177,7 @@ Module features
 ### lib-server
 
 - [ ] ctrl-z in elc doesn't ask edlib to release the terminal
+- [ ] do we need both .term and .disp?  When are they different?
 
 ### lib-x11selection-xcb
 
index bb8d14ce726b32b2d86e8a21cada794c69fb6fc1..84b2eff16564758ab5e44d606957df09398f12ca 100755 (executable)
@@ -37,7 +37,7 @@ try:
 
             if not msg :
                 if self.disp:
-                    self.disp.close()
+                    self.disp.call("Display:close")
                 if self.sock:
                     self.sock.close()
                 self.sock = None
@@ -134,7 +134,7 @@ try:
                                     arg, env['XAUTHORITY'], ret='pane')
                     if p:
                         for v in env:
-                            p[v] = env[v]
+                            p.call("window:set:", env[v], v)
                         p.call("Window:bury")
 
                     self.term = p
@@ -148,7 +148,7 @@ try:
                     self.term = p.call("editor:activate-display", ret='pane')
                     for v in env:
                         self.term.call("window:set:", env[v], v)
-                    self.disp = p
+                    self.disp = self.term
                     self.add_notify(self.disp, "Notify:Close")
                     self.sock.send(b"OK")
                     return 1
@@ -212,7 +212,7 @@ try:
                 self.sock.close()
                 self.sock = None
             if self.disp:
-                self.disp.close()
+                self.disp.call("Display:close")
                 self.disp = None
 
     is_client = False