On Thu, 20 Apr 2023 15:27:37 GMT, Kevin Rushforth <k...@openjdk.org> wrote:
>> When the app enters full screen mode in MacBook Pro M1, there will be still >> a black strip on the top because of the notch. So assigning small value will >> not fetch green color from app window. It requires at least y=40. >> So I think we can add new static final variable with a value of 40 or 50 to >> be on the safer side and use it in all the places so that it works for all >> the cases. >> Please let me know your thought on this. > > Oh, I meant to say that you could use a small offset like 3 or 4 added to > visualBounds.minX/minY for the left and top edges. Similarly, you should use > a small offset from visualBounds.maxX/maxY for the right and bottom edges > (rather than using width / height). Updated the code to use visual bounds while calculating `x` and `y` values. Changed the offset of coordinates used for reading color to 10 since in M1 macs `robot` reads color value from the cursor position irrespective of coordinates given and cursor is parked at the bottom right corner with an offset of 5 from the visual bounds. Hence full screen tests where failing if `getMaxY()` method was used to calculate y value with lower offsets. >> If static final variable with a suitable value is added as mentioned above, >> same variable can be used here. > > Taking my previous comment to the other query into account, I think this > should be more like: > > > int x = col == 0 ? screenBound.minX + 4 : > screenBounds.maxX - 5; > > > where `screenBounds` is the visual bounds of the screen. Used visual bounds for calculating the `x` value with offset of 10. Larger offset because of the same reason as explained in previous comment. ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/1103#discussion_r1173803742 PR Review Comment: https://git.openjdk.org/jfx/pull/1103#discussion_r1173805578