-
-
Notifications
You must be signed in to change notification settings - Fork 897
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
added option to choose the default monitor that the cursor will appea… #5847
Conversation
…r in upon startup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To make this one-time:
- add a
static bool once = true
inside the if and set it to false once you match one output - add a
static std::chrono::system_clock::time_point firstTimeOrSomethign = std::chrono::system_clock::now();
with the same idea and give an arbitrary max time threshold (10s should be reasonable) after which the thing disables itself
Would it be better to make this part of the monitor rules? it would probably also fix this issue:
|
don't think so, because it can only match one monitor at a time, so there is no benefit to it being a rule. |
I also saw that whenever a new window is created it doesn't follow where the mouse was. Is that related? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as it's getting quite large, I'd move it to a separate function e.g. static void checkDefaultCursorWarp
or something
you should also g_pCompositor->setactivemonitor and g_pInputManager->refocus() for that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, wiki mr needed
Does this work? |
thanks! |
Default monitor for cursor #5803
Describe your PR, what does it fix/add?
Adds an option (string) under general:default_cursor_monitor.
Then, whenever a new monitor is added, it checks whether it's name matches the above string.
If it does, then it will set the cursor to the middle of that monitor.
Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)
If the option isn't set then it functions the same as before
Also, technically if a new monitor is added after startup and it matches the name, then the cursor will be set to there.
To fix this you would need to make the code stop checking after startup or after all the initial monitors have been added.
I don't know how you would do that though
Is it ready for merging, or does it need work?
Probably, I tested it on my PC and changing the option does change which monitor the mouse appears in on startup