Skip to content
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] "Width" setting breaks nested rofi instances in bash scripts when using the mouse. #1528

Open
griffinevans opened this issue Nov 15, 2021 · 5 comments
Labels

Comments

@griffinevans
Copy link

Rofi version (rofi -v)

1.7.0

Configuration

https://gist.github.com/griffinevans/23f1cbf7590d66ae329c6518943e94ea

Launch command

./examplescript or i3 keyboard shortcut with exec

Step to reproduce

How to reproduce with the above config files:

  1. Execute the script to view the first rofi bar.
  2. Select 1 by double-clicking with the mouse, not by pressing enter.

Expected behavior

I would expect the second rofi menu to launch with a width of 100 and otherwise-default settings.

Actual behavior

The second rofi menu terminates immediately; its output is null; sometimes the second rofi menu flashes across the screen for a fraction of a second before disappearing, which is why I believe it is launching and then terminating immediately as opposed to not launching at all.

Additional information

This bug happens when a bash script executes a rofi instance from the output of a rofi instance, like in the case statement above. When the nested rofi instance is executed, if its theme (example.rasi) has a "width: " parameter AND the rofi instance was launched by mouse click, not keyboard press, the second rofi instance will launch and then immediately terminate.

If I change nothing else except deleting the width parameter, the second rofi instance launches fine. I have tested this with less minimal configurations with many more parameters, but "width" was the only one I observed causing issues.

@DaveDavenport
Copy link
Collaborator

DaveDavenport commented Nov 15, 2021

nested rofi are not supported.

I wonder if the mouse release get caught by the 2nd rofi and it interpreters it to be a click outside the window (and therefor closes)

Can you try to pass '-no-click-to-exit' to the 2nd rofi.

@griffinevans
Copy link
Author

Passing '-no-click-to-exit' on the second call fixes it. Thank you! I can't believe you spotted that so quick after I spent 3 hours trying to figure it out! And as for nested rofi not being supported, I guess I should learn my lesson about copying random people's code from the internet...

@DaveDavenport
Copy link
Collaborator

DaveDavenport commented Nov 15, 2021

I don't think you are not nesting rofi, so that is no problem. Just wanted to highlight it as it is called this in title..

I think I should take a peek if we can fix this ssue.

@DaveDavenport DaveDavenport reopened this Nov 15, 2021
@joaopauloalbq
Copy link

Additional information

Rofi won't close if the mouse is over it.

SSR-2022-10-26_02.36.16.mp4

@DaveDavenport
Copy link
Collaborator

DaveDavenport commented Nov 19, 2022

That matches exactly with my first remark on Nov 15, 2021.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants