提交 7e500f20 编写于 作者: S son

6607163: Linux: Cannot copy image from Java to OpenOffice

Summary: TARGETS should have type ATOM
Reviewed-by: denis
上级 6d4eea74
/*
* Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved.
* Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -281,8 +281,10 @@ public class XSelection {
if (targetsGetter.isExecuted() && !targetsGetter.isDisposed() &&
(targetsGetter.getActualType() == XAtom.XA_ATOM ||
targetsGetter.getActualType() == XDataTransferer.TARGETS_ATOM.getAtom()) &&
targetsGetter.getActualFormat() == 32) {
targetsGetter.getActualFormat() == 32)
{
// we accept property with TARGETS type to be compatible with old jdks
// see 6607163
int count = (int)targetsGetter.getNumberOfItems();
if (count > 0) {
long atoms = targetsGetter.getData();
......@@ -687,7 +689,7 @@ public class XSelection {
XToolkit.awtLock();
try {
XlibWrapper.XChangeProperty(XToolkit.getDisplay(), requestor,
property, format, dataFormat,
property, XAtom.XA_ATOM, dataFormat,
XlibWrapper.PropModeReplace,
nativeDataPtr, count);
} finally {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册