зеркало из https://github.com/mozilla/pjs.git
Bug 531580 - ""gtk_clipboard_get_for_display: assertion `!display->closed' failed" after closing browser" [r=karlt]
This commit is contained in:
Родитель
1910252b12
Коммит
3793052726
|
@ -121,18 +121,26 @@ clipboard_text_received(GtkClipboard *clipboard,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
|
|
||||||
nsClipboard::nsClipboard()
|
nsClipboard::nsClipboard()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
nsClipboard::~nsClipboard()
|
nsClipboard::~nsClipboard()
|
||||||
{
|
{
|
||||||
|
// We have to clear clipboard before gdk_display_close() call.
|
||||||
|
// See bug 531580 for details.
|
||||||
|
if (mGlobalTransferable) {
|
||||||
|
gtk_clipboard_clear(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD));
|
||||||
|
}
|
||||||
|
if (mSelectionTransferable) {
|
||||||
|
gtk_clipboard_clear(gtk_clipboard_get(GDK_SELECTION_PRIMARY));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMPL_ISUPPORTS1(nsClipboard, nsIClipboard)
|
NS_IMPL_ISUPPORTS1(nsClipboard, nsIClipboard)
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
nsClipboard::Init(void)
|
nsClipboard::Init(void)
|
||||||
{
|
{
|
||||||
nsresult rv;
|
nsresult rv;
|
||||||
nsCOMPtr<nsIObserverService> os
|
nsCOMPtr<nsIObserverService> os
|
||||||
(do_GetService("@mozilla.org/observer-service;1", &rv));
|
(do_GetService("@mozilla.org/observer-service;1", &rv));
|
||||||
|
|
Загрузка…
Ссылка в новой задаче