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.
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
Update virtual desktop Wine plugin (use Bean) #1073
Update virtual desktop Wine plugin (use Bean) #1073
Changes from 25 commits
abc2d55
5550ad0
234ebf0
a8c2b94
2be9384
c31e67f
3781c3e
34e2cbb
66e6a80
97716b0
1169d54
1d3fd5b
903fcf8
f20ae8b
928e664
2f7fbdf
f036591
1b68bc8
e82fced
5748640
73d2f81
7271bfe
db69831
755c035
5a819b1
ef28adc
9910f44
4329f07
171df96
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
This check (and the height one afterwards) look strange to me. Normally I would expect a setter method like
setVirtualDesktop
to require a given parameter. If none is given it should fail with an error/exception.Therefore I think we should add an additional method:
@plata what do you think?
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.
@plata recommended it over
width == null
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.
My comment is not about the check itself. I think that it is a better idea to throw an error in the case that no width or height are given. I.e.:
I would like to hear @plata opinion about this :)
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.
But we are not giving screen height and width by default. Rather, the script extracts that info from the Bean. Therefore I think this solution would always throw the error.
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 is why I want to add an additional
autoSetVirtualDesktop
method that fetches width and height for you. The bigger question is: is it always the case thatsetVirtualDesktop
will be called without a width and height parameter or are there cases where the parameters are given? For example because a specific application requires a certain width and height?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 tried to test on Uplay script for Anno 2070 if giving screen dimensions would result in any undesireable outcome but every time I refres repos I get this error PhoenicisOrg/phoenicis#2036 (comment)
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 personally find that, using the screen width and height when nothing is provided in argument is an elegant way to do it. And since wine allows to set custom width and height for the virtual desktop, we should allow to do it also.