Mercurial > hg > Members > riono > TreeVNC_ja_comment
changeset 410:da1d6d6b4981
Enable retina scale to fit screen
author | innparusu |
---|---|
date | Thu, 19 Nov 2015 15:19:29 +0900 |
parents | 0aab561a8cf4 |
children | 4a925e55afd6 |
files | .idea/workspace.xml src/main/java/jp/ac/u_ryukyu/treevnc/ScreenChangeRequest.java src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java |
diffstat | 4 files changed, 289 insertions(+), 152 deletions(-) [+] |
line wrap: on
line diff
--- a/.idea/workspace.xml Thu Nov 19 14:43:30 2015 +0900 +++ b/.idea/workspace.xml Thu Nov 19 15:19:29 2015 +0900 @@ -2,8 +2,10 @@ <project version="4"> <component name="ChangeListManager"> <list default="true" id="0a04b9e3-21eb-43ee-b441-59e664eecd89" name="Default" comment="settingsChanged"> - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/test/IsRetina.java" afterPath="$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/test/IsRetina.java" /> - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/gradle.xml" afterPath="$PROJECT_DIR$/.idea/gradle.xml" /> + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/ScreenChangeRequest.java" afterPath="$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/ScreenChangeRequest.java" /> + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java" afterPath="$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java" /> + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java" afterPath="$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java" /> + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" /> </list> <ignored path="TreeVNC.iws" /> <ignored path=".idea/workspace.xml" /> @@ -44,8 +46,18 @@ <file leaf-file-name="Viewer.java" pinned="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/Viewer.java"> <provider selected="true" editor-type-id="text-editor"> - <state vertical-scroll-proportion="0.0" vertical-offset="1650" max-vertical-offset="6630"> - <caret line="152" column="35" selection-start-line="152" selection-start-column="35" selection-end-line="152" selection-end-column="35" /> + <state vertical-scroll-proportion="0.0" vertical-offset="4509" max-vertical-offset="8379"> + <caret line="307" column="5" selection-start-line="307" selection-start-column="5" selection-end-line="307" selection-end-column="5" /> + <folding /> + </state> + </provider> + </entry> + </file> + <file leaf-file-name="SenderTask.java" pinned="false" current-in-tab="true"> + <entry file="file://$PROJECT_DIR$/src/main/java/com/glavsoft/rfb/protocol/SenderTask.java"> + <provider selected="true" editor-type-id="text-editor"> + <state vertical-scroll-proportion="0.505618" vertical-offset="0" max-vertical-offset="1424"> + <caret line="76" column="0" selection-start-line="76" selection-start-column="0" selection-end-line="76" selection-end-column="0" /> <folding /> </state> </provider> @@ -98,16 +110,31 @@ <provider selected="true" editor-type-id="text-editor"> <state vertical-scroll-proportion="0.0" vertical-offset="3585" max-vertical-offset="4830"> <caret line="257" column="40" selection-start-line="257" selection-start-column="40" selection-end-line="257" selection-end-column="40" /> - <folding /> + <folding> + <element signature="imports" expanded="false" /> + <element signature="e#2256#2283#0" expanded="false" /> + <element signature="e#2346#2364#0" expanded="false" /> + <element signature="e#5490#5491#0" expanded="false" /> + <element signature="e#5515#5516#0" expanded="false" /> + <element signature="e#5587#5588#0" expanded="false" /> + <element signature="e#5637#5638#0" expanded="false" /> + <element signature="e#5705#5706#0" expanded="false" /> + <element signature="e#5753#5754#0" expanded="false" /> + <element signature="e#10490#10508#0" expanded="false" /> + <element signature="e#14383#14384#0" expanded="false" /> + <element signature="e#14433#14434#0" expanded="false" /> + <element signature="e#14671#14672#0" expanded="false" /> + <element signature="e#14715#14716#0" expanded="false" /> + </folding> </state> </provider> </entry> </file> - <file leaf-file-name="ConnectionView.java" pinned="false" current-in-tab="true"> + <file leaf-file-name="ConnectionView.java" pinned="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/swing/gui/ConnectionView.java"> <provider selected="true" editor-type-id="text-editor"> - <state vertical-scroll-proportion="0.032738097" vertical-offset="4254" max-vertical-offset="6270"> - <caret line="346" column="5" selection-start-line="346" selection-start-column="5" selection-end-line="346" selection-end-column="5" /> + <state vertical-scroll-proportion="0.0" vertical-offset="4089" max-vertical-offset="6270"> + <caret line="346" column="64" selection-start-line="346" selection-start-column="64" selection-end-line="346" selection-end-column="64" /> <folding /> </state> </provider> @@ -120,7 +147,7 @@ <file leaf-file-name="SwingNetworkConnectionWorker.java" pinned="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingNetworkConnectionWorker.java"> <provider selected="true" editor-type-id="text-editor"> - <state vertical-scroll-proportion="0.0" vertical-offset="1470" max-vertical-offset="2655"> + <state vertical-scroll-proportion="0.0" vertical-offset="921" max-vertical-offset="2655"> <caret line="120" column="0" selection-start-line="120" selection-start-column="0" selection-end-line="120" selection-end-column="0" /> <folding> <element signature="imports" expanded="true" /> @@ -132,8 +159,27 @@ <file leaf-file-name="SwingViewerWindow.java" pinned="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java"> <provider selected="true" editor-type-id="text-editor"> - <state vertical-scroll-proportion="0.0" vertical-offset="12315" max-vertical-offset="15390"> - <caret line="850" column="21" selection-start-line="850" selection-start-column="21" selection-end-line="850" selection-end-column="21" /> + <state vertical-scroll-proportion="-1.075" vertical-offset="14573" max-vertical-offset="16794"> + <caret line="958" column="52" selection-start-line="958" selection-start-column="52" selection-end-line="958" selection-end-column="52" /> + <folding> + <element signature="e#32009#32461#0" expanded="true" /> + <element signature="e#32460#32461#0" expanded="true" /> + <element signature="e#33225#34026#0" expanded="true" /> + <element signature="e#34025#34026#0" expanded="true" /> + <element signature="e#34544#34845#0" expanded="true" /> + <element signature="e#34844#34845#0" expanded="true" /> + <element signature="e#35460#35857#0" expanded="true" /> + <element signature="e#35856#35857#0" expanded="true" /> + </folding> + </state> + </provider> + </entry> + </file> + <file leaf-file-name="TreeViewer.java" pinned="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/TreeViewer.java"> + <provider selected="true" editor-type-id="text-editor"> + <state vertical-scroll-proportion="-1.15" vertical-offset="1679" max-vertical-offset="3270"> + <caret line="120" column="31" selection-start-line="120" selection-start-column="31" selection-end-line="120" selection-end-column="31" /> <folding /> </state> </provider> @@ -144,7 +190,13 @@ <provider selected="true" editor-type-id="text-editor"> <state vertical-scroll-proportion="0.0" vertical-offset="1320" max-vertical-offset="1620"> <caret line="122" column="23" selection-start-line="122" selection-start-column="23" selection-end-line="122" selection-end-column="23" /> - <folding /> + <folding> + <element signature="e#0#5110#0" expanded="false" /> + <element signature="imports" expanded="false" /> + <element signature="e#2407#2438#0" expanded="false" /> + <element signature="e#2997#3433#0" expanded="false" /> + <element signature="e#3432#3433#0" expanded="false" /> + </folding> </state> </provider> </entry> @@ -152,20 +204,22 @@ <file leaf-file-name="ScreenChangeRequest.java" pinned="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/ScreenChangeRequest.java"> <provider selected="true" editor-type-id="text-editor"> - <state vertical-scroll-proportion="0.0" vertical-offset="330" max-vertical-offset="870"> - <caret line="27" column="0" selection-start-line="27" selection-start-column="0" selection-end-line="27" selection-end-column="0" /> + <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="915"> + <caret line="40" column="66" selection-start-line="40" selection-start-column="66" selection-end-line="40" selection-end-column="66" /> <folding /> </state> </provider> </entry> </file> - <file leaf-file-name="TreeRFBProto.java" pinned="false" current-in-tab="false"> + <file leaf-file-name="TreeRFBProto.java" pinned="false" current-in-tab="true"> <entry file="file://$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java"> <provider selected="true" editor-type-id="text-editor"> - <state vertical-scroll-proportion="0.0" vertical-offset="2850" max-vertical-offset="13065"> - <caret line="201" column="32" selection-start-line="201" selection-start-column="32" selection-end-line="201" selection-end-column="32" /> + <state vertical-scroll-proportion="9.394047" vertical-offset="3265" max-vertical-offset="17620"> + <caret line="918" column="5" selection-start-line="918" selection-start-column="5" selection-end-line="918" selection-end-column="5" /> <folding> <element signature="imports" expanded="true" /> + <element signature="e#34451#34452#0" expanded="true" /> + <element signature="e#34485#34486#0" expanded="true" /> </folding> </state> </provider> @@ -174,8 +228,8 @@ <file leaf-file-name="ConnectionPresenter.java" pinned="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/ConnectionPresenter.java"> <provider selected="true" editor-type-id="text-editor"> - <state vertical-scroll-proportion="0.0" vertical-offset="2055" max-vertical-offset="5145"> - <caret line="169" column="0" selection-start-line="169" selection-start-column="0" selection-end-line="169" selection-end-column="0" /> + <state vertical-scroll-proportion="0.0" vertical-offset="1390" max-vertical-offset="5145"> + <caret line="161" column="0" selection-start-line="161" selection-start-column="0" selection-end-line="161" selection-end-column="0" /> <folding> <element signature="imports" expanded="true" /> </folding> @@ -183,16 +237,6 @@ </provider> </entry> </file> - <file leaf-file-name="ViewerInterface.java" pinned="false" current-in-tab="false"> - <entry file="file://$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/ViewerInterface.java"> - <provider selected="true" editor-type-id="text-editor"> - <state vertical-scroll-proportion="0.0" vertical-offset="450" max-vertical-offset="870"> - <caret line="38" column="16" selection-start-line="38" selection-start-column="16" selection-end-line="38" selection-end-column="16" /> - <folding /> - </state> - </provider> - </entry> - </file> <file leaf-file-name="ReceiverTask.java" pinned="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java"> <provider selected="true" editor-type-id="text-editor"> @@ -213,11 +257,11 @@ </provider> </entry> </file> - <file leaf-file-name="IsRetina.java" pinned="false" current-in-tab="true"> + <file leaf-file-name="IsRetina.java" pinned="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/test/IsRetina.java"> <provider selected="true" editor-type-id="text-editor"> - <state vertical-scroll-proportion="0.1140873" vertical-offset="0" max-vertical-offset="2016"> - <caret line="12" column="41" selection-start-line="12" selection-start-column="41" selection-end-line="12" selection-end-column="41" /> + <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="943"> + <caret line="16" column="17" selection-start-line="14" selection-start-column="0" selection-end-line="32" selection-end-column="21" /> <folding /> </state> </provider> @@ -531,14 +575,14 @@ <option value="$PROJECT_DIR$/src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java" /> <option value="$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/CreateConnectionParam.java" /> <option value="$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/TreeVncRootSelectionPanel.java" /> - <option value="$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/ScreenChangeRequest.java" /> <option value="$PROJECT_DIR$/src/main/java/com/glavsoft/rfb/encoding/decoder/ZlibDecoder.java" /> - <option value="$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java" /> <option value="$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/ConnectionPresenter.java" /> <option value="$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/swing/gui/ConnectionView.java" /> - <option value="$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java" /> <option value="$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/ScreenChangeSelectionPanel.java" /> <option value="$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/test/IsRetina.java" /> + <option value="$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/ScreenChangeRequest.java" /> + <option value="$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java" /> + <option value="$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java" /> </list> </option> </component> @@ -937,7 +981,7 @@ <property name="settings.editor.selected.configurable" value="preferences.editor" /> <property name="settings.editor.splitter.proportion" value="0.2" /> </component> - <component name="RunManager" selected="Application.IsRetina"> + <component name="RunManager" selected="Application.TreeeViewer -d"> <configuration default="false" name="TreeViewer" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true"> <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea"> <pattern> @@ -1206,8 +1250,8 @@ </list> <recent_temporary> <list size="2"> - <item index="0" class="java.lang.String" itemvalue="Application.IsRetina" /> - <item index="1" class="java.lang.String" itemvalue="Application.TreeViewer" /> + <item index="0" class="java.lang.String" itemvalue="Application.TreeViewer" /> + <item index="1" class="java.lang.String" itemvalue="Application.IsRetina" /> </list> </recent_temporary> </component> @@ -1254,7 +1298,7 @@ <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32988676" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> - <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.1792976" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> + <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.17881438" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" /> <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" /> <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> @@ -1266,8 +1310,8 @@ <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> <window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.18039624" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" /> - <window_info id="Run" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.2809612" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> - <window_info id="Hierarchy" active="true" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.1743215" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" /> + <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.17413972" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" /> + <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.28765792" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" /> <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32928017" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> @@ -1332,7 +1376,7 @@ </line-breakpoint> <line-breakpoint type="java-line"> <url>file://$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java</url> - <line>877</line> + <line>878</line> <properties /> <option name="timeStamp" value="31" /> </line-breakpoint> @@ -1350,7 +1394,7 @@ </line-breakpoint> <line-breakpoint type="java-line"> <url>file://$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java</url> - <line>524</line> + <line>526</line> <properties /> <option name="timeStamp" value="76" /> </line-breakpoint> @@ -1458,13 +1502,13 @@ </line-breakpoint> <line-breakpoint type="java-line"> <url>file://$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java</url> - <line>922</line> + <line>931</line> <properties /> <option name="timeStamp" value="186" /> </line-breakpoint> <line-breakpoint type="java-line"> <url>file://$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java</url> - <line>941</line> + <line>951</line> <properties /> <option name="timeStamp" value="187" /> </line-breakpoint> @@ -1518,13 +1562,13 @@ </line-breakpoint> <line-breakpoint type="java-line"> <url>file://$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java</url> - <line>926</line> + <line>935</line> <properties /> <option name="timeStamp" value="209" /> </line-breakpoint> <line-breakpoint type="java-line"> <url>file://$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java</url> - <line>490</line> + <line>492</line> <properties /> <option name="timeStamp" value="212" /> </line-breakpoint> @@ -1536,7 +1580,7 @@ </line-breakpoint> <line-breakpoint type="java-line"> <url>file://$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java</url> - <line>952</line> + <line>962</line> <properties /> <option name="timeStamp" value="217" /> </line-breakpoint> @@ -1554,13 +1598,13 @@ </line-breakpoint> <line-breakpoint type="java-line"> <url>file://$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java</url> - <line>321</line> + <line>323</line> <properties /> <option name="timeStamp" value="228" /> </line-breakpoint> <line-breakpoint type="java-line"> <url>file://$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java</url> - <line>800</line> + <line>802</line> <properties /> <option name="timeStamp" value="230" /> </line-breakpoint> @@ -1572,7 +1616,7 @@ </line-breakpoint> <line-breakpoint enabled="true" type="java-line"> <url>file://$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java</url> - <line>201</line> + <line>202</line> <properties /> <option name="timeStamp" value="248" /> </line-breakpoint> @@ -1602,23 +1646,17 @@ </line-breakpoint> <line-breakpoint enabled="true" type="java-line"> <url>file://$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/ScreenChangeRequest.java</url> - <line>27</line> + <line>28</line> <properties /> <option name="timeStamp" value="260" /> </line-breakpoint> <line-breakpoint enabled="true" type="java-line"> <url>file://$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java</url> - <line>638</line> + <line>640</line> <properties /> <option name="timeStamp" value="264" /> </line-breakpoint> <line-breakpoint enabled="true" type="java-line"> - <url>file://$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java</url> - <line>935</line> - <properties /> - <option name="timeStamp" value="265" /> - </line-breakpoint> - <line-breakpoint enabled="true" type="java-line"> <url>file://$PROJECT_DIR$/src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java</url> <line>163</line> <properties /> @@ -1630,11 +1668,23 @@ <properties /> <option name="timeStamp" value="272" /> </line-breakpoint> + <line-breakpoint enabled="true" type="java-line"> + <url>file://$PROJECT_DIR$/src/main/java/com/glavsoft/rfb/protocol/SenderTask.java</url> + <line>64</line> + <properties /> + <option name="timeStamp" value="276" /> + </line-breakpoint> + <line-breakpoint enabled="true" type="java-line"> + <url>file://$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/ScreenChangeRequest.java</url> + <line>41</line> + <properties /> + <option name="timeStamp" value="277" /> + </line-breakpoint> </breakpoints> <breakpoints-dialog> <breakpoints-dialog /> </breakpoints-dialog> - <option name="time" value="275" /> + <option name="time" value="278" /> </breakpoint-manager> <watches-manager /> </component> @@ -1643,14 +1693,6 @@ <option name="FILTER_TARGETS" value="false" /> </component> <component name="editorHistoryManager"> - <entry file="file://$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/swing/gui/ConnectionView.java"> - <provider selected="true" editor-type-id="text-editor"> - <state vertical-scroll-proportion="0.0" vertical-offset="4260" max-vertical-offset="6210"> - <caret line="342" column="5" selection-start-line="342" selection-start-column="5" selection-end-line="342" selection-end-column="5" /> - <folding /> - </state> - </provider> - </entry> <entry file="file://$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingNetworkConnectionWorker.java"> <provider selected="true" editor-type-id="text-editor"> <state vertical-scroll-proportion="0.0" vertical-offset="1470" max-vertical-offset="2655"> @@ -1665,7 +1707,16 @@ <provider selected="true" editor-type-id="text-editor"> <state vertical-scroll-proportion="0.0" vertical-offset="10575" max-vertical-offset="13260"> <caret line="852" column="21" selection-start-line="852" selection-start-column="21" selection-end-line="852" selection-end-column="21" /> - <folding /> + <folding> + <element signature="e#32009#32461#0" expanded="true" /> + <element signature="e#32460#32461#0" expanded="true" /> + <element signature="e#33225#34026#0" expanded="true" /> + <element signature="e#34025#34026#0" expanded="true" /> + <element signature="e#34544#34845#0" expanded="true" /> + <element signature="e#34844#34845#0" expanded="true" /> + <element signature="e#35460#35857#0" expanded="true" /> + <element signature="e#35856#35857#0" expanded="true" /> + </folding> </state> </provider> </entry> @@ -1673,7 +1724,13 @@ <provider selected="true" editor-type-id="text-editor"> <state vertical-scroll-proportion="0.0" vertical-offset="1320" max-vertical-offset="1620"> <caret line="122" column="23" selection-start-line="122" selection-start-column="23" selection-end-line="122" selection-end-column="23" /> - <folding /> + <folding> + <element signature="e#0#5110#0" expanded="false" /> + <element signature="imports" expanded="false" /> + <element signature="e#2407#2438#0" expanded="false" /> + <element signature="e#2997#3433#0" expanded="false" /> + <element signature="e#3432#3433#0" expanded="false" /> + </folding> </state> </provider> </entry> @@ -1691,6 +1748,8 @@ <caret line="201" column="32" selection-start-line="201" selection-start-column="32" selection-end-line="201" selection-end-column="32" /> <folding> <element signature="imports" expanded="true" /> + <element signature="e#34451#34452#0" expanded="true" /> + <element signature="e#34485#34486#0" expanded="true" /> </folding> </state> </provider> @@ -1718,7 +1777,7 @@ <state vertical-scroll-proportion="0.0" vertical-offset="2835" max-vertical-offset="3480"> <caret line="225" column="0" selection-start-line="225" selection-start-column="0" selection-end-line="225" selection-end-column="0" /> <folding> - <element signature="e#8970#8971#0" expanded="true" /> + <element signature="e#8970#8971#0" expanded="false" /> </folding> </state> </provider> @@ -1861,7 +1920,22 @@ <provider selected="true" editor-type-id="text-editor"> <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="0"> <caret line="257" column="40" selection-start-line="257" selection-start-column="40" selection-end-line="257" selection-end-column="40" /> - <folding /> + <folding> + <element signature="imports" expanded="false" /> + <element signature="e#2256#2283#0" expanded="false" /> + <element signature="e#2346#2364#0" expanded="false" /> + <element signature="e#5490#5491#0" expanded="false" /> + <element signature="e#5515#5516#0" expanded="false" /> + <element signature="e#5587#5588#0" expanded="false" /> + <element signature="e#5637#5638#0" expanded="false" /> + <element signature="e#5705#5706#0" expanded="false" /> + <element signature="e#5753#5754#0" expanded="false" /> + <element signature="e#10490#10508#0" expanded="false" /> + <element signature="e#14383#14384#0" expanded="false" /> + <element signature="e#14433#14434#0" expanded="false" /> + <element signature="e#14671#14672#0" expanded="false" /> + <element signature="e#14715#14716#0" expanded="false" /> + </folding> </state> </provider> </entry> @@ -1907,8 +1981,8 @@ <state vertical-scroll-proportion="0.13187855" vertical-offset="0" max-vertical-offset="0"> <caret line="113" column="15" selection-start-line="113" selection-start-column="15" selection-end-line="113" selection-end-column="15" /> <folding> - <element signature="e#3715#3716#0" expanded="true" /> - <element signature="e#3790#3791#0" expanded="true" /> + <element signature="e#3715#3716#0" expanded="false" /> + <element signature="e#3790#3791#0" expanded="false" /> </folding> </state> </provider> @@ -1938,31 +2012,16 @@ </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/src/main/java/com/glavsoft/rfb/protocol/SenderTask.java"> - <provider selected="true" editor-type-id="text-editor"> - <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="0"> - <caret line="62" column="36" selection-start-line="62" selection-start-column="36" selection-end-line="62" selection-end-column="36" /> - </state> - </provider> - </entry> <entry file="file://$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/mvp/Presenter.java"> <provider selected="true" editor-type-id="text-editor"> <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="0"> <caret line="225" column="0" selection-start-line="225" selection-start-column="0" selection-end-line="225" selection-end-column="0" /> <folding> - <element signature="e#8970#8971#0" expanded="true" /> + <element signature="e#8970#8971#0" expanded="false" /> </folding> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/ViewerInterface.java"> - <provider selected="true" editor-type-id="text-editor"> - <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="0"> - <caret line="38" column="16" selection-start-line="38" selection-start-column="16" selection-end-line="38" selection-end-column="16" /> - <folding /> - </state> - </provider> - </entry> <entry file="file://$PROJECT_DIR$/src/main/java/com/glavsoft/rfb/protocol/Protocol.java"> <provider selected="true" editor-type-id="text-editor"> <state vertical-scroll-proportion="0.33255813" vertical-offset="0" max-vertical-offset="0"> @@ -1979,72 +2038,48 @@ </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/Viewer.java"> - <provider selected="true" editor-type-id="text-editor"> - <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="0"> - <caret line="152" column="35" selection-start-line="152" selection-start-column="35" selection-end-line="152" selection-end-column="35" /> - <folding /> - </state> - </provider> - </entry> <entry file="file://$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/swing/Utils.java"> <provider selected="true" editor-type-id="text-editor"> <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="0"> <caret line="122" column="23" selection-start-line="122" selection-start-column="23" selection-end-line="122" selection-end-column="23" /> - <folding /> - </state> - </provider> - </entry> - <entry file="file://$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java"> - <provider selected="true" editor-type-id="text-editor"> - <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="0"> - <caret line="201" column="32" selection-start-line="201" selection-start-column="32" selection-end-line="201" selection-end-column="32" /> <folding> - <element signature="imports" expanded="true" /> + <element signature="e#0#5110#0" expanded="false" /> + <element signature="imports" expanded="false" /> + <element signature="e#2407#2438#0" expanded="false" /> + <element signature="e#2997#3433#0" expanded="false" /> + <element signature="e#3432#3433#0" expanded="false" /> </folding> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/ConnectionPresenter.java"> - <provider selected="true" editor-type-id="text-editor"> - <state vertical-scroll-proportion="0.0" vertical-offset="2055" max-vertical-offset="5145"> - <caret line="169" column="0" selection-start-line="169" selection-start-column="0" selection-end-line="169" selection-end-column="0" /> - <folding> - <element signature="imports" expanded="true" /> - </folding> - </state> - </provider> - </entry> - <entry file="file://$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingNetworkConnectionWorker.java"> + <entry file="file://$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/ViewerInterface.java"> <provider selected="true" editor-type-id="text-editor"> - <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="0"> - <caret line="120" column="0" selection-start-line="120" selection-start-column="0" selection-end-line="120" selection-end-column="0" /> - <folding> - <element signature="imports" expanded="true" /> - </folding> - </state> - </provider> - </entry> - <entry file="file://$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/ScreenChangeRequest.java"> - <provider selected="true" editor-type-id="text-editor"> - <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="0"> - <caret line="27" column="0" selection-start-line="27" selection-start-column="0" selection-end-line="27" selection-end-column="0" /> + <state vertical-scroll-proportion="0.2503477" vertical-offset="0" max-vertical-offset="1438"> + <caret line="32" column="16" selection-start-line="32" selection-start-column="16" selection-end-line="32" selection-end-column="16" /> <folding /> </state> </provider> </entry> <entry file="file://$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/swing/gui/ConnectionView.java"> <provider selected="true" editor-type-id="text-editor"> - <state vertical-scroll-proportion="0.032738097" vertical-offset="4254" max-vertical-offset="6270"> - <caret line="346" column="5" selection-start-line="346" selection-start-column="5" selection-end-line="346" selection-end-column="5" /> + <state vertical-scroll-proportion="0.0" vertical-offset="4089" max-vertical-offset="6270"> + <caret line="346" column="64" selection-start-line="346" selection-start-column="64" selection-end-line="346" selection-end-column="64" /> <folding /> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java"> + <entry file="file://$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/TreeViewer.java"> <provider selected="true" editor-type-id="text-editor"> - <state vertical-scroll-proportion="0.0" vertical-offset="12315" max-vertical-offset="15390"> - <caret line="850" column="21" selection-start-line="850" selection-start-column="21" selection-end-line="850" selection-end-column="21" /> + <state vertical-scroll-proportion="-1.15" vertical-offset="1679" max-vertical-offset="3270"> + <caret line="120" column="31" selection-start-line="120" selection-start-column="31" selection-end-line="120" selection-end-column="31" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/test/IsRetina.java"> + <provider selected="true" editor-type-id="text-editor"> + <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="943"> + <caret line="16" column="17" selection-start-line="14" selection-start-column="0" selection-end-line="32" selection-end-column="21" /> <folding /> </state> </provider> @@ -2057,14 +2092,79 @@ </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/test/IsRetina.java"> + <entry file="file://$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/Viewer.java"> + <provider selected="true" editor-type-id="text-editor"> + <state vertical-scroll-proportion="0.0" vertical-offset="4509" max-vertical-offset="8379"> + <caret line="307" column="5" selection-start-line="307" selection-start-column="5" selection-end-line="307" selection-end-column="5" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java"> + <provider selected="true" editor-type-id="text-editor"> + <state vertical-scroll-proportion="-1.075" vertical-offset="14573" max-vertical-offset="16794"> + <caret line="958" column="52" selection-start-line="958" selection-start-column="52" selection-end-line="958" selection-end-column="52" /> + <folding> + <element signature="e#32009#32461#0" expanded="true" /> + <element signature="e#32460#32461#0" expanded="true" /> + <element signature="e#33225#34026#0" expanded="true" /> + <element signature="e#34025#34026#0" expanded="true" /> + <element signature="e#34544#34845#0" expanded="true" /> + <element signature="e#34844#34845#0" expanded="true" /> + <element signature="e#35460#35857#0" expanded="true" /> + <element signature="e#35856#35857#0" expanded="true" /> + </folding> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/ConnectionPresenter.java"> <provider selected="true" editor-type-id="text-editor"> - <state vertical-scroll-proportion="0.1140873" vertical-offset="0" max-vertical-offset="2016"> - <caret line="12" column="41" selection-start-line="12" selection-start-column="41" selection-end-line="12" selection-end-column="41" /> + <state vertical-scroll-proportion="0.0" vertical-offset="1390" max-vertical-offset="5145"> + <caret line="161" column="0" selection-start-line="161" selection-start-column="0" selection-end-line="161" selection-end-column="0" /> + <folding> + <element signature="imports" expanded="true" /> + </folding> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingNetworkConnectionWorker.java"> + <provider selected="true" editor-type-id="text-editor"> + <state vertical-scroll-proportion="0.0" vertical-offset="921" max-vertical-offset="2655"> + <caret line="120" column="0" selection-start-line="120" selection-start-column="0" selection-end-line="120" selection-end-column="0" /> + <folding> + <element signature="imports" expanded="true" /> + </folding> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/ScreenChangeRequest.java"> + <provider selected="true" editor-type-id="text-editor"> + <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="915"> + <caret line="40" column="66" selection-start-line="40" selection-start-column="66" selection-end-line="40" selection-end-column="66" /> <folding /> </state> </provider> </entry> + <entry file="file://$PROJECT_DIR$/src/main/java/com/glavsoft/rfb/protocol/SenderTask.java"> + <provider selected="true" editor-type-id="text-editor"> + <state vertical-scroll-proportion="0.505618" vertical-offset="0" max-vertical-offset="1424"> + <caret line="76" column="0" selection-start-line="76" selection-start-column="0" selection-end-line="76" selection-end-column="0" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java"> + <provider selected="true" editor-type-id="text-editor"> + <state vertical-scroll-proportion="9.394047" vertical-offset="3265" max-vertical-offset="17620"> + <caret line="918" column="5" selection-start-line="918" selection-start-column="5" selection-end-line="918" selection-end-column="5" /> + <folding> + <element signature="imports" expanded="true" /> + <element signature="e#34451#34452#0" expanded="true" /> + <element signature="e#34485#34486#0" expanded="true" /> + </folding> + </state> + </provider> + </entry> </component> <component name="hg4idea.settings"> <option name="CHECK_INCOMING_OUTGOING" value="true" />
--- a/src/main/java/jp/ac/u_ryukyu/treevnc/ScreenChangeRequest.java Thu Nov 19 14:43:30 2015 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/ScreenChangeRequest.java Thu Nov 19 15:19:29 2015 +0900 @@ -18,25 +18,27 @@ */ public class ScreenChangeRequest implements ClientToServerMessage { final String bytes; - private short id; + private final int scale; + private short id; private int frameSizeWidth; private int frameSizeHeight; private int port; private int shareScreenNumber; - public ScreenChangeRequest(String adr, int port, short id, int width, int height, int shareScreenNumber) { + public ScreenChangeRequest(String adr, int port, short id, int width, int height, int shareScreenNumber, int scale) { this.bytes = adr; this.port = port; this.id = id; this.frameSizeWidth = width; this.frameSizeHeight = height; this.shareScreenNumber = shareScreenNumber; + this.scale = scale; System.out.println("Client send change screen server request :" + adr); } @Override public void send(Writer writer) throws TransportException { - ByteBuffer out = ByteBuffer.allocate(bytes.length()+25); + ByteBuffer out = ByteBuffer.allocate(bytes.length()+29); out.order(ByteOrder.BIG_ENDIAN); out.put(SERVER_CHANGE_REQUEST); out.put((byte)0); // padding @@ -47,6 +49,7 @@ out.putInt(frameSizeHeight); out.putInt(port); out.putInt(shareScreenNumber); + out.putInt(scale); writer.write(out.array(), 0, out.position()); writer.flush(); }
--- a/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java Thu Nov 19 14:43:30 2015 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java Thu Nov 19 15:19:29 2015 +0900 @@ -79,6 +79,7 @@ private byte[] originalInitData = null; private boolean childrenMulticast = true; + private int retinaScale; public TreeRFBProto(boolean isTreeManager, ViewerInterface viewer) { rThread = new RequestScreenThread(this); @@ -216,8 +217,9 @@ int frameSizeHeight = buf.getInt(); int port = buf.getInt(); int shareScreenNumber = buf.getInt(); + int scale = buf.getInt(); System.out.println("Root server change request :" + newHostName + " : " + port); - changeVNCServer(viewer, newHostName, port, frameSizeWidth, frameSizeHeight, shareScreenNumber, id, is, os); + changeVNCServer(viewer, newHostName, port, frameSizeWidth, frameSizeHeight, shareScreenNumber, scale, id, is, os); } else { continue; } @@ -795,14 +797,15 @@ * @param is * @param os */ - public void changeVNCServer(ViewerInterface vncProxyService, String hostName, int port, int width, int height, int shareScreenNumber, short newVNCServerId, Reader is, Writer os) + public void changeVNCServer(ViewerInterface vncProxyService, String hostName, int port, int width, int height, int shareScreenNumber, int scale, short newVNCServerId, Reader is, Writer os) throws IOException { this.frameSizeWidth = width; this.frameSizeHeight = height; this.shareScreenNumber = shareScreenNumber; - singleWidth = frameSizeWidth; - singleHeight = frameSizeHeight; + this.singleWidth = frameSizeWidth; + this.singleHeight = frameSizeHeight; + this.retinaScale = scale; if (newVNCServerId == -1) { // change to the tree vnc root on other network. vncProxyService.changeToDirectConnectedServer(hostName, is, os); @@ -910,6 +913,12 @@ return shareScreenNumber; } + + public int getRetinaScale() { + return retinaScale; + } + + public boolean hasParent() { return id != -1; } @@ -925,7 +934,8 @@ */ public void exchangeDirectConnectedServer(Reader previousReader, Writer previousWriter) { String adr = viewer.getRfb().getMyAddress(); - ScreenChangeRequest scr = new ScreenChangeRequest(adr, ConnectionParams.DEFAULT_VNC_ROOT, (short) -1, singleWidth, singleHeight, shareScreenNumber); + int scale = viewer.getRfb().getRetinaScale(); + ScreenChangeRequest scr = new ScreenChangeRequest(adr, ConnectionParams.DEFAULT_VNC_ROOT, (short) -1, singleWidth, singleHeight, shareScreenNumber, scale); try { scr.send(previousWriter); } catch (TransportException e) {
--- a/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java Thu Nov 19 14:43:30 2015 +0900 +++ b/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java Thu Nov 19 15:19:29 2015 +0900 @@ -41,6 +41,7 @@ import java.awt.*; import java.awt.event.*; +import java.lang.reflect.Field; import java.net.Socket; import java.util.ArrayList; import java.util.LinkedList; @@ -916,22 +917,45 @@ int leftScreenNumber = 0; int singleWidth = (int) (rectangles.get(leftScreenNumber).getWidth() * scaleFactor); int singleHeight = (int) (rectangles.get(leftScreenNumber).getHeight() * scaleFactor); + int scale = retinaScale(); viewer.getRfb().setSingleDisplaySize(singleWidth, singleHeight); if (viewer.getRfb().hasParent()) { String adr = viewer.getRfb().getMyAddress(); if (scanPort(adr, ConnectionParams.DEFAULT_RFB_PORT)) { // -1 means request to reverse direct connection socket short id = viewer.getRfb().isTreeManager()? (short)-1 : viewer.getRfb().getId(); - context.sendMessage(new ScreenChangeRequest(adr, ConnectionParams.DEFAULT_VNC_ROOT, id, singleWidth, singleHeight, shareScreenNumber)); + context.sendMessage(new ScreenChangeRequest(adr, ConnectionParams.DEFAULT_VNC_ROOT, id, singleWidth, singleHeight, shareScreenNumber, scale)); } } if (viewer.getRfb().isTreeManager()) { - changeVncServer(viewer, singleWidth, singleHeight, shareScreenNumber, viewer.getRfb().getId()); + changeVncServer(viewer, singleWidth, singleHeight, shareScreenNumber, scale, viewer.getRfb().getId()); return; } } + private int retinaScale() { + int scale = 1; + GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment(); + final GraphicsDevice device = env.getDefaultScreenDevice(); + + try { + Field field = device.getClass().getDeclaredField("scale"); + + if (field != null) { + field.setAccessible(true); + Object retinaScale = field.get(device); + + if (retinaScale instanceof Integer) { + scale = (int)retinaScale; + return scale; + } + } + } catch (Exception ignore) {} + //... + return scale; + } + private boolean scanPort(String adr, int port) { try { Socket socket = new Socket(adr, port); @@ -958,8 +982,8 @@ public void fitScreen() { ArrayList<Rectangle> rectangles = viewer.getScreenRectangles(); int leftScreenNumber = 0; - int thisScreenWidth = (int) rectangles.get(leftScreenNumber).getWidth(); - int thisScreenHeight = (int) rectangles.get(leftScreenNumber).getHeight(); + int thisScreenWidth = (int) rectangles.get(leftScreenNumber).getWidth() * viewer.getRfb().getRetinaScale(); + int thisScreenHeight = (int) rectangles.get(leftScreenNumber).getHeight() * viewer.getRfb().getRetinaScale(); int singleWidth = viewer.getRfb().getSingleWidth(); int singleHeight = viewer.getRfb().getSingleHeight(); @@ -1038,10 +1062,10 @@ frame.setVisible(b); } - private void changeVncServer(ViewerInterface viewer, int width, int height, int shareScreenNumber, short id) { + private void changeVncServer(ViewerInterface viewer, int width, int height, int shareScreenNumber, int scale, short id) { String localhost = "127.0.0.1"; // InetAddress.getLocalHost().getHostName() try { - viewer.getRfb().changeVNCServer(viewer, localhost, ConnectionParams.DEFAULT_RFB_PORT, width, height, shareScreenNumber, id, null, null); + viewer.getRfb().changeVNCServer(viewer, localhost, ConnectionParams.DEFAULT_RFB_PORT, width, height, shareScreenNumber, scale, id, null, null); } catch (Exception e1) { System.out.println("can't change server :" + e1.getMessage()); }