-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cycle_client no longer works in a hook #65
Comments
Are you able to give me the hash that this was last working on? It would also really help if you can put some logging into your hook and determine exactly when it is exiting. Looking over the code you have provided there are quite a few places where you could be exiting early. |
sorry not sure what the hash was. I think that is was going before I put in
the issue with the workspace cycling code.
I put in debug code and it was exiting at the end of the block after the
cycle client call.
I also stripped it down to just the cycle_client call and it appeared not
to be doing anything.
…On Wed, 16 Sep 2020, 17:49 Innes Anderson-Morrison, < ***@***.***> wrote:
Are you able to give me the hash that this was last working on? It would
also really help if you can put some logging into your hook and determine
exactly when it is exiting. Looking over the code you have provided there
are quite a few places where you could be exiting early.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#65 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJN5S4Z6Z2ZFUZF56LIQF3LSGBGYJANCNFSM4ROAMEOQ>
.
|
@crypt17 I've rewritten your hook a bit to make it easier to reason about and added some simple print logging to trace the execution: struct RmClientHook {}
impl Hook for RmClientHook {
fn remove_client(&mut self, wm: &mut WindowManager, _: WinId) {
if let Some(ws) = wm.workspace(&Selector::Focused) {
println!("have focused workspace: {}", ws.name());
if ws.len() > 1 {
println!("more than one client (n={})", ws.len());
let last = wm.client(&Selector::Index(ws.len() - 1));
if last != wm.client(&Selector::Focused) {
println!("new focused is not last");
wm.cycle_client(Backward);
}
}
}
}
} From what I can see, this is firing (yours was as well) and |
I am back in xmonad at the moment but will have a play with this when I am
next back looking at penrose.
…On Sat, 19 Sep 2020, 21:13 Innes Anderson-Morrison, < ***@***.***> wrote:
Closed #65 <#65>.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#65 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJN5S46Y3D7N5A37XJGEBX3SGRY4XANCNFSM4ROAMEOQ>
.
|
after thinking about it I think that some of this code should be in core
rather than as a plugin to mirror the way that there are the options that
can be set for new client.
…On Sun, 20 Sep 2020, 17:53 joe skinner, ***@***.***> wrote:
I am back in xmonad at the moment but will have a play with this when I am
next back looking at penrose.
On Sat, 19 Sep 2020, 21:13 Innes Anderson-Morrison, <
***@***.***> wrote:
> Closed #65 <#65>.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#65 (comment)>, or
> unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AJN5S46Y3D7N5A37XJGEBX3SGRY4XANCNFSM4ROAMEOQ>
> .
>
|
This behaviour is a breaking change for layouts that follow focus. It will not be added to core. If you want to implement it as am extension as already discussed then feel free to do so. |
Describe the bug
between now and yesterday calling the cycle_client function from a remove client hook seems to have become a no op
To Reproduce
Steps to reproduce the behavior:
with the hook in place open multiple windows and then close them.
The expected behaviour is that the focus would change in the given direction but at present the focus remains the same regardless of the value passed to cycle_client. Neither Forward or backward make any change.
Additional context
This is the hook that I am using. Even if it is reduced to just the cycle_client command it has no effect now bt was working yesterday 15/9
The text was updated successfully, but these errors were encountered: