summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorQuentin Glidic2016-06-05 10:37:42 +0200
committerQuentin Glidic2016-06-05 11:57:04 +0200
commita75fa47a0175aaba85af51831c04e7c149578df7 (patch)
treeaad75d0b8d0ce62d0aef0ea119dcaa4ee3ddef6d /packages
parent49d20887a95c1b9f0f2c5005c5233f2170352716 (diff)
downloadsardemff7-pending-a75fa47a0175aaba85af51831c04e7c149578df7.tar.xz
daily: Add gtk2less patch
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Diffstat (limited to 'packages')
-rw-r--r--packages/mail-client/daily/daily-scm.exheres-04
-rw-r--r--packages/mail-client/daily/files/gtk2less.patch178
2 files changed, 182 insertions, 0 deletions
diff --git a/packages/mail-client/daily/daily-scm.exheres-0 b/packages/mail-client/daily/daily-scm.exheres-0
index 8a1284e..70a24fd 100644
--- a/packages/mail-client/daily/daily-scm.exheres-0
+++ b/packages/mail-client/daily/daily-scm.exheres-0
@@ -8,3 +8,7 @@ HOMEPAGE="http://www.mozilla.com/en-US/thunderbird"
PLATFORMS="~amd64"
+DEFAULT_SRC_PREPARE_PATCHES=(
+ "${FILES}"/gtk2less.patch
+)
+
diff --git a/packages/mail-client/daily/files/gtk2less.patch b/packages/mail-client/daily/files/gtk2less.patch
new file mode 100644
index 0000000..5856ba2
--- /dev/null
+++ b/packages/mail-client/daily/files/gtk2less.patch
@@ -0,0 +1,178 @@
+diff --git a/dom/plugins/ipc/PluginInstanceChild.cpp b/dom/plugins/ipc/PluginInstanceChild.cpp
+index a6ed968b..413e52d 100644
+--- a/mozilla/dom/plugins/ipc/PluginInstanceChild.cpp
++++ b/mozilla/dom/plugins/ipc/PluginInstanceChild.cpp
+@@ -47,7 +47,7 @@ using namespace mozilla::gfx;
+ using namespace mozilla::widget;
+ using namespace std;
+
+-#ifdef MOZ_WIDGET_GTK
++#ifdef MOZ_WIDGET_GTK2
+
+ #include <gtk/gtk.h>
+ #include <gdk/gdkx.h>
+@@ -156,9 +156,9 @@ PluginInstanceChild::PluginInstanceChild(const NPPluginFuncs* aPluginIface,
+ , mAsyncInvalidateTask(0)
+ , mCachedWindowActor(nullptr)
+ , mCachedElementActor(nullptr)
+-#ifdef MOZ_WIDGET_GTK
++#ifdef MOZ_WIDGET_GTK2
+ , mXEmbed(false)
+-#endif // MOZ_WIDGET_GTK
++#endif // MOZ_WIDGET_GTK2
+ #if defined(OS_WIN)
+ , mPluginWindowHWND(0)
+ , mPluginWndProc(0)
+@@ -205,7 +205,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
++#ifdef MOZ_WIDGET_GTK2
+ mWsInfo.display = nullptr;
+ mXtClient.top_widget = nullptr;
+ #else
+@@ -604,7 +604,7 @@ PluginInstanceChild::NPN_SetValue(NPPVariable aVar, void* aValue)
+ return NPERR_GENERIC_ERROR;
+
+ NPWindowType newWindowType = windowed ? NPWindowTypeWindow : NPWindowTypeDrawable;
+-#ifdef MOZ_WIDGET_GTK
++#ifdef MOZ_WIDGET_GTK2
+ if (mWindow.type != newWindowType && mWsInfo.display) {
+ // plugin type has been changed but we already have a valid display
+ // so update it for the recent plugin mode
+@@ -1162,7 +1162,7 @@ bool PluginInstanceChild::CreateWindow(const NPRemoteWindow& aWindow)
+ aWindow.x, aWindow.y,
+ aWindow.width, aWindow.height));
+
+-#ifdef MOZ_WIDGET_GTK
++#ifdef MOZ_WIDGET_GTK2
+ if (mXEmbed) {
+ mWindow.window = reinterpret_cast<void*>(aWindow.window);
+ }
+@@ -1191,7 +1191,7 @@ void PluginInstanceChild::DeleteWindow()
+ if (!mWindow.window)
+ return;
+
+-#ifdef MOZ_WIDGET_GTK
++#ifdef MOZ_WIDGET_GTK2
+ if (mXtClient.top_widget) {
+ xt_client_unrealize(&mXtClient);
+ xt_client_destroy(&mXtClient);
+@@ -1273,7 +1273,7 @@ PluginInstanceChild::AnswerNPP_SetWindow(const NPRemoteWindow& aWindow)
+ CreateWindow(aWindow);
+ }
+
+-#ifdef MOZ_WIDGET_GTK
++#ifdef MOZ_WIDGET_GTK2
+ if (mXEmbed && gtk_check_version(2,18,7) != nullptr) { // older
+ if (aWindow.type == NPWindowTypeWindow) {
+ GdkWindow* socket_window = gdk_window_lookup(static_cast<GdkNativeWindow>(aWindow.window));
+@@ -1402,7 +1402,7 @@ PluginInstanceChild::AnswerNPP_SetWindow(const NPRemoteWindow& aWindow)
+ bool
+ PluginInstanceChild::Initialize()
+ {
+-#ifdef MOZ_WIDGET_GTK
++#ifdef MOZ_WIDGET_GTK2
+ NPError rv;
+
+ if (mWsInfo.display) {
+@@ -4609,7 +4609,7 @@ PluginInstanceChild::Destroy()
+
+ mPendingAsyncCalls.Clear();
+
+-#ifdef MOZ_WIDGET_GTK
++#ifdef MOZ_WIDGET_GTK2
+ if (mWindow.type == NPWindowTypeWindow && !mXEmbed) {
+ xt_client_xloop_destroy();
+ }
+diff --git a/dom/plugins/ipc/PluginInstanceChild.h b/dom/plugins/ipc/PluginInstanceChild.h
+index cdeffc0..fa058b2 100644
+--- a/mozilla/dom/plugins/ipc/PluginInstanceChild.h
++++ b/mozilla/dom/plugins/ipc/PluginInstanceChild.h
+@@ -35,7 +35,7 @@
+
+ #include <map>
+
+-#ifdef MOZ_WIDGET_GTK
++#ifdef MOZ_WIDGET_GTK2
+ #include "gtk2xtbin.h"
+ #endif
+
+@@ -454,7 +454,7 @@ private:
+
+ #if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX)
+ NPSetWindowCallbackStruct mWsInfo;
+-#ifdef MOZ_WIDGET_GTK
++#ifdef MOZ_WIDGET_GTK2
+ bool mXEmbed;
+ XtClient mXtClient;
+ #endif
+diff --git a/dom/plugins/ipc/PluginModuleChild.cpp b/dom/plugins/ipc/PluginModuleChild.cpp
+index ddd5f65..5826ef3 100644
+--- a/mozilla/dom/plugins/ipc/PluginModuleChild.cpp
++++ b/mozilla/dom/plugins/ipc/PluginModuleChild.cpp
+@@ -17,7 +17,7 @@
+
+ #include "mozilla/ipc/MessageChannel.h"
+
+-#ifdef MOZ_WIDGET_GTK
++#ifdef MOZ_WIDGET_GTK2
+ #include <gtk/gtk.h>
+ #endif
+
+@@ -129,7 +129,7 @@ PluginModuleChild::PluginModuleChild(bool aIsChrome)
+ , mInitializeFunc(0)
+ #if defined(OS_WIN) || defined(OS_MACOSX)
+ , mGetEntryPointsFunc(0)
+-#elif defined(MOZ_WIDGET_GTK)
++#elif defined(MOZ_WIDGET_GTK2)
+ , mNestedLoopTimerId(0)
+ #elif defined(MOZ_WIDGET_QT)
+ , mNestedLoopTimerObject(0)
+@@ -333,7 +333,18 @@ PluginModuleChild::InitForChrome(const std::string& aPluginFilename,
+ return true;
+ }
+
++
+ #if defined(MOZ_WIDGET_GTK)
++void
++PluginModuleChild::EnteredCxxStack()
++{
++}
++
++void
++PluginModuleChild::ExitedCxxStack()
++{
++}
++#elif defined(MOZ_WIDGET_GTK2)
+ typedef void (*GObjectDisposeFn)(GObject*);
+ typedef gboolean (*GtkWidgetScrollEventFn)(GtkWidget*, GdkEventScroll*);
+ typedef void (*GtkPlugEmbeddedFn)(GtkPlug*);
+@@ -601,7 +612,7 @@ PluginModuleChild::ShouldContinueFromReplyTimeout()
+ bool
+ PluginModuleChild::InitGraphics()
+ {
+-#if defined(MOZ_WIDGET_GTK)
++#if defined(MOZ_WIDGET_GTK2)
+ // Work around plugins that don't interact well with GDK
+ // client-side windows.
+ PR_SetEnv("GDK_NATIVE_WINDOWS=1");
+@@ -1158,7 +1169,7 @@ _getvalue(NPP aNPP,
+ switch (aVariable) {
+ // Copied from nsNPAPIPlugin.cpp
+ case NPNVToolkit:
+-#if defined(MOZ_WIDGET_GTK) || defined(MOZ_WIDGET_QT)
++#if defined(MOZ_WIDGET_GTK2) || defined(MOZ_WIDGET_QT)
+ *static_cast<NPNToolkitType*>(aValue) = NPNVGtk2;
+ return NPERR_NO_ERROR;
+ #endif
+@@ -1179,7 +1190,7 @@ _getvalue(NPP aNPP,
+ case NPNVSupportsWindowless:
+ *(NPBool*)aValue = PluginModuleChild::GetChrome()->Settings().supportsWindowless();
+ return NPERR_NO_ERROR;
+-#if defined(MOZ_WIDGET_GTK)
++#if defined(MOZ_WIDGET_GTK2)
+ case NPNVxDisplay: {
+ if (aNPP) {
+ return InstCast(aNPP)->NPN_GetValue(aVariable, aValue);