File tree Expand file tree Collapse file tree
core/src/cn/harryh/arkpets Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -249,8 +249,8 @@ protected void onMouseDrag() {
249249 if (getMouseButton () != Input .Buttons .RIGHT ) {
250250 // Update window position
251251 var pos = WindowSystem .getMousePos ();
252- int x = HdpiUtils . toBackBufferX ( pos .x () ) - getMouseX ();
253- int y = HdpiUtils . toBackBufferX ( pos .y () ) - getMouseY ();
252+ int x = pos .x () - getMouseX ();
253+ int y = pos .y () - getMouseY ();
254254 plane .changePosition (Gdx .graphics .getDeltaTime (), x , -(cha .camera .getHeight () + y ));
255255 windowPosition .setToEnd ();
256256 tray .hideDialog ();
Original file line number Diff line number Diff line change 33import cn .harryh .arkpets .Const ;
44import cn .harryh .arkpets .rpc .MutterInterface ;
55import cn .harryh .arkpets .rpc .MutterPluginInterface ;
6+ import cn .harryh .arkpets .utils .HdpiUtils ;
67import cn .harryh .arkpets .utils .Logger ;
78import org .freedesktop .dbus .connections .impl .DBusConnection ;
89import org .freedesktop .dbus .connections .impl .DBusConnectionBuilder ;
@@ -60,7 +61,7 @@ public HWndCtrl getTopmostWindow() {
6061 @ Override
6162 public HWndCtrl .MousePoint getMousePos () {
6263 MutterInterface .PointStruct pos = dBusInterface .Mouse ();
63- return new HWndCtrl .MousePoint (pos .x , pos .y );
64+ return new HWndCtrl .MousePoint (HdpiUtils . toBackBufferX ( pos .x ), HdpiUtils . toBackBufferY ( pos .y ) );
6465 }
6566
6667 @ Override
You can’t perform that action at this time.
0 commit comments