-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
home-cursor: use mkRenamedOptionModule
for xsession.pointerCursor
#3545
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Unfortunately, in this case
mkAliasOptionModule
was used for a reason. If you look at the list entry below the fold in GitHub (click the ⬇) you'll notice that there is actually already a more helpful warning printed. The main difference is that it includes a reference tohome.pointerCursor.x11.enable
, which would be missing if we usemkRenamedOptionModule
.That said, I think we could get away by changing the warning text below slightly. Something simple like
may be sufficient. The other options will get their own warnings through
mkRenamedOptionModule
.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.
That said², I'm not certain why the
home.pointerCursor.x11.enable
option is there at all. Presumably the user would like to use the cursor settings wheneverconfig.xsession.enable
is set? @polykernel Can you recall why that is?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.
I did see that, that's why I said "at the cost of getting two warnings". I don't think it's too bad, although it might need a change in wording.
Probably a better solution would be to make
mkRenamedOptionModule
accept a "replacement instructions" message, just likemkRemovedOptionModule
does.But if we can just remove
home.pointerCursor.x11.enable
that's even simpler.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.
Or (assuming we do need
home.pointerCursor.x11.enable
) maybe we should indeed usemkRemovedOptionModule
and fail instead of accepting a configuration that suddenly does not have X cursors anymore (although it's probably a bit late to be revisiting the migration path for this option).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.
IIRC, the
enable
option was introduced as a toggle for each backend in case more options are added for the backend in the future.After some thought, I think each
home.pointerCursor.<backend>
can also be a nullable submodule which achieves the same functionality as theenable
option (e.g settinghome.pointerCursor.x11 = {}
would enable the x11 backend).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.
If you can submit a PR for that, that would be great! Similarly, I think the GTK backend can simply be enabled if
gtk.enable
is true. Then bothenable
options should get amkRemovedOptionModule
explaining why they've been removed.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.
When drafting the PR, I noticed that it is not possible to maintain compatibility with the old
xsession.pointerCursor
module after the removal ofx11.enable
. Since thexsession.initExtra
andxresources.properties
settings become dependent onxsession.enable
, this means it is not possible to enable the full X cursor configuration in isolation anymore which was supported byxsession.pointerCursor
. With thegtk.enable
option, the same type of issue arise because of coupled dependencies. For example, if a user wants to enable X cursor configurations viahome.pointerCursor
and hasgtk.enable
set to true only for gtk theme configuration, then the gtk cursor configuration also gets set by thehome.pointerCursor
unbeknownst to the user.Is the incompatibility introduced acceptable for the module? In any case, I have submitted a draft PR as a work in progress.
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.
Maybe it would be much simpler to keep the options, but make
x11.enable
default toconfig.xsession.enable
andgtk.enable
default toconfig.gtk.enable
. That way we don't lose backwards compatibility (although those use cases seem questionable to me) and we don't have to bother with the whole "mkRemovedOptionModule
in submodules" situation, and we don't have to tell the user to set anything else.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.
I agree. Would you be able to append the default value changes to this PR or should I make another PR?
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.
Done