[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor-messenger-build/master] Add patch for disabling tablet mode in MinGW



commit 5c86be691161e5d967e8c5f37a6ed5689e351c4a
Author: Arlo Breault <arlolra@xxxxxxxxx>
Date:   Thu Mar 24 13:33:41 2016 -0700

    Add patch for disabling tablet mode in MinGW
---
 ...013-MinGW-w64-Disable-TabletMode-stuff.mozpatch | 66 ++++++++++++++++++++++
 projects/instantbird/config                        |  2 +
 2 files changed, 68 insertions(+)

diff --git a/projects/instantbird/0013-MinGW-w64-Disable-TabletMode-stuff.mozpatch b/projects/instantbird/0013-MinGW-w64-Disable-TabletMode-stuff.mozpatch
new file mode 100644
index 0000000..0d27220
--- /dev/null
+++ b/projects/instantbird/0013-MinGW-w64-Disable-TabletMode-stuff.mozpatch
@@ -0,0 +1,66 @@
+diff --git a/widget/windows/WindowsUIUtils.cpp b/widget/windows/WindowsUIUtils.cpp
+--- a/widget/windows/WindowsUIUtils.cpp
++++ b/widget/windows/WindowsUIUtils.cpp
+@@ -15,16 +15,51 @@
+ #include "nsIAppShellService.h"
+ #include "nsAppShellCID.h"
+ #include "nsIXULWindow.h"
+ #include "mozilla/Services.h"
+ #include "mozilla/WindowsVersion.h"
+ #include "nsString.h"
+ #include "nsIWidget.h"
+ 
++#if defined(__MINGW64_VERSION_MAJOR)
++/* MinGW-w64 doesn't have support for this WRL stuff yet:
++   https://msdn.microsoft.com/en-us/library/hh438466(v=vs.110).aspx */
++
++WindowsUIUtils::WindowsUIUtils() :
++  mInTabletMode(eTabletModeUnknown)
++{
++}
++
++WindowsUIUtils::~WindowsUIUtils()
++{
++}
++
++/*
++ * Implement the nsISupports methods...
++ */
++NS_IMPL_ISUPPORTS(WindowsUIUtils,
++                  nsIWindowsUIUtils)
++
++NS_IMETHODIMP
++WindowsUIUtils::GetInTabletMode(bool* aResult)
++{
++  *aResult = false;
++  return NS_OK;
++}
++
++NS_IMETHODIMP
++WindowsUIUtils::UpdateTabletModeState()
++{
++  return NS_OK;
++}
++
++
++
++#else
+ #include <windows.ui.viewmanagement.h>
+ 
+ #pragma comment(lib, "runtimeobject.lib")
+ 
+ using namespace mozilla;
+ using namespace ABI::Windows::UI;
+ using namespace ABI::Windows::UI::ViewManagement;
+ using namespace Microsoft::WRL;
+@@ -167,8 +202,10 @@ WindowsUIUtils::UpdateTabletModeState()
+         }
+       }
+     }
+   }
+ 
+   return NS_OK;
+ }
+ 
++#endif /* defined(__MINGW64_VERSION_MAJOR) */
++
diff --git a/projects/instantbird/config b/projects/instantbird/config
index d9e0646..8ba9f7d 100644
--- a/projects/instantbird/config
+++ b/projects/instantbird/config
@@ -105,6 +105,8 @@ input_files:
     enable: '[% c("var/osx") %]'
   - filename: fix-mingw-build.patch
     enable: '[% c("var/windows") %]'
+  - filename: 0013-MinGW-w64-Disable-TabletMode-stuff.mozpatch
+    enable: '[% c("var/windows") %]'
   - filename: gmploader-sandbox.mozpatch
     enable: '[% c("var/windows") %]'
   - filename: bug-1240589.mozpatch

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits