Skip to content

Commit 14a9f2b

Browse files
author
Jeff Brown
committed
Fix drag and drop surfaces on secondary displays.
Bug: 7183618 Change-Id: I4ef746916aad984640f1eb3b3c71b1e34595aabd
1 parent 2033763 commit 14a9f2b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

services/java/com/android/server/wm/Session.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,8 @@ public boolean performDrag(IWindow window, IBinder dragToken,
280280
// !!! FIXME: put all this heavy stuff onto the mH looper, as well as
281281
// the actual drag event dispatch stuff in the dragstate
282282

283-
mService.mDragState.register(callingWin.mDisplayContent.getDisplay());
283+
Display display = callingWin.mDisplayContent.getDisplay();
284+
mService.mDragState.register(display);
284285
mService.mInputMonitor.updateInputWindowsLw(true /*force*/);
285286
if (!mService.mInputManager.transferTouchFocus(callingWin.mInputChannel,
286287
mService.mDragState.mServerChannel)) {
@@ -310,6 +311,7 @@ public boolean performDrag(IWindow window, IBinder dragToken,
310311
touchY - thumbCenterY);
311312
surface.setAlpha(.7071f);
312313
surface.setLayer(mService.mDragState.getDragLayerLw());
314+
surface.setLayerStack(display.getLayerStack());
313315
surface.show();
314316
} finally {
315317
Surface.closeTransaction();

0 commit comments

Comments
 (0)