Mercurial > hg > Applications > TreeVNC
changeset 468:f8a88cdb857b
fix retina frame buffer position
author | mir3636 |
---|---|
date | Fri, 29 Jul 2016 15:30:48 +0900 |
parents | fd803266ade7 |
children | 3332879d1bd0 |
files | src/viewer_swing/java/com/glavsoft/viewer/ConnectionPresenter.java src/viewer_swing/java/com/glavsoft/viewer/Viewer.java |
diffstat | 2 files changed, 4 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/viewer_swing/java/com/glavsoft/viewer/ConnectionPresenter.java Mon Jul 25 19:09:27 2016 +0900 +++ b/src/viewer_swing/java/com/glavsoft/viewer/ConnectionPresenter.java Fri Jul 29 15:30:48 2016 +0900 @@ -231,6 +231,7 @@ } public void showConnectionErrorDialog(String message) { + if (!isTreeVNC) return; final ConnectionView connectionView = (ConnectionView) getView(CONNECTION_VIEW); if (connectionView != null) { connectionView.showConnectionErrorDialog(message); @@ -238,6 +239,7 @@ } public void showPortErrorDialog(String message) { + if (!isTreeVNC) return; final ConnectionView connectionView = (ConnectionView) getView(CONNECTION_VIEW); if (connectionView != null) { connectionView.showErrorDialog(message);
--- a/src/viewer_swing/java/com/glavsoft/viewer/Viewer.java Mon Jul 25 19:09:27 2016 +0900 +++ b/src/viewer_swing/java/com/glavsoft/viewer/Viewer.java Fri Jul 29 15:30:48 2016 +0900 @@ -520,9 +520,7 @@ for (int i = 1; i < fbRectangles.size(); i++) { FbRectangle fbRect = fbRectangles.get(i); if (fbRectanglesPrev.getRetinaScale() != 1) { - if (fbRectanglesPrev.getX() + fbRectanglesPrev.getWidth() + 1 == fbRect.getX() && - (fbRectanglesPrev.getY() >= fbRect.getY() && fbRectanglesPrev.getY() <= fbRectanglesPrev.getY() + fbRectanglesPrev.getHeight()) || - fbRectanglesPrev.getY() > fbRect.getY() + fbRect.getHeight() && fbRectanglesPrev.getY() + fbRectanglesPrev.getHeight() < fbRectanglesPrev.getY() + fbRectanglesPrev.getHeight()) { + if (fbRectanglesPrev.x + fbRectanglesPrev.width < fbRect.x) { // previous screen is touch with this screen, fix retina scale offset retinaOffsetX += fbRectanglesPrev.getWidth() * (fbRectanglesPrev.retinaScale - 1); } @@ -543,9 +541,7 @@ for (int i = 1; i < fbRectangles.size(); i++) { FbRectangle fbRect = fbRectangles.get(i); if (fbRectanglesPrev.getRetinaScale() != 1) { - if (fbRectanglesPrev.getY() + fbRectanglesPrev.getHeight() + 1 == fbRect.getY() && - (fbRectanglesPrev.getX() >= fbRect.getX() && fbRectanglesPrev.getX() <= fbRectanglesPrev.getX() + fbRectanglesPrev.getWidth()) || - fbRectanglesPrev.getX() > fbRect.getX() + fbRect.getWidth() && fbRectanglesPrev.getX() + fbRectanglesPrev.getWidth() < fbRectanglesPrev.getX() + fbRectanglesPrev.getWidth()) { + if (fbRectanglesPrev.y + fbRectanglesPrev.height < fbRect.y) { // previous screen is touch with this screen, fix retina scale offset retinaOffsetY += fbRectanglesPrev.getHeight() * (fbRectanglesPrev.retinaScale - 1); }