Giter VIP home page Giter VIP logo

Comments (24)

cyberthirst avatar cyberthirst commented on July 22, 2024

I've been experiencing too (even before Sonoma). Currently on the same versions as OP and the bug persists.

from amethyst.

LouisKraemer avatar LouisKraemer commented on July 22, 2024

Same here, can reproduce each time. Can provide additional informations if needed.

from amethyst.

cyberthirst avatar cyberthirst commented on July 22, 2024

Probably related to this recent commit? 4d0e820

I can see that the focus function was modified. Seems very messy haha :D Don't really know how it should behave without further debugging.

from amethyst.

dzanotto avatar dzanotto commented on July 22, 2024

I think it's not related to that commit.
Plus, I can reproduce the same behaviour on Sonoma even with older versions (I've tried backwards until 0.15.6, and I'm sure that that version was working before Mac OS update)

from amethyst.

MichalMoravik avatar MichalMoravik commented on July 22, 2024

Same issue here, any update on this please?

from amethyst.

ianyh avatar ianyh commented on July 22, 2024

This is weird. I did a bunch of testing, and it seems like the function just doesn't behave correctly anymore. It still loses focus for every case I tried; disabling following to the space, disabling the new raise code, disabling raising at all, etc. Nothing seems to work. It seems like yabai sidesteps it with the Dock injection, but I'm not sure how to do it here.

from amethyst.

ianyh avatar ianyh commented on July 22, 2024

Could someone(s) look at the video in the PR? I could use feedback on how janky is too janky. #1586

from amethyst.

dzanotto avatar dzanotto commented on July 22, 2024

This is weird. I did a bunch of testing, and it seems like the function just doesn't behave correctly anymore. It still loses focus for every case I tried; disabling following to the space, disabling the new raise code, disabling raising at all, etc. Nothing seems to work. It seems like yabai sidesteps it with the Dock injection, but I'm not sure how to do it here.

Additional information: yabai works even without Dock injection (so without disabling System Integrity Protection).
Right now I've installed yabai together with Amethyst as a workaround, using yabai only to throw windows between spaces.

from amethyst.

dzanotto avatar dzanotto commented on July 22, 2024

Could someone(s) look at the video in the PR? I could use feedback on how janky is too janky. #1586

To be honest, the behaviour in the video appears to be quite "distracting"... sorry :)

from amethyst.

ianyh avatar ianyh commented on July 22, 2024

This is weird. I did a bunch of testing, and it seems like the function just doesn't behave correctly anymore. It still loses focus for every case I tried; disabling following to the space, disabling the new raise code, disabling raising at all, etc. Nothing seems to work. It seems like yabai sidesteps it with the Dock injection, but I'm not sure how to do it here.

Additional information: yabai works even without Dock injection (so without disabling System Integrity Protection).

Right now I've installed yabai together with Amethyst as a workaround, using yabai only to throw windows between spaces.

Interesting! I'll take a closer look.

from amethyst.

ianyh avatar ianyh commented on July 22, 2024

I tested yabai, and I still see the flickering. I think you need the scripting addition for it to work totally correctly. @dzanotto do you have sa configured?

from amethyst.

dzanotto avatar dzanotto commented on July 22, 2024

I tested yabai, and I still see the flickering. I think you need the scripting addition for it to work totally correctly. @dzanotto do you have sa configured?

No, I don't have scripting addition configured.

Screen.Recording.2024-01-07.at.18.03.54.mov

In the attached video you can see the following:

  • moving form space x to space x+1 (standard Mac OS behaviour)
  • moving back from space x+1 to space x (standard Mac OS behaviour)
  • throwing a window from space x to space x+1
    • moving the window is done by skhd calling "yabai -m window --space next --focus"
    • tiling the windows is done by Amethyst

I don't see the flickering that was apparently present in your video, but I may be wrong.

from amethyst.

ianyh avatar ianyh commented on July 22, 2024

Thanks for confirming for me! I'll keep fiddling with it.

from amethyst.

ianyh avatar ianyh commented on July 22, 2024

Okay, yabai actually does lose focus on space changes, but seemingly only if you move to a space that the window has not yet appeared on and without --focus. That is, if you move the window, and then manually traverse to the space yourself, then the window loses focus.

from amethyst.

ianyh avatar ianyh commented on July 22, 2024

Okay, I think I figured out what was happening. Silica's focus code was performing an application activate in addition to a raise action. Moving and following windows seems to behave correctly now.

from amethyst.

dzanotto avatar dzanotto commented on July 22, 2024

Hi @ianyh, I've tried to build Amethyst from source code and I still get the old behaviour. Am I missing something?

from amethyst.

ianyh avatar ianyh commented on July 22, 2024

I'll double check that I didn't mess up the merge or something.

from amethyst.

ianyh avatar ianyh commented on July 22, 2024

Hm. It seems to be inconsistent now for me, and I'm not sure why.

from amethyst.

koekeishiya avatar koekeishiya commented on July 22, 2024

If you claim that yabai is working correctly, this is how it works:

  1. User executes command to move a window to another space. (yabai -m window --space next)
  2. If the window to be moved is currently focused ("has key-input")
    a) Is this the last window on this space -> focus finder process with no window id
    b) Not last window on this space -> focus the next window in focus order on this space
  3. Move the window to the target space

Now in yabai I allow for chaining commands, so the comment earlier used yabai -m window --space next --focus, which basically makes yabai add a step 4. to the above list, that changes the focus back to the window. It might seem redundant to first remove focus, just to refocus again, but I found that to work more reliably.

Not sure if this is related to your issue here, but figured I'd mention it.

from amethyst.

ianyh avatar ianyh commented on July 22, 2024

Thanks, @koekeishiya!

I figured this out finally. I think it's actually the code for detecting changes in tabs being a little overzealous when spaces change.

from amethyst.

ianyh avatar ianyh commented on July 22, 2024

Okay, after tearing my hair out for some time and disabling basically everything that Amethyst does other than moving windows between spaces, and the loss of focus persists. There must be some race condition with moving a window to a new space and focusing the window to trigger the space change.

from amethyst.

ianyh avatar ianyh commented on July 22, 2024

@dzanotto could you try the branch in #1591 when you get a chance? I need more data points for my own sanity.

from amethyst.

dzanotto avatar dzanotto commented on July 22, 2024

@dzanotto could you try the branch in #1591 when you get a chance? I need more data points for my own sanity.

Hi @ianyh, I've tried the branch "window-focusing" and it works!
Thanks for putting so much effort in it :)

from amethyst.

ianyh avatar ianyh commented on July 22, 2024

Thanks!

from amethyst.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.