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

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: Refactoring based on suggestions from ananta@ 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..23d0f2d499184d7b8b8d81c751c99d481419c173 100644
--- a/base/win/win_util.cc
+++ b/base/win/win_util.cc
@@ -8,6 +8,8 @@
#include <cfgmgr32.h>
#include <lm.h>
#include <powrprof.h>
+#include <tchar.h>
ananta 2016/04/04 21:17:59 Please fix the include order if possible for this
kylix_rd 2016/04/04 21:40:51 Done.
+#include <tpcshrd.h>
#include <shellapi.h>
#include <shlobj.h>
#include <shobjidl.h> // Must be before propkey.
@@ -694,5 +696,16 @@ bool GetLoadedModulesSnapshot(HANDLE process, std::vector<HMODULE>* snapshot) {
return false;
}
+// Disable/Enable flick gestures
+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