From f809d205122cf2920a61a694e710922c2facbe8c Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Thu, 14 Sep 2023 08:29:28 +1000 Subject: [PATCH] Change calls on closed panes to return Efallthrough, not Efail 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 --- DOC/TODO.md | 2 ++ core-pane.h | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/DOC/TODO.md b/DOC/TODO.md index cbf5b08c..043b199e 100644 --- a/DOC/TODO.md +++ b/DOC/TODO.md @@ -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 diff --git a/core-pane.h b/core-pane.h index 335994ff..6c323c44 100644 --- a/core-pane.h +++ b/core-pane.h @@ -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); -- 2.39.5