Skip to content

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

Open
@chmanie

Description

@chmanie

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions