Fixed following mouse cursor when keyboard is shown
This commit is contained in:
@@ -353,23 +353,21 @@ public class MainActivity extends Activity
|
||||
DimSystemStatusBar.get().dim(_videoLayout);
|
||||
DimSystemStatusBar.get().dim(mGLView);
|
||||
|
||||
if( Globals.ScreenFollowsMouse )
|
||||
Rect r = new Rect();
|
||||
_videoLayout.getWindowVisibleDisplayFrame(r);
|
||||
mGLView.nativeScreenVisibleRect(r.left, r.top, r.right, r.bottom);
|
||||
_videoLayout.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener()
|
||||
{
|
||||
Rect r = new Rect();
|
||||
_videoLayout.getWindowVisibleDisplayFrame(r);
|
||||
mGLView.nativeScreenVisibleRect(r.left, r.top, r.right, r.bottom);
|
||||
_videoLayout.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener()
|
||||
public void onGlobalLayout()
|
||||
{
|
||||
public void onGlobalLayout()
|
||||
{
|
||||
Rect r = new Rect();
|
||||
_videoLayout.getWindowVisibleDisplayFrame(r);
|
||||
int heightDiff = _videoLayout.getRootView().getHeight() - _videoLayout.getHeight(); // Take system bar into consideration
|
||||
mGLView.nativeScreenVisibleRect(r.left, r.top + heightDiff, r.width(), r.height());
|
||||
Log.v("SDL", "Main window visible region changed: " + r.left + ":" + r.top + ":" + r.width() + ":" + r.height() );
|
||||
}
|
||||
});
|
||||
}
|
||||
Rect r = new Rect();
|
||||
_videoLayout.getWindowVisibleDisplayFrame(r);
|
||||
int heightDiff = _videoLayout.getRootView().getHeight() - _videoLayout.getHeight(); // Take system bar into consideration
|
||||
int widthDiff = _videoLayout.getRootView().getWidth() - _videoLayout.getWidth(); // Nexus 5 has system bar at the right side
|
||||
mGLView.nativeScreenVisibleRect(r.left + widthDiff, r.top + heightDiff, r.width(), r.height());
|
||||
Log.v("SDL", "Main window visible region changed: " + r.left + ":" + r.top + ":" + r.width() + ":" + r.height() );
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -527,7 +527,8 @@ class Settings
|
||||
Globals.RightMouseButtonLongPress ? 1 : 0,
|
||||
Globals.MoveMouseWithGyroscope ? 1 : 0,
|
||||
Globals.MoveMouseWithGyroscopeSpeed,
|
||||
Globals.CompatibilityHacksForceScreenUpdateMouseClick ? 1 : 0 );
|
||||
Globals.CompatibilityHacksForceScreenUpdateMouseClick ? 1 : 0,
|
||||
Globals.ScreenFollowsMouse ? 1 : 0 );
|
||||
}
|
||||
|
||||
static void Apply(MainActivity p)
|
||||
@@ -863,7 +864,7 @@ class Settings
|
||||
int relativeMovementAccel, int showMouseCursor,
|
||||
int HoverJitterFilter, int RightMouseButtonLongPress,
|
||||
int MoveMouseWithGyroscope, int MoveMouseWithGyroscopeSpeed,
|
||||
int ForceScreenUpdateMouseClick);
|
||||
int ForceScreenUpdateMouseClick, int ScreenFollowsMouse);
|
||||
private static native void nativeSetJoystickUsed(int amount);
|
||||
private static native void nativeSetAccelerometerUsed();
|
||||
private static native void nativeSetMultitouchUsed();
|
||||
|
||||
Reference in New Issue
Block a user