Skip to content

Commit 0a99081

Browse files
committed
[GTK4] Disable Clipboard.getAvailableTypes()
This method is using GTK3-specific methods and therefore can't be used in a GTK4 environment. Instead, an empty array is returned.
1 parent 3670670 commit 0a99081

File tree

1 file changed

+4
-0
lines changed
  • bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd

1 file changed

+4
-0
lines changed

bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/Clipboard.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,10 @@ public TransferData[] getAvailableTypes(int clipboards) {
571571
checkWidget();
572572

573573
//TODO: [GTK4] This currently will not work in GTK4
574+
if (GTK.GTK4) {
575+
return new TransferData[0];
576+
}
577+
574578
TransferData[] result = null;
575579
if ((clipboards & DND.CLIPBOARD) != 0) {
576580
int[] types = getAvailableClipboardTypes();

0 commit comments

Comments
 (0)