From 26a1b313febbf360ee7ca045885409dd5d49010d Mon Sep 17 00:00:00 2001 From: "mkaply%us.ibm.com" Date: Tue, 22 May 2001 14:11:17 +0000 Subject: [PATCH] #79954 r=anthonyd, sr=sfraser Enable middle button paste on OS/2 by using kGlobalClipboard git-svn-id: svn://10.0.0.236/trunk@95677 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/editor/base/nsEditorEventListeners.cpp | 12 ++++++++++-- .../editor/libeditor/text/nsEditorEventListeners.cpp | 12 ++++++++++-- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/mozilla/editor/base/nsEditorEventListeners.cpp b/mozilla/editor/base/nsEditorEventListeners.cpp index 3bb75a0cf1f..19725072bbb 100644 --- a/mozilla/editor/base/nsEditorEventListeners.cpp +++ b/mozilla/editor/base/nsEditorEventListeners.cpp @@ -413,10 +413,18 @@ nsTextEditorMouseListener::MouseClick(nsIDOMEvent* aMouseEvent) if (ctrlKey) mailEditor = do_QueryInterface(mEditor); + PRInt32 clipboard; + +#ifdef XP_OS2 + clipboard = nsIClipboard::kGlobalClipboard; +#else + clipboard = nsIClipboard::kSelectionClipboard; +#endif + if (mailEditor) - mailEditor->PasteAsQuotation(nsIClipboard::kSelectionClipboard); + mailEditor->PasteAsQuotation(clipboard); else - editor->Paste(nsIClipboard::kSelectionClipboard); + editor->Paste(clipboard); // Prevent the event from bubbling up to be possibly handled // again by the containing window: diff --git a/mozilla/editor/libeditor/text/nsEditorEventListeners.cpp b/mozilla/editor/libeditor/text/nsEditorEventListeners.cpp index 3bb75a0cf1f..19725072bbb 100644 --- a/mozilla/editor/libeditor/text/nsEditorEventListeners.cpp +++ b/mozilla/editor/libeditor/text/nsEditorEventListeners.cpp @@ -413,10 +413,18 @@ nsTextEditorMouseListener::MouseClick(nsIDOMEvent* aMouseEvent) if (ctrlKey) mailEditor = do_QueryInterface(mEditor); + PRInt32 clipboard; + +#ifdef XP_OS2 + clipboard = nsIClipboard::kGlobalClipboard; +#else + clipboard = nsIClipboard::kSelectionClipboard; +#endif + if (mailEditor) - mailEditor->PasteAsQuotation(nsIClipboard::kSelectionClipboard); + mailEditor->PasteAsQuotation(clipboard); else - editor->Paste(nsIClipboard::kSelectionClipboard); + editor->Paste(clipboard); // Prevent the event from bubbling up to be possibly handled // again by the containing window: