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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/win/win_util.h" 5 #include "base/win/win_util.h"
6 6
7 #include <aclapi.h> 7 #include <aclapi.h>
8 #include <cfgmgr32.h> 8 #include <cfgmgr32.h>
9 #include <lm.h> 9 #include <lm.h>
10 #include <powrprof.h> 10 #include <powrprof.h>
11 #include <shellapi.h> 11 #include <shellapi.h>
12 #include <shlobj.h> 12 #include <shlobj.h>
13 #include <shobjidl.h> // Must be before propkey. 13 #include <shobjidl.h> // Must be before propkey.
14 #include <initguid.h> 14 #include <initguid.h>
15 #include <inspectable.h> 15 #include <inspectable.h>
16 #include <propkey.h> 16 #include <propkey.h>
17 #include <propvarutil.h> 17 #include <propvarutil.h>
18 #include <psapi.h> 18 #include <psapi.h>
19 #include <roapi.h> 19 #include <roapi.h>
20 #include <sddl.h> 20 #include <sddl.h>
21 #include <setupapi.h> 21 #include <setupapi.h>
22 #include <signal.h> 22 #include <signal.h>
23 #include <stddef.h> 23 #include <stddef.h>
24 #include <stdlib.h> 24 #include <stdlib.h>
25 #include <tchar.h> // Must be before tpcshrd.h or for any use of _T macro
26 #include <tpcshrd.h>
25 #include <uiviewsettingsinterop.h> 27 #include <uiviewsettingsinterop.h>
26 #include <windows.ui.viewmanagement.h> 28 #include <windows.ui.viewmanagement.h>
27 #include <winstring.h> 29 #include <winstring.h>
28 #include <wrl/wrappers/corewrappers.h> 30 #include <wrl/wrappers/corewrappers.h>
29 31
30 #include "base/base_switches.h" 32 #include "base/base_switches.h"
31 #include "base/command_line.h" 33 #include "base/command_line.h"
32 #include "base/lazy_instance.h" 34 #include "base/lazy_instance.h"
33 #include "base/logging.h" 35 #include "base/logging.h"
34 #include "base/macros.h" 36 #include "base/macros.h"
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after
687 // more room is given to avoid multiple expensive calls to 689 // more room is given to avoid multiple expensive calls to
688 // ::EnumProcessModules() just because one module has been added. 690 // ::EnumProcessModules() just because one module has been added.
689 snapshot->resize(num_modules + 8, NULL); 691 snapshot->resize(num_modules + 8, NULL);
690 } 692 }
691 } while (--retries_remaining); 693 } while (--retries_remaining);
692 694
693 DLOG(ERROR) << "Failed to enumerate modules."; 695 DLOG(ERROR) << "Failed to enumerate modules.";
694 return false; 696 return false;
695 } 697 }
696 698
699 // 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.
700 void AllowFlicks(HWND hwnd, bool allow) {
701 if (allow) {
702 ::RemoveProp(hwnd, MICROSOFT_TABLETPENSERVICE_PROPERTY);
703 } else {
704 ::SetProp(hwnd, MICROSOFT_TABLETPENSERVICE_PROPERTY,
705 reinterpret_cast<HANDLE>(TABLET_DISABLE_FLICKS |
706 TABLET_DISABLE_FLICKFALLBACKKEYS));
707 }
708 }
709
697 } // namespace win 710 } // namespace win
698 } // namespace base 711 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698