Skip to content

Commit

Permalink
8289611: MouseLocationOnScreenTest sometimes fails on Mac M1
Browse files Browse the repository at this point in the history
Reviewed-by: kcr
  • Loading branch information
andy-goryachev-oracle authored and kevinrushforth committed Jul 15, 2022
1 parent b5e4049 commit 6d76dea
Showing 1 changed file with 3 additions and 2 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -73,7 +73,8 @@ public static void initFX() {
public void testMouseLocation() throws Exception {

Screen screen = Screen.getPrimary();
Rectangle2D bounds = screen.getBounds();
// using visual bounds prevents hitting the camera notch area on newer Macs
Rectangle2D bounds = screen.getVisualBounds();
int x1 = (int) bounds.getMinX();
int x2 = (int) (x1 + bounds.getWidth() - 1);
int y1 = (int) bounds.getMinY();
Expand Down

1 comment on commit 6d76dea

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.