]> git.neil.brown.name Git - edlib.git/commitdiff
Change calls on closed panes to return Efallthrough, not Efail
authorNeilBrown <neil@brown.name>
Wed, 13 Sep 2023 22:29:28 +0000 (08:29 +1000)
committerNeilBrown <neil@brown.name>
Wed, 13 Sep 2023 22:32:05 +0000 (08:32 +1000)
Efail is too harsh.  We really want to make it appear that the command
doesn't exist.  So do that.

This fixes a problem with x11selection-xcb where a notification to a
closed pane returned Efail which has a large abs value and so drowned
out the good results.

Signed-off-by: NeilBrown <neil@brown.name>
DOC/TODO.md
core-pane.h

index cbf5b08c79cb7360d48f069dd200baf0da72ac19..043b199e446e5be7914462db32ba50052d82c169 100644 (file)
@@ -9,6 +9,8 @@ the file.
 
 ### Triage
 
+- [X] open second x11 window, use selections.  Close it.  command
+      in x11selection_Xcb gets freed???
 - [X] adding new lines at end of doc in x11 leaves phantom underline
       cursors.
 - [ ] 20230908090027.6AA0DC05B9@prodcs.lwn.net has a wrapped
index 335994ff93beb186f1ad1f9aa4bed61af545db43..6c323c4461f90576baa48cb40140731141a0b1df 100644 (file)
@@ -139,7 +139,7 @@ static inline int do_call_val(enum target_type type, struct pane *home,
                        /* This pane cannot accept anything but
                         * "Close" or "Close:mark" or "Close:Notify"
                         */
-                       return Efail;
+                       return Efallthrough;
                ci.comm = home->handle;
                ret = ci.comm->func(&ci);
                break;
@@ -149,7 +149,7 @@ static inline int do_call_val(enum target_type type, struct pane *home,
                if (home)
                        ci.home = home;
                if (ci.home->damaged & DAMAGED_CLOSED)
-                       return Efail;
+                       return Efallthrough;
                ci.comm = comm2a;
                ci.comm2 = comm2b;
                ret = ci.comm->func(&ci);