micha4w / Hypr-DarkWindow

Hyprland plugin to invert Colors of specific windows!
39 stars 6 forks source link

Fix build on -git #4

Closed VirtCode closed 5 months ago

VirtCode commented 5 months ago

This fixes a couple of things to work on the newest git revision. The only thing that has really changed is Hyprland's new custom shared pointers (named SP in the code), which the callback creation function now returns.

I also noticed that the activeWindow event sometimes passes a nullpointer, which would unload the plugin as it would try to work with that pointer. I honestly don't know where this nullptr is coming from, and haven't done any more investigation, but a simple if statement fixes it on our end.

I've split the whole into two separate commits, because the nullptr problem is already present in v0.40.0, but the SP were introduced afterwards. I have thus added a commit pin for that first commit and v0.40.0 in the second commit, so don't squash if you want to merge this.

micha4w commented 5 months ago

Much thanks works perfectly, I kinda broke my setup so I didn't get the time to check it out until now.. (Also thanks for the merge hint, should probably learn git correctly one day)