Loading services/java/com/android/server/WindowManagerService.java +47 −65 Original line number Diff line number Diff line Loading @@ -6635,10 +6635,7 @@ public class WindowManagerService extends IWindowManager.Stub MotionEvent mmev = (MotionEvent)ev.event; int mcx = (int)mmev.getX(); int mcy = (int)mmev.getY(); if(mMlx < 0 || mMly < 0) { mMlx = mDisplay.getWidth()/2; mMly = mDisplay.getHeight()/2; } if (mMouseSurface != null && (mMlx != mcx || mMly != mcy)) { Surface.openTransaction(); if (DEBUG_INPUT) Loading @@ -6651,29 +6648,14 @@ public class WindowManagerService extends IWindowManager.Stub Integer.toString(mcx) + " y:" + Integer.toString(mcy)); mMlx = mcx; mMly = mcy; switch (mDisplay.getOrientation()) { case Surface.ROTATION_0: mMouseSurface.setPosition(mMlx, mMly); break; case Surface.ROTATION_90: mMouseSurface.setPosition(mDisplay.getHeight() - mMly, mMlx); break; case Surface.ROTATION_180: mMouseSurface.setPosition(mDisplay.getWidth() - mMlx, mDisplay.getHeight()- mMly); break; case Surface.ROTATION_270: mMouseSurface.setPosition(mMly, mDisplay.getWidth()- mMlx); break; } mMouseSurface.setPosition(mcx, mcy); mMouseSurface.setLayer(top.mAnimLayer + 1); if (!mMouseDisplayed) { mMouseSurface.show(); mMouseDisplayed = true; } mMlx = mcx; mMly = mcy; } catch ( RuntimeException e) { Slog.e(TAG, "Failure showing mouse surface",e); } Loading Loading
services/java/com/android/server/WindowManagerService.java +47 −65 Original line number Diff line number Diff line Loading @@ -6635,10 +6635,7 @@ public class WindowManagerService extends IWindowManager.Stub MotionEvent mmev = (MotionEvent)ev.event; int mcx = (int)mmev.getX(); int mcy = (int)mmev.getY(); if(mMlx < 0 || mMly < 0) { mMlx = mDisplay.getWidth()/2; mMly = mDisplay.getHeight()/2; } if (mMouseSurface != null && (mMlx != mcx || mMly != mcy)) { Surface.openTransaction(); if (DEBUG_INPUT) Loading @@ -6651,29 +6648,14 @@ public class WindowManagerService extends IWindowManager.Stub Integer.toString(mcx) + " y:" + Integer.toString(mcy)); mMlx = mcx; mMly = mcy; switch (mDisplay.getOrientation()) { case Surface.ROTATION_0: mMouseSurface.setPosition(mMlx, mMly); break; case Surface.ROTATION_90: mMouseSurface.setPosition(mDisplay.getHeight() - mMly, mMlx); break; case Surface.ROTATION_180: mMouseSurface.setPosition(mDisplay.getWidth() - mMlx, mDisplay.getHeight()- mMly); break; case Surface.ROTATION_270: mMouseSurface.setPosition(mMly, mDisplay.getWidth()- mMlx); break; } mMouseSurface.setPosition(mcx, mcy); mMouseSurface.setLayer(top.mAnimLayer + 1); if (!mMouseDisplayed) { mMouseSurface.show(); mMouseDisplayed = true; } mMlx = mcx; mMly = mcy; } catch ( RuntimeException e) { Slog.e(TAG, "Failure showing mouse surface",e); } Loading