Bug 883554 - Only empty clipboard for known clipboard types (global). r=jimm
authorBrian R. Bondy <netzen@gmail.com>
Sat, 06 Jul 2013 10:57:10 -0400
changeset 137544 b3e2267ea81193c7ed2fc0a2c9db58e1a0654875
parent 137543 377bb82be13aefeb0cb3816588376d79702f894f
child 137545 dd9865f43dbe5d1a6f8783a7b46eab72c2ae7df0
push id30589
push userbbondy@mozilla.com
push dateSat, 06 Jul 2013 14:57:32 +0000
treeherdermozilla-inbound@b3e2267ea811 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimm
bugs883554
milestone25.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 883554 - Only empty clipboard for known clipboard types (global). r=jimm
widget/windows/nsClipboard.cpp
--- a/widget/windows/nsClipboard.cpp
+++ b/widget/windows/nsClipboard.cpp
@@ -922,17 +922,17 @@ nsClipboard::GetNativeClipboardData ( ns
   }
   return res;
 
 }
 
 NS_IMETHODIMP
 nsClipboard::EmptyClipboard(int32_t aWhichClipboard)
 {
-  if (::OpenClipboard(nullptr)) { 
+  if (aWhichClipboard == kGlobalClipboard && ::OpenClipboard(nullptr)) {
     ::EmptyClipboard();
     ::CloseClipboard();
   }
   return nsBaseClipboard::EmptyClipboard(aWhichClipboard);
 }
 
 //-------------------------------------------------------------------------
 NS_IMETHODIMP nsClipboard::HasDataMatchingFlavors(const char** aFlavorList,