- Fix crash when changing gtk key theme
- Prevent UI freezes while changing GNOME theme - Remove verbiage about pango; no longer required by upstream.
This commit is contained in:
parent
a860b00095
commit
9fc1c5f805
23
firefox-1.5-embedwindow-visibility.patch
Normal file
23
firefox-1.5-embedwindow-visibility.patch
Normal file
@ -0,0 +1,23 @@
|
||||
Index: embedding/browser/gtk/src/EmbedWindow.cpp
|
||||
===================================================================
|
||||
RCS file: /cvsroot/mozilla/embedding/browser/gtk/src/EmbedWindow.cpp,v
|
||||
retrieving revision 1.31
|
||||
diff -d -u -p -r1.31 EmbedWindow.cpp
|
||||
--- embedding/browser/gtk/src/EmbedWindow.cpp 17 Jan 2005 17:19:39 -0000 1.31
|
||||
+++ embedding/browser/gtk/src/EmbedWindow.cpp 27 Sep 2006 00:41:38 -0000
|
||||
@@ -359,7 +359,14 @@ EmbedWindow::GetSiteWindow(void **aSiteW
|
||||
NS_IMETHODIMP
|
||||
EmbedWindow::GetVisibility(PRBool *aVisibility)
|
||||
{
|
||||
- *aVisibility = mVisibility;
|
||||
+ // XXX See bug 312998
|
||||
+ // Work around the problem that sometimes the window
|
||||
+ // is already visible even though mVisibility isn't true
|
||||
+ // yet.
|
||||
+ *aVisibility = mVisibility ||
|
||||
+ (!mOwner->mIsChrome &&
|
||||
+ mOwner->mOwningWidget &&
|
||||
+ GTK_WIDGET_MAPPED(mOwner->mOwningWidget));
|
||||
return NS_OK;
|
||||
}
|
||||
|
27
firefox-1.5-gtk-key-theme-crash.patch
Normal file
27
firefox-1.5-gtk-key-theme-crash.patch
Normal file
@ -0,0 +1,27 @@
|
||||
Index: widget/src/gtk2/nsWindow.cpp
|
||||
===================================================================
|
||||
RCS file: /cvsroot/mozilla/widget/src/gtk2/nsWindow.cpp,v
|
||||
retrieving revision 1.185
|
||||
diff -u -8 -p -r1.185 nsWindow.cpp
|
||||
--- widget/src/gtk2/nsWindow.cpp 20 Sep 2006 19:16:19 -0000 1.185
|
||||
+++ widget/src/gtk2/nsWindow.cpp 22 Sep 2006 05:07:04 -0000
|
||||
@@ -2859,19 +2859,16 @@ nsWindow::NativeCreate(nsIWidget
|
||||
g_signal_connect(G_OBJECT(mShell), "window_state_event",
|
||||
G_CALLBACK(window_state_event_cb), NULL);
|
||||
|
||||
GtkSettings* default_settings = gtk_settings_get_default();
|
||||
g_signal_connect_after(default_settings,
|
||||
"notify::gtk-theme-name",
|
||||
G_CALLBACK(theme_changed_cb), this);
|
||||
g_signal_connect_after(default_settings,
|
||||
- "notify::gtk-key-theme-name",
|
||||
- G_CALLBACK(theme_changed_cb), this);
|
||||
- g_signal_connect_after(default_settings,
|
||||
"notify::gtk-font-name",
|
||||
G_CALLBACK(theme_changed_cb), this);
|
||||
}
|
||||
|
||||
if (mContainer) {
|
||||
g_signal_connect_after(G_OBJECT(mContainer), "size_allocate",
|
||||
G_CALLBACK(size_allocate_cb), NULL);
|
||||
g_signal_connect(G_OBJECT(mContainer), "expose_event",
|
263
firefox-1.5-theme-change.patch
Normal file
263
firefox-1.5-theme-change.patch
Normal file
@ -0,0 +1,263 @@
|
||||
Index: layout/base/nsPresContext.cpp
|
||||
===================================================================
|
||||
RCS file: /cvsroot/mozilla/layout/base/nsPresContext.cpp,v
|
||||
retrieving revision 3.288.12.2.4.1
|
||||
diff -d -u -p -r3.288.12.2.4.1 nsPresContext.cpp
|
||||
--- layout/base/nsPresContext.cpp 21 Apr 2006 23:30:50 -0000 3.288.12.2.4.1
|
||||
+++ layout/base/nsPresContext.cpp 26 Sep 2006 19:26:40 -0000
|
||||
@@ -73,6 +73,9 @@
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsAutoPtr.h"
|
||||
#include "nsEventStateManager.h"
|
||||
+#include "nsIEventQueue.h"
|
||||
+#include "nsIEventQueueService.h"
|
||||
+
|
||||
#ifdef IBMBIDI
|
||||
#include "nsBidiPresUtils.h"
|
||||
#endif // IBMBIDI
|
||||
@@ -267,6 +270,7 @@ nsPresContext::~nsPresContext()
|
||||
NS_IF_RELEASE(mDeviceContext);
|
||||
NS_IF_RELEASE(mLookAndFeel);
|
||||
NS_IF_RELEASE(mLangGroup);
|
||||
+ NS_IF_RELEASE(mEventQueueService);
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS2(nsPresContext, nsPresContext, nsIObserver)
|
||||
@@ -285,6 +289,17 @@ static const char* const kGenericFont[]
|
||||
".fantasy."
|
||||
};
|
||||
|
||||
+// Set to true when LookAndFeelChanged needs to be called. This is used
|
||||
+// because the look and feel is a service, so there's no need to notify it from
|
||||
+// more than one prescontext.
|
||||
+static PRBool sLookAndFeelChanged;
|
||||
+
|
||||
+// Set to true when ThemeChanged needs to be called on mTheme. This is used
|
||||
+// because mTheme is a service, so there's no need to notify it from more than
|
||||
+// one prescontext.
|
||||
+static PRBool sThemeChanged;
|
||||
+
|
||||
+
|
||||
void
|
||||
nsPresContext::GetFontPreferences()
|
||||
{
|
||||
@@ -709,6 +724,9 @@ nsPresContext::Init(nsIDeviceContext* aD
|
||||
this);
|
||||
#endif
|
||||
|
||||
+ rv = CallGetService(NS_EVENTQUEUESERVICE_CONTRACTID, &mEventQueueService);
|
||||
+ NS_ENSURE_SUCCESS(rv, rv);
|
||||
+
|
||||
// Initialize our state from the user preferences
|
||||
GetUserPreferences();
|
||||
|
||||
@@ -1180,33 +1198,126 @@ nsPresContext::GetTheme()
|
||||
void
|
||||
nsPresContext::ThemeChanged()
|
||||
{
|
||||
+ if (!mPendingThemeChanged) {
|
||||
+ sLookAndFeelChanged = PR_TRUE;
|
||||
+ sThemeChanged = PR_TRUE;
|
||||
+
|
||||
+ nsCOMPtr<nsIEventQueue> eventQ;
|
||||
+ mEventQueueService->
|
||||
+ GetSpecialEventQueue(nsIEventQueueService::UI_THREAD_EVENT_QUEUE,
|
||||
+ getter_AddRefs(eventQ));
|
||||
+ if (!eventQ) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ PLEvent* evt = new PLEvent();
|
||||
+ if (!evt) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ PL_InitEvent(evt, this, nsPresContext::ThemeChangedInternal,
|
||||
+ nsPresContext::DestroyThemeChangeEvt);
|
||||
+
|
||||
+ // After this point, event destruction will release |this|
|
||||
+ NS_ADDREF_THIS();
|
||||
+
|
||||
+ nsresult rv = eventQ->PostEvent(evt);
|
||||
+ if (NS_FAILED(rv)) {
|
||||
+ PL_DestroyEvent(evt);
|
||||
+ } else {
|
||||
+ mPendingThemeChanged = PR_TRUE;
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+void* PR_CALLBACK
|
||||
+nsPresContext::ThemeChangedInternal(PLEvent *aEvent)
|
||||
+{
|
||||
+ nsPresContext* pc = NS_STATIC_CAST(nsPresContext*, aEvent->owner);
|
||||
+
|
||||
+ pc->mPendingThemeChanged = PR_FALSE;
|
||||
+
|
||||
// Tell the theme that it changed, so it can flush any handles to stale theme
|
||||
// data.
|
||||
- if (mTheme)
|
||||
- mTheme->ThemeChanged();
|
||||
+ if (pc->mTheme && sThemeChanged) {
|
||||
+ pc->mTheme->ThemeChanged();
|
||||
+ sThemeChanged = PR_FALSE;
|
||||
+ }
|
||||
|
||||
// Clear all cached nsILookAndFeel colors.
|
||||
- if (mLookAndFeel)
|
||||
- mLookAndFeel->LookAndFeelChanged();
|
||||
+ if (pc->mLookAndFeel && sLookAndFeelChanged) {
|
||||
+ pc->mLookAndFeel->LookAndFeelChanged();
|
||||
+ sLookAndFeelChanged = PR_FALSE;
|
||||
+ }
|
||||
|
||||
// We have to clear style data because the assumption of style rule
|
||||
// immutability has been violated since any style rule that uses
|
||||
// system colors or fonts (and probably -moz-appearance as well) has
|
||||
// changed.
|
||||
- nsPresContext::ClearStyleDataAndReflow();
|
||||
+ pc->ClearStyleDataAndReflow();
|
||||
+
|
||||
+ return nsnull;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+void PR_CALLBACK
|
||||
+nsPresContext::DestroyThemeChangeEvt(PLEvent* aEvent)
|
||||
+{
|
||||
+ nsPresContext* pc = NS_STATIC_CAST(nsPresContext*, aEvent->owner);
|
||||
+ NS_RELEASE(pc);
|
||||
+ delete aEvent;
|
||||
}
|
||||
|
||||
void
|
||||
nsPresContext::SysColorChanged()
|
||||
{
|
||||
- if (mLookAndFeel) {
|
||||
+ if (!mPendingSysColorChanged) {
|
||||
+ sLookAndFeelChanged = PR_TRUE;
|
||||
+
|
||||
+ nsCOMPtr<nsIEventQueue> eventQ;
|
||||
+ mEventQueueService->
|
||||
+ GetSpecialEventQueue(nsIEventQueueService::UI_THREAD_EVENT_QUEUE,
|
||||
+ getter_AddRefs(eventQ));
|
||||
+ if (!eventQ) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ PLEvent* evt = new PLEvent();
|
||||
+ if (!evt) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ PL_InitEvent(evt, this, nsPresContext::SysColorChangedInternal,
|
||||
+ nsPresContext::DestroySysColorChangeEvt);
|
||||
+
|
||||
+ // After this point, event destruction will release |this|
|
||||
+ NS_ADDREF_THIS();
|
||||
+
|
||||
+ nsresult rv = eventQ->PostEvent(evt);
|
||||
+ if (NS_FAILED(rv)) {
|
||||
+ PL_DestroyEvent(evt);
|
||||
+ } else {
|
||||
+ mPendingSysColorChanged = PR_TRUE;
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+void* PR_CALLBACK
|
||||
+nsPresContext::SysColorChangedInternal(PLEvent *aEvent)
|
||||
+{
|
||||
+ nsPresContext* pc = NS_STATIC_CAST(nsPresContext*, aEvent->owner);
|
||||
+
|
||||
+ pc->mPendingSysColorChanged = PR_FALSE;
|
||||
+
|
||||
+ if (pc->mLookAndFeel && sLookAndFeelChanged) {
|
||||
// Don't use the cached values for the system colors
|
||||
- mLookAndFeel->LookAndFeelChanged();
|
||||
+ pc->mLookAndFeel->LookAndFeelChanged();
|
||||
+ sLookAndFeelChanged = PR_FALSE;
|
||||
}
|
||||
-
|
||||
+
|
||||
// Reset default background and foreground colors for the document since
|
||||
// they may be using system colors
|
||||
- GetDocumentColorPreferences();
|
||||
+ pc->GetDocumentColorPreferences();
|
||||
|
||||
// Clear out all of the style data since it may contain RGB values
|
||||
// which originated from system colors.
|
||||
@@ -1222,7 +1333,17 @@ nsPresContext::SysColorChanged()
|
||||
// data without reflowing/updating views will lead to incorrect change hints
|
||||
// later, because when generating change hints, any style structs which have
|
||||
// been cleared and not reread are assumed to not be used at all.
|
||||
- ClearStyleDataAndReflow();
|
||||
+ pc->ClearStyleDataAndReflow();
|
||||
+
|
||||
+ return nsnull;
|
||||
+}
|
||||
+
|
||||
+void PR_CALLBACK
|
||||
+nsPresContext::DestroySysColorChangeEvt(PLEvent* aEvent)
|
||||
+{
|
||||
+ nsPresContext* pc = NS_STATIC_CAST(nsPresContext*, aEvent->owner);
|
||||
+ NS_RELEASE(pc);
|
||||
+ delete aEvent;
|
||||
}
|
||||
|
||||
void
|
||||
Index: layout/base/nsPresContext.h
|
||||
===================================================================
|
||||
RCS file: /cvsroot/mozilla/layout/base/nsPresContext.h,v
|
||||
retrieving revision 3.150.4.2
|
||||
diff -d -u -p -r3.150.4.2 nsPresContext.h
|
||||
--- layout/base/nsPresContext.h 29 Aug 2005 16:15:39 -0000 3.150.4.2
|
||||
+++ layout/base/nsPresContext.h 26 Sep 2006 19:26:40 -0000
|
||||
@@ -56,6 +56,7 @@
|
||||
#include "nsCRT.h"
|
||||
#include "nsIPrintSettings.h"
|
||||
#include "nsPropertyTable.h"
|
||||
+#include "plevent.h"
|
||||
#ifdef IBMBIDI
|
||||
class nsBidiPresUtils;
|
||||
#endif // IBMBIDI
|
||||
@@ -76,6 +77,7 @@ class nsIAtom;
|
||||
class nsIEventStateManager;
|
||||
class nsIURI;
|
||||
class nsILookAndFeel;
|
||||
+class nsIEventQueueService;
|
||||
class nsICSSPseudoComparator;
|
||||
class nsIAtom;
|
||||
struct nsStyleStruct;
|
||||
@@ -627,6 +629,14 @@ public:
|
||||
const nscoord* GetBorderWidthTable() { return mBorderWidthTable; }
|
||||
|
||||
protected:
|
||||
+ static NS_HIDDEN_(void*) PR_CALLBACK ThemeChangedInternal(PLEvent* aEvent);
|
||||
+ static NS_HIDDEN_(void*) PR_CALLBACK SysColorChangedInternal(PLEvent* aEvent);
|
||||
+ static NS_HIDDEN_(void) PR_CALLBACK DestroyThemeChangeEvt(PLEvent* aEvent);
|
||||
+ static NS_HIDDEN_(void) PR_CALLBACK DestroySysColorChangeEvt(PLEvent* aEvent);
|
||||
+
|
||||
+ friend void* PR_CALLBACK ThemeChangedInternal(PLEvent* aEvent);
|
||||
+ friend void* PR_CALLBACK SysColorChangedInternal(PLEvent* aEvent);
|
||||
+
|
||||
NS_HIDDEN_(void) SetImgAnimations(nsIContent *aParent, PRUint16 aMode);
|
||||
NS_HIDDEN_(void) GetDocumentColorPreferences();
|
||||
|
||||
@@ -654,6 +664,7 @@ protected:
|
||||
// from gfx back to layout.
|
||||
nsIEventStateManager* mEventManager; // [STRONG]
|
||||
nsILookAndFeel* mLookAndFeel; // [STRONG]
|
||||
+ nsIEventQueueService *mEventQueueService; // [STRONG]
|
||||
nsIAtom* mMedium; // initialized by subclass ctors;
|
||||
// weak pointer to static atom
|
||||
|
||||
@@ -724,6 +735,8 @@ protected:
|
||||
unsigned mCanPaginatedScroll : 1;
|
||||
unsigned mDoScaledTwips : 1;
|
||||
unsigned mEnableJapaneseTransform : 1;
|
||||
+ unsigned mPendingSysColorChanged : 1;
|
||||
+ unsigned mPendingThemeChanged : 1;
|
||||
#ifdef IBMBIDI
|
||||
unsigned mIsVisual : 1;
|
||||
unsigned mIsBidiSystem : 1;
|
@ -8,7 +8,7 @@
|
||||
Summary: Mozilla Thunderbird mail/newsgroup client
|
||||
Name: thunderbird
|
||||
Version: 1.5.0.7
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Epoch: 0
|
||||
URL: http://www.mozilla.org/projects/thunderbird/
|
||||
License: MPL
|
||||
@ -50,8 +50,20 @@ Patch81: firefox-1.5-nopangoxft.patch
|
||||
Patch82: firefox-1.5-pango-mathml.patch
|
||||
Patch83: firefox-1.5-pango-cursor-position.patch
|
||||
|
||||
# patches from upstream (Patch100+)
|
||||
Patch102: thunderbird-1.5-pango-start.patch
|
||||
# Other
|
||||
Patch100: firefox-1.5-gtk-key-theme-crash.patch
|
||||
Patch101: firefox-1.5-embedwindow-visibility.patch
|
||||
Patch102: firefox-1.5-theme-change.patch
|
||||
|
||||
%if %{official_branding}
|
||||
# Required by Mozilla Corporation
|
||||
|
||||
|
||||
%else
|
||||
# Not yet approved by Mozillla Corporation
|
||||
|
||||
|
||||
%endif
|
||||
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
@ -99,7 +111,21 @@ Mozilla Thunderbird is a standalone mail and newsgroup client.
|
||||
%patch82 -p1
|
||||
%patch83 -p1
|
||||
|
||||
%patch102 -p1
|
||||
%patch100 -p0 -b .gtk-key-theme-crash
|
||||
%patch101 -p0 -b .embedwindow-visibility
|
||||
%patch102 -p0 -b .theme-change
|
||||
|
||||
|
||||
%if %{official_branding}
|
||||
# Required by Mozilla Corporation
|
||||
|
||||
|
||||
%else
|
||||
# Not yet approved by Mozillla Corporation
|
||||
|
||||
|
||||
%endif
|
||||
|
||||
|
||||
%{__rm} -f .mozconfig
|
||||
%{__cp} %{SOURCE10} .mozconfig
|
||||
@ -217,6 +243,11 @@ update-desktop-database %{_datadir}/applications
|
||||
#===============================================================================
|
||||
|
||||
%changelog
|
||||
* Wed Sep 27 2006 Christopher Aillon <caillon@redhat.com> - 1.5.0.7-2
|
||||
- Fix crash when changing gtk key theme
|
||||
- Prevent UI freezes while changing GNOME theme
|
||||
- Remove verbiage about pango; no longer required by upstream.
|
||||
|
||||
* Wed Sep 13 2006 Christopher Aillon <caillon@redhat.com> - 1.5.0.7-1
|
||||
- Update to 1.5.0.7
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user