Skip to content

Conversation

ItsOhen
Copy link
Contributor

@ItsOhen ItsOhen commented Sep 21, 2025

Describe your PR, what does it fix/add?

Lets each monitor rule have their own additionalreservedarea so they don't have to be stored in configmanager.
Which also lets both V1 and V2 rules use addreserved and match by desc.
Fixes: #11500

Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)

V2 rules always replace rules. Which is fine i guess.

Is it ready for merging, or does it need work?

Mhm

const std::vector<SConfigOptionDescription>& getAllDescriptions();

std::unordered_map<std::string, SMonitorAdditionalReservedArea> m_mAdditionalReservedAreas;
SMonitorAdditionalReservedArea m_mAdditionalReservedArea = {};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nuke this since you moving this to rules

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kinda need it to keep a global addreservedarea state though. :/
Equivalent to what find("") did before.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont think it was a good idea, we can remove that

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okey, so i did. But a bunch of things cropped up during testing.
For example, with the way it's done now it can only match if you use the same identifier. Say monitor = desc:Samsung,addreserved and monitor = desc:Samsung,preferred, auto, 1
Any additions to another rule that match that monitor. Say monitor = DP-1,preferred, auto, 1 instead and this will tossed. Adding in a matching v2 rule will also toss it, no matter where in the config it is.
So the whole thing just feels very fragile and prob not worth it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why arent the two merged? As in:

monitor = DP-1, preferred, auto, 1, addreserved, a b c d

We could do that. In v2:

addreserved = a b c d

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

Successfully merging this pull request may close these issues.

Addreserved should also take descriptions
2 participants