summaryrefslogtreecommitdiffstats
path: root/packages/mail-client/daily/files/gtk2less.patch
blob: 0042d5f5e393805a22ee3c86b4ab075a66ee7833 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
From e1064b52ff109da23dbc4d02aee75a30d431f6e2 Mon Sep 17 00:00:00 2001
From: Quentin Glidic <sardemff7+git@sardemff7.net>
Date: Wed, 12 Dec 2018 21:47:34 +0100
Subject: [PATCH] Less GTK+2

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
---
 browser/installer/package-manifest.in   |  1 -
 dom/plugins/ipc/PluginInstanceChild.cpp |  6 +++---
 dom/plugins/ipc/PluginModuleChild.cpp   | 12 ++++++------
 dom/plugins/ipc/PluginModuleChild.h     |  2 +-
 old-configure.in                        |  1 -
 widget/gtk/mozgtk/moz.build             |  2 +-
 6 files changed, 11 insertions(+), 13 deletions(-)

diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in
index ec20499166e8..624855202842 100644
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -107,7 +107,6 @@
 #endif
 #ifdef MOZ_GTK
 @BINPATH@/@DLL_PREFIX@mozgtk@DLL_SUFFIX@
-@BINPATH@/gtk2/@DLL_PREFIX@mozgtk@DLL_SUFFIX@
 #ifdef MOZ_WAYLAND
 @BINPATH@/@DLL_PREFIX@mozwayland@DLL_SUFFIX@
 #endif
diff --git a/dom/plugins/ipc/PluginInstanceChild.cpp b/dom/plugins/ipc/PluginInstanceChild.cpp
index 58d809297fb2..c2d3d07043f7 100644
--- a/dom/plugins/ipc/PluginInstanceChild.cpp
+++ b/dom/plugins/ipc/PluginInstanceChild.cpp
@@ -45,7 +45,7 @@ using namespace mozilla::layers;
 using namespace mozilla::gfx;
 using namespace mozilla::widget;
 
-#ifdef MOZ_WIDGET_GTK
+#if 0 && defined(MOZ_WIDGET_GTK)
 
 #  include <gtk/gtk.h>
 #  include <gdk/gdkx.h>
@@ -185,7 +185,7 @@ PluginInstanceChild::PluginInstanceChild(const NPPluginFuncs* aPluginIface,
 #if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX)
   mWindow.ws_info = &mWsInfo;
   memset(&mWsInfo, 0, sizeof(mWsInfo));
-#  ifdef MOZ_WIDGET_GTK
+#  if 0 && defined(MOZ_WIDGET_GTK)
   mWsInfo.display = nullptr;
 #  else
   mWsInfo.display = DefaultXDisplay();
@@ -1251,7 +1251,7 @@ mozilla::ipc::IPCResult PluginInstanceChild::AnswerNPP_SetWindow(
 }
 
 bool PluginInstanceChild::Initialize() {
-#if defined(MOZ_WIDGET_GTK) && defined(MOZ_X11)
+#if 0 && defined(MOZ_WIDGET_GTK)
   if (mWsInfo.display) {
     // Already initialized
     return true;
diff --git a/dom/plugins/ipc/PluginModuleChild.cpp b/dom/plugins/ipc/PluginModuleChild.cpp
index 81eb8467d468..13dc3acf074d 100644
--- a/dom/plugins/ipc/PluginModuleChild.cpp
+++ b/dom/plugins/ipc/PluginModuleChild.cpp
@@ -12,7 +12,7 @@
 
 #include "mozilla/ipc/MessageChannel.h"
 
-#ifdef MOZ_WIDGET_GTK
+#if 0 && defined(MOZ_WIDGET_GTK)
 #  include <gtk/gtk.h>
 #  include <gdk/gdkx.h>
 #endif
@@ -101,7 +101,7 @@ PluginModuleChild::PluginModuleChild(bool aIsChrome)
 #if defined(OS_WIN) || defined(OS_MACOSX)
       ,
       mGetEntryPointsFunc(0)
-#elif defined(MOZ_WIDGET_GTK)
+#elif 0 && defined(MOZ_WIDGET_GTK)
       ,
       mNestedLoopTimerId(0)
 #endif
@@ -331,7 +331,7 @@ bool PluginModuleChild::InitForChrome(const std::string& aPluginFilename,
   return true;
 }
 
-#if defined(MOZ_WIDGET_GTK)
+#if 0 && defined(MOZ_WIDGET_GTK)
 
 typedef void (*GObjectDisposeFn)(GObject*);
 typedef gboolean (*GtkWidgetScrollEventFn)(GtkWidget*, GdkEventScroll*);
@@ -551,7 +551,7 @@ bool PluginModuleChild::ShouldContinueFromReplyTimeout() {
 }
 
 bool PluginModuleChild::InitGraphics() {
-#if defined(MOZ_WIDGET_GTK)
+#if 0 && defined(MOZ_WIDGET_GTK)
   // Work around plugins that don't interact well with GDK
   // client-side windows.
   PR_SetEnv("GDK_NATIVE_WINDOWS=1");
@@ -995,7 +995,7 @@ NPError _getvalue(NPP aNPP, NPNVariable aVariable, void* aValue) {
   switch (aVariable) {
     // Copied from nsNPAPIPlugin.cpp
     case NPNVToolkit:
-#if defined(MOZ_WIDGET_GTK)
+#if 0 && defined(MOZ_WIDGET_GTK)
       *static_cast<NPNToolkitType*>(aValue) = NPNVGtk2;
       return NPERR_NO_ERROR;
 #endif
@@ -1021,7 +1021,7 @@ NPError _getvalue(NPP aNPP, NPNVariable aVariable, void* aValue) {
     case NPNVSupportsWindowless:
       *(NPBool*)aValue = true;
       return NPERR_NO_ERROR;
-#if defined(MOZ_WIDGET_GTK)
+#if 0 && defined(MOZ_WIDGET_GTK)
     case NPNVxDisplay: {
       if (!aNPP) {
         return NPERR_INVALID_INSTANCE_ERROR;
diff --git a/dom/plugins/ipc/PluginModuleChild.h b/dom/plugins/ipc/PluginModuleChild.h
index 31d4eafb8fb7..64fdaa0fd28d 100644
--- a/dom/plugins/ipc/PluginModuleChild.h
+++ b/dom/plugins/ipc/PluginModuleChild.h
@@ -210,7 +210,7 @@ class PluginModuleChild : public PPluginModuleChild {
   bool InitGraphics();
   void DeinitGraphics();
 
-#if defined(MOZ_WIDGET_GTK)
+#if 0 && defined(MOZ_WIDGET_GTK)
   static gboolean DetectNestedEventLoop(gpointer data);
   static gboolean ProcessBrowserEvents(gpointer data);
 
diff --git a/old-configure.in b/old-configure.in
index 0ac86af0c8c7..8c3705150872 100644
--- a/old-configure.in
+++ b/old-configure.in
@@ -53,7 +53,6 @@ GLIB_VERSION=2.42
 GLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_42
 GLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_42
 CAIRO_VERSION=1.10
-GTK2_VERSION=2.18.0
 GTK3_VERSION=3.14.0
 GDK_VERSION_MAX_ALLOWED=GDK_VERSION_3_14
 W32API_VERSION=3.14
diff --git a/widget/gtk/mozgtk/moz.build b/widget/gtk/mozgtk/moz.build
index 828858374534..cca6db0e89ce 100644
--- a/widget/gtk/mozgtk/moz.build
+++ b/widget/gtk/mozgtk/moz.build
@@ -4,4 +4,4 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-DIRS += ["stub", "gtk2", "gtk3"]
+DIRS += ["stub", "gtk3"]
-- 
2.28.0