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

When switching to a fallback screen, Hyprland reports monitorID as null for new workspace #297

Open
chmanie opened this issue Dec 3, 2024 · 2 comments

Comments

@chmanie
Copy link

chmanie commented Dec 3, 2024

I'm not sure if I should also report it here, as I don't really know on what level this should be solved.

I'm experiencing issues when either shutting off my external display or just when it goes to sleep.

The main issue seems to be this one hyprwm/Hyprland#7608 but I'm not really sure if this is something that Hyprland will/should handle as it doesn't seem to make any promises regarding a state with no screen connected (and apparently a screen in standby):

[WARN] Unplugged last monitor, entering an unsafe state. Good luck my friend.
[LOG] Entering unsafe state

The result of that is that Hyprland creates a new workspace that temporarily does not have a monitorID:

{
    "id": 7,
    "name": "7",
    "monitor": "?",
    "monitorID": null, // <-- it is null
    "windows": 0,
    "hasfullscreen": false,
    "lastwindow": "0x0",
    "lastwindowtitle": ""
}

Which in turn causes hyprland-rs to error out. Now I'm a bit confused on where this error should be handled. It could surely be also handled on the implementor's side, although hyprland-rs makes the assumption here that monitorID is always a i128.

A result of this are errors like this one: JakeStanger/ironbar#798

Maybe you can shed some light here, I really want to help getting this fixed, but I don't know where.

@chmanie
Copy link
Author

chmanie commented Jan 3, 2025

I guess one way to go about this would be to make MonitorId an Option<i128>. This would certainly be a breaking change, but at least it would reflect what's actually happening.

@yavko
Copy link
Member

yavko commented Jan 6, 2025

If this is intended hyprland behavior I'm fine with making this a breaking change.

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

No branches or pull requests

2 participants