зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1590965 call gtk_clipboard_store() regardless of whether Gecko is providing the clipboard r=stransky
This stores the clipboard even if it was set in a GTK dialog. Depends on D50764 Differential Revision: https://phabricator.services.mozilla.com/D50765 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
311a714c94
Коммит
8058c82dba
|
@ -109,20 +109,11 @@ nsresult nsClipboard::Init(void) {
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult nsClipboard::Store(void) {
|
||||
LOGCLIP(("nsClipboard::Store\n"));
|
||||
|
||||
if (mGlobalTransferable) {
|
||||
GtkClipboard* clipboard = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD);
|
||||
gtk_clipboard_store(clipboard);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsClipboard::Observe(nsISupports* aSubject, const char* aTopic,
|
||||
const char16_t* aData) {
|
||||
Store();
|
||||
// Save global clipboard content to CLIPBOARD_MANAGER
|
||||
gtk_clipboard_store(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -62,9 +62,6 @@ class nsClipboard : public nsIClipboard, public nsIObserver {
|
|||
private:
|
||||
virtual ~nsClipboard();
|
||||
|
||||
// Save global clipboard content to gtk
|
||||
nsresult Store(void);
|
||||
|
||||
// Get our hands on the correct transferable, given a specific
|
||||
// clipboard
|
||||
nsITransferable* GetTransferable(int32_t aWhichClipboard);
|
||||
|
|
Загрузка…
Ссылка в новой задаче