Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1816)

Unified Diff: base/win/win_util.cc

Issue 1852503002: Need to set the MICROSOFT_TABLETPENSERVICE_PROPERTY window property even for child windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: De-nit'ed per previous comment Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: base/win/win_util.cc
diff --git a/base/win/win_util.cc b/base/win/win_util.cc
index 87bde159cd5ac0420d3043cd87797cacfaf3f133..01cbf0e099838fc0ea5a0f87ea99f0cc9bfb63ba 100644
--- a/base/win/win_util.cc
+++ b/base/win/win_util.cc
@@ -22,6 +22,8 @@
#include <signal.h>
#include <stddef.h>
#include <stdlib.h>
+#include <tchar.h> // Must be before tpcshrd.h or for any use of _T macro
+#include <tpcshrd.h>
#include <uiviewsettingsinterop.h>
#include <windows.ui.viewmanagement.h>
#include <winstring.h>
@@ -694,5 +696,16 @@ bool GetLoadedModulesSnapshot(HANDLE process, std::vector<HMODULE>* snapshot) {
return false;
}
+// Disable/Enable flick gestures
sky 2016/04/07 17:57:54 You have the comment in the header, so no comment
kylix_rd 2016/04/07 18:46:24 Done.
+void AllowFlicks(HWND hwnd, bool allow) {
+ if (allow) {
+ ::RemoveProp(hwnd, MICROSOFT_TABLETPENSERVICE_PROPERTY);
+ } else {
+ ::SetProp(hwnd, MICROSOFT_TABLETPENSERVICE_PROPERTY,
+ reinterpret_cast<HANDLE>(TABLET_DISABLE_FLICKS |
+ TABLET_DISABLE_FLICKFALLBACKKEYS));
+ }
+}
+
} // namespace win
} // namespace base

Powered by Google App Engine
This is Rietveld 408576698