-
Notifications
You must be signed in to change notification settings - Fork 38
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
Mouse not disabled on 2nd elinks instance #137
Comments
By default new ellinks connects to old elinks instance. I guess it is the case here. See man page, fragment about sessions. |
Sorry, I can see it now. On slave terminals options do not work. At at least ui.mouse_disable. |
I have two ideas. Either load_config also in slave elinks instances. I don't like it. It does not have any advantages over elinks -no-connect. Second idea is to check for existence of file, for example ~/.elinks/mouse.lock . File would be created or deleted when option is changed. File exists - mouse disabled. If second option is acceptable, I can implement it. |
…mouse_disable option. Refs #137 There is no good way to inform slave elinks instances about options. So, for mouse there is a workaround. Note, If you set ui.mouse_disable = 1 in elinks.conf manually, to get effect on 2nd ELinks instance, you must also touch ~/.elinks/mouse.lock . Changes via option manager delete or create this file automatically.
Big disclaimer that I haven't looked at the source code thoroughly. I would've thought just loading the config file in the slave instance would have been the most robust solution. The reason I didn't want to use the "-no-connect" option was because I would prefer to have runtime state synced. To me personally, the mouse.lock solution is probably good enough.
However it was unclear to me if this problem extended to other options |
This option loads config on 2nd instance of ELinks and next. It can be useful in alias.
User can make alias elinks="elinks --always-load-config 1" . I have no more ideas in this issue. |
Could I trouble you again to answer some follow up questions.
Is it really noticeably slower. It would take a negligible amount of time to read and parse the text file. Is actually applying the setting that expensive? I'm just trying to understand so I can justify the build options I package elinks with for my distro and/or explain workarounds |
2nd instance of elinks is "using" only some fragments of code mainly terminal related. The rest is handled by master session AFAIR. ui.mouse_disable is in the terminal related fragment. Other options might be accessed in main process, so there was no need to load config in 2nd instance. |
Thanks for the clarification. |
In my config I have
set ui.mouse_disable = 1
When I open elinks the mouse is disabled. Now if I open a second instance the config file isn't read the 2nd instance has mouse support.
In another experiment, I added some garbage to the config and opened 2 elink instances. Only the first one complained. Is there a reason non-master instances don't read the config file?
The text was updated successfully, but these errors were encountered: