changeset 10950:05836654adf3

8204635: [Linux] getMouseX, getMouseY in gtk GlassRobot.cpp ignore the HiDPI scale Reviewed-by: kcr, mbilla
author pbansal
date Mon, 18 Jun 2018 12:45:17 +0530
parents 98d380437896
children cc52395f2e3e
files modules/javafx.graphics/src/main/native-glass/gtk/GlassRobot.cpp
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/modules/javafx.graphics/src/main/native-glass/gtk/GlassRobot.cpp	Fri Jun 15 15:56:07 2018 -0700
+++ b/modules/javafx.graphics/src/main/native-glass/gtk/GlassRobot.cpp	Mon Jun 18 12:45:17 2018 +0530
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2018, 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
@@ -219,6 +219,7 @@
 
     jint x;
     glass_gdk_display_get_pointer(gdk_display_get_default(), &x, NULL);
+    x = rint(x / getUIScale());
     return x;
 }
 
@@ -235,6 +236,7 @@
 
     jint y;
     glass_gdk_display_get_pointer(gdk_display_get_default(), NULL, &y);
+    y = rint(y / getUIScale());
     return y;
 }