Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

Commit

Permalink
Merge pull request #456 from chaopeng/electron-1-7-x
Browse files Browse the repository at this point in the history
Add patch to fix touchpad lagging issue to 1.7
  • Loading branch information
zcbenz committed Feb 26, 2018
2 parents 70417df + 990cbb5 commit adb6cf3
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions patches/fix-touchpad-lagging-issue.patch
@@ -0,0 +1,28 @@
Fix touchpad lagging issue. port from crrev.com/c/867070
---

diff --git a/gpu/ipc/in_process_command_buffer.cc b/gpu/ipc/in_process_command_buffer.cc
index ec3464e2a55d..bd307fc653ad 100644
--- a/gpu/ipc/in_process_command_buffer.cc
+++ b/gpu/ipc/in_process_command_buffer.cc
@@ -991,6 +991,8 @@ void InProcessCommandBuffer::DidCreateAcceleratedSurfaceChildWindow(
SurfaceHandle parent_window,
SurfaceHandle child_window) {
::SetParent(child_window, parent_window);
+ ::SetWindowPos(child_window, HWND_BOTTOM, 0, 0, 0, 0,
+ SWP_NOMOVE | SWP_NOSIZE);
}
#endif

diff --git a/ui/gfx/win/rendering_window_manager.cc b/ui/gfx/win/rendering_window_manager.cc
index a0528ecf9ab7..72ef021bedbe 100644
--- a/ui/gfx/win/rendering_window_manager.cc
+++ b/ui/gfx/win/rendering_window_manager.cc
@@ -49,6 +49,7 @@ void RenderingWindowManager::DoSetParentOnChild(HWND parent) {
}

::SetParent(child, parent);
+ ::SetWindowPos(child, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
}

void RenderingWindowManager::UnregisterParent(HWND parent) {

0 comments on commit adb6cf3

Please sign in to comment.