-
-
Notifications
You must be signed in to change notification settings - Fork 207
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
[BUG]: stackbar disappears #746
Comments
It's likely an issue with komorebi. Does the stackbar reappear if you unstack and then restack? |
I tried the following:
I could not think of more test cases |
If anyone uses yasb I'd be interested to know if this also happens when running yasb; it would help to know if this is reproducible across multiple topbars or if it's just something with the interactions between komorebi and zebar. |
@LGUG2Z Ignore all the extra space between the stackbar and yasb, as I still have my offset for Zebar. I tried to stack and unstack many times, and it worked just fine. As far as I can tell, yasb has a pretty good implementation for Komorebi, but I would like to stick with Zebar (as the last yasb update was over 5 month ago and has many issues open). I am not sure at this point, if the issue is with the Zebar implementation or some kind of Rust related issue. |
@lars-berger any ideas? 👀 |
Can it be confirmed that this is not just me? I would feel much better :) |
@LGUG2Z v0.1.22 works with the stackbar with Zebar v1.3 (unmodified) v0.1.23 and v0.1.24 do not work with the stackbar with Zebar v1.3 (unmodified) v0.1.22 works with the stackbar with Zebar v1.3 (modified by me) v0.1.23 does not work with the stackbar with Zebar v1.3 (modified by me) I hope this helps in hunting down this bug |
oh and I saw the stackbar flash in for a second, then disappear when using Komorebi v0.1.23 |
I was able to repro this not with zebar but with another Rust GUI app 🤔 |
The stackbars will reappear if sending a message to change the stackbar mode from Never to Always/OnStack via |
@CtByte not sure if you're able to build locally, but if you can, would you try building komorebi/komorebic/komorebi-egui from the feature/egui branch and then toggling the stackbar mode to Never and then to Always or OnStack after you have launched zebar and the stackbars initially disappear? |
@LGUG2Z I will try my best to help you out. I have a few busy days ahead so it might take some time before I could get back to you with some results (I might have some questions regarding that). I appreciate all the effort going into hunting this bug down :) |
I'm not quite sure what's causing the hiding behavior/haven't had a chance to repro this yet. I can hopefully take a look after work tonight. Some thoughts in the meantime:
So in slightly simpler terms, the stackbar should regularly update itself on foreground window changes/stack changes to: let stack_top_hwnd = self.my_stack.current_top_hwnd(); This is similar to, but slightly different from the border window: The border window regularly raises itself to HWND_TOP, except it also hides itself when a non-managed window is made foreground_window, which is what prevents it from drawing over other windows (as there's only one). If we later make a border window per managed window (something we're talking about) then the rules get more fancy, where it would need to find the window it's wrapping and always position itself exaclty above that window in the z-order (not top, not topmost, etc). Note that something like |
More data points:
|
@LGUG2Z I tried to run komorebi from the
Here is the result:
Clicking on the stackbar also worked, it changed the window. The next step was to run the komorebi-egui.
I tried to add the setting as stated here, but it gave a new error (new line number)
I am probably doing something wrong, could you please let me know what? |
One thing I did wrong is that I did not stop Zebar before tests....sorry about that. But now I know that if Komorebi is started after Zebar then the stackbar works. So, what I also did was:
What I think you find more useful is that in each mode (Never,OnStack,Always) the stackbar disappeared and when I clicked on a window, this warning came in the console:
I hope this is more useful, and if you want me to do more tests, please let me know (also if I missed something). Can this be a Zebar related issue? |
An other thing I noticed is that the Komorebi provider in Zebar is not working when I run it from the |
@CtByte it looks like you're running |
@LGUG2Z Thank you, that makes sense, I managed to use install from here
I hope that this is what you asked me to do. |
@LGUG2Z I have a small update on this, I hope this helps. It seems that the stackbar only disappears when I use the Komorebi provider in Zebar. I started Komorebi, stacked a few windows like before, started Zebar without using the Komorebi provider, and the stackbar did not disappear. I am using Komorebi v0.1.24. If you need me to test more, please let me know. |
Could there be an error when Zebar connects to Komorebi via the socket connection? |
Another way to reproduce this issue here: #792 I've pinned this issue to give it a bit more visibility on the tracker and hopefully attract people with new ideas about how to fix this bug. |
This commit ensures that when we call methods to change Container.stackbar we are not unintentionally invoking a Drop which kills a stackbar window that already exists. Checks have been added to make sure that we not change the value of the stackbar variable if it is already an Option::Some. re #746 re #792
This commit ensures that when we call methods to change Container.stackbar we are not unintentionally invoking a Drop which kills a stackbar window that already exists. Checks have been added to make sure that we not change the value of the stackbar variable if it is already an Option::Some. re #746 re #792
@tgrosinger I believe 611fa34 fixes the stackbar disappearing with reloads 🎉 It turns out that the stackbar windows are disappearing because of actions in various code paths that result in komorebi/komorebi/src/stackbar.rs Line 77 in 611fa34
@CtByte I don't have Zebar set up myself, but maybe you can see if this makes any difference for you? |
This commit completely removes the custom Clone and Drop trait implementation for Stackbar, and moves the handling to be explicit within container.rs, which helps us to avoid unintentional drops when the Stackbar struct is cloned for Notification events sent to subscribers such as Zebar. re #746
@CtByte 7cab062 should be the fix for Zebar as well! cc @lars-berger 🎉 |
@LGUG2Z Thank you so much for looking into this! I will validate the fix with Zebar very soon, so we can close this issue. |
@LGUG2Z I tried both ways to reproduce this issue (Zebar and #792) I can verify that the issue with the config reloading is solved. I had to add the new layout (RightMainVerticalStack) to Zebar and ran it on this rev The issue with the stackbar is solved 🎉 The only problem is that Zebar needs to be changed for the fix to take affect. So if the I can wait making the pull request until perhaps the next release of Komorebi, so then not the rev, but the tag would be used. What do you think? Can this issue be closed now or I should wait until Zebar is updated? |
I'm going to cut a release for v0.1.25 now so that it can be tagged in the PR to Zebar 🤞 |
Describe the bug
The stackbar disappears when Zebar is started.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The stackbar does not disappear.
Screenshots of the bug before and after Zebar is started
Operating System
OS Name: Microsoft Windows 11 Pro
OS Version: 10.0.22631 N/A Build 22631
komorebic check
OutputAdditional context
I built Zebar locally, since I am working on some additions to the project. There has been no updates to Zebar since I started working on it. I did not modify core features of it, just modified a provider, which makes me believe that this issue is not related to anything I did locally. However, if this issue cannot be reproduced by others or the issue is with Zebar and not Komorebi, I am more than happy to move this there instead.
Lastly, thank you for your great work on this project!
The text was updated successfully, but these errors were encountered: