GhostNaN / mpvpaper

A video wallpaper program for wlroots based wayland compositors.
GNU General Public License v3.0
805 stars 26 forks source link

Fix selecting extra monitors when the identifier is an empty string #78

Closed AliEmreSenel closed 3 months ago

AliEmreSenel commented 3 months ago

When using Hyprland, creating a headless output causes issues since it doesn't have a description by default.

This causes extra monitors to be selected since output->identifier is an empty string which results in the strstr comparison to not return NULL in these cases.

This PR addresses the problem by checking if output->identifier is empty before performing strstr.

GhostNaN commented 3 months ago

I see no issues with this PR. I would of never caught that use case. Good catch!

And thanks for making such a simple fix as well.