diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index 14b44cb1bb7..4a236871b21 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -22,15 +22,15 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.
**Environment:**
-- Select the platforms on which the behavior is seen.
-[x] All OS
-[ ] Windows
-[ ] Linux
-[ ] macOS
-
- - Additional OS info (e.g. OS version, Linux Desktop, etc)
-
- - JRE/JDK version
+1. Select the platform(s) on which the behavior is seen:
+- - [x] All OS
+- - [ ] Windows
+- - [ ] Linux
+- - [ ] macOS
+
+2. Additional OS info (e.g. OS version, Linux Desktop, etc)
+
+3. JRE/JDK version
**Version since**
Eclipse or SWT version since when the behavior is seen [e.g. 4.23]
diff --git a/.github/workflows/rebase.yml b/.github/workflows/rebase.yml
new file mode 100644
index 00000000000..f817d6f6009
--- /dev/null
+++ b/.github/workflows/rebase.yml
@@ -0,0 +1,19 @@
+name: Automatic Rebase
+on:
+ issue_comment:
+ types: [created]
+jobs:
+ rebase:
+ name: Rebase
+ if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase')
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout the latest code
+ uses: actions/checkout@v3
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
+ - name: Automatic Rebase
+ uses: cirrus-actions/rebase@1.7
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/Jenkinsfile b/Jenkinsfile
index d7d07816a92..15ada66451b 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -22,7 +22,7 @@ spec:
memory: "512Mi"
cpu: "500m"
- name: container
- image: akurtakov/swtbuild@sha256:fca953c5f0fa9fadb92b1875c1942f6042f4bd51327d1e1e8e40f39923103fe1
+ image: akurtakov/swtbuild@sha256:43085feb91b1703e019a282188d996607385dcd746a7441cb7d2ca453a0adcc9
tty: true
command: [ "uid_entrypoint", "cat" ]
resources:
@@ -37,9 +37,9 @@ spec:
mountPath: "/home/jenkins/.m2/settings.xml"
subPath: "settings.xml"
readOnly: true
- - name: "toolchains-xml"
- mountPath: "/home/jenkins/.m2/toolchains.xml"
- subPath: "toolchains.xml"
+ - name: toolchains-xml
+ mountPath: /home/jenkins/.m2/toolchains.xml
+ subPath: toolchains.xml
readOnly: true
- name: "settings-security-xml"
mountPath: "/home/jenkins/.m2/settings-security.xml"
@@ -97,7 +97,7 @@ spec:
steps {
container('container') {
wrap([$class: 'Xvnc', useXauthority: true]) {
- withEnv(["JAVA_HOME=${ tool 'openjdk-jdk11-latest' }"]) {
+ withEnv(["JAVA_HOME=${ tool 'openjdk-jdk17-latest' }"]) {
dir ('eclipse.platform.swt.binaries') {
sh '/opt/tools/apache-maven/latest/bin/mvn --batch-mode -Pbuild-individual-bundles -DforceContextQualifier=zzz -Dnative=gtk.linux.x86_64 -DskipJni -DskipRust -Dcompare-version-with-baselines.skip=true -Dmaven.compiler.failOnWarning=true install '
}
diff --git a/bundles/org.eclipse.swt.tools.base/pom.xml b/bundles/org.eclipse.swt.tools.base/pom.xml
index 24fec07e60c..6d02cecae29 100644
--- a/bundles/org.eclipse.swt.tools.base/pom.xml
+++ b/bundles/org.eclipse.swt.tools.base/pom.xml
@@ -14,7 +14,7 @@
eclipse.platform.swt.localbuild
eclipse.platform.swt
- 4.24.0-SNAPSHOT
+ 4.25.0-SNAPSHOT
../../local-build/local-build-parent/
org.eclipse.swt
diff --git a/bundles/org.eclipse.swt.tools.spies/pom.xml b/bundles/org.eclipse.swt.tools.spies/pom.xml
index da9ff528770..4d1f5824cfd 100644
--- a/bundles/org.eclipse.swt.tools.spies/pom.xml
+++ b/bundles/org.eclipse.swt.tools.spies/pom.xml
@@ -14,7 +14,7 @@
eclipse.platform.swt.localbuild
eclipse.platform.swt
- 4.24.0-SNAPSHOT
+ 4.25.0-SNAPSHOT
../../local-build/local-build-parent/
org.eclipse.swt
diff --git a/bundles/org.eclipse.swt.tools/META-INF/MANIFEST.MF b/bundles/org.eclipse.swt.tools/META-INF/MANIFEST.MF
index 58fdbb11621..daba84f1017 100644
--- a/bundles/org.eclipse.swt.tools/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.swt.tools/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-SymbolicName: org.eclipse.swt.tools; singleton:=true
-Bundle-Version: 3.109.400.qualifier
+Bundle-Version: 3.109.500.qualifier
Bundle-ManifestVersion: 2
Export-Package: org.eclipse.swt.tools.internal; x-internal:=true
Bundle-ActivationPolicy: lazy
diff --git a/bundles/org.eclipse.swt.tools/Oomph/platformSwt.setup b/bundles/org.eclipse.swt.tools/Oomph/platformSwt.setup
index 2074ef24886..36d6713f7c0 100644
--- a/bundles/org.eclipse.swt.tools/Oomph/platformSwt.setup
+++ b/bundles/org.eclipse.swt.tools/Oomph/platformSwt.setup
@@ -220,8 +220,6 @@
name="org.eclipse.jdt.feature.group"/>
-
diff --git a/bundles/org.eclipse.swt.tools/pom.xml b/bundles/org.eclipse.swt.tools/pom.xml
index a6d75f72825..02efb92d4b6 100644
--- a/bundles/org.eclipse.swt.tools/pom.xml
+++ b/bundles/org.eclipse.swt.tools/pom.xml
@@ -14,11 +14,11 @@
eclipse.platform.swt.localbuild
eclipse.platform.swt
- 4.24.0-SNAPSHOT
+ 4.25.0-SNAPSHOT
../../local-build/local-build-parent/
org.eclipse.swt
org.eclipse.swt.tools
- 3.109.400-SNAPSHOT
+ 3.109.500-SNAPSHOT
eclipse-plugin
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java
index 022b5f72eb4..65f5f72b76e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java
@@ -189,6 +189,7 @@ public class CTabFolder extends Composite {
boolean selectionGradientVertical;
Color selectionForeground;
Color selectionBackground;
+ int selectionHighlightBarThickness = 2;
/* Unselected item appearance */
Color[] gradientColors;
@@ -3470,6 +3471,27 @@ public void setSelectionForeground (Color color) {
if (selectedIndex > -1) redraw();
}
+/**
+ * Sets the thickness of the highlight bar on the selected tab. The highlight bar is drawn in the top margin of the selected tab.
+ *
+ * @param thickness the desired thickness. Must be positive and lower than {@link CTabFolderRenderer#ITEM_TOP_MARGIN} (that is either {@code 0} {@code 1} or {@code 2} at the moment),for correct results.
+ * Set to {@code 0} to not draw a highlight bar.
+ * @exception SWTException
+ * - ERROR_WIDGET_DISPOSED - if the receiver has been disposed
+ * - ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
+ * - ERROR_INVALID_ARGUMENT - if the parameter value is invalid
+ *
+ * @implNote Default {@link CTabFolderRenderer} currently ignores this setting if {@link #getSimple()} is {@code true}.
+ * @since 3.121
+ */
+public void setSelectionBarThickness(int thickness) {
+ checkWidget();
+ if (thickness < 0) {
+ SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+ }
+ this.selectionHighlightBarThickness = thickness;
+}
+
/**
* Sets the shape that the CTabFolder will use to render itself.
*
@@ -4192,7 +4214,7 @@ public void setHighlightEnabled(boolean enabled) {
* highlighted.
*
* @return true
if the selected tab is rendered as
- * highlighted
+ * highlighted.
*
* @exception SWTException
*
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderRenderer.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderRenderer.java
index c989b0783e3..5aeca8ac701 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderRenderer.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderRenderer.java
@@ -1354,10 +1354,18 @@ void drawSelected(int itemIndex, GC gc, Rectangle bounds, int state ) {
}
}
- //Highlight MUST be drawn before the outline so that outline can cover it in the right spots (start of swoop)
+ //Highlight colors MUST be drawn before the outline so that outline can cover it in the right spots (start of swoop)
//otherwise the curve looks jagged
drawHighlight(gc, bounds, state, rightEdge);
+ // draw highlight marker of selected tab
+ if (parent.selectionHighlightBarThickness > 0 && parent.simple) {
+ Color previousColor = gc.getBackground();
+ gc.setBackground(item.getDisplay().getSystemColor(parent.shouldHighlight() ? SWT.COLOR_LIST_SELECTION : SWT.COLOR_WIDGET_DISABLED_FOREGROUND));
+ gc.fillRectangle(x + 1 /* outline */, parent.onBottom ? y + height - 1 - parent.selectionHighlightBarThickness : y + 1, width - 2 /*outline*/, parent.selectionHighlightBarThickness);
+ gc.setBackground(previousColor);
+ }
+
// draw outline
shape[0] = Math.max(0, borderLeft - 1);
if (borderLeft == 0 && itemIndex == parent.firstIndex) {
@@ -1797,4 +1805,5 @@ void updateCurves () {
boolean useEllipses() {
return parent.simple;
}
+
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/Clipboard.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/Clipboard.java
index 3fe086b8689..378433f69f4 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/Clipboard.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/Clipboard.java
@@ -15,6 +15,7 @@
import org.eclipse.swt.*;
+import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.gtk.*;
import org.eclipse.swt.internal.gtk3.*;
@@ -348,6 +349,18 @@ private Object getContents_gtk4(Transfer transfer, int clipboards) {
}
return str;
}
+ if(transfer.getTypeIds()[0] == (int)GDK.GDK_TYPE_PIXBUF()) {
+ ImageData imgData = null;
+ OS.g_value_init(value, GDK.GDK_TYPE_PIXBUF());
+ if (!GTK4.gdk_content_provider_get_value (contents, value, null)) return null;
+ long pixbufObj = OS.g_value_get_object(value);
+ if (pixbufObj != 0) {
+ Image img = Image.gtk_new_from_pixbuf(Display.getCurrent(), SWT.BITMAP, pixbufObj);
+ imgData = img.getImageData();
+ img.dispose();
+ }
+ return imgData;
+ }
//TODO: [GTK4] Other cases
return null;
}
@@ -539,6 +552,8 @@ public TransferData[] getAvailableTypes() {
*/
public TransferData[] getAvailableTypes(int clipboards) {
checkWidget();
+
+ //TODO: [GTK4] This currently will not work in GTK4
TransferData[] result = null;
if ((clipboards & DND.CLIPBOARD) != 0) {
int[] types = getAvailableClipboardTypes();
@@ -585,6 +600,12 @@ public TransferData[] getAvailableTypes(int clipboards) {
*/
public String[] getAvailableTypeNames() {
checkWidget();
+ if(GTK.GTK4) {
+ long formatsCStr = GTK4.gdk_content_formats_to_string(GTK4.gdk_clipboard_get_formats(Clipboard.GTKCLIPBOARD));
+ String formatsStr = Converter.cCharPtrToJavaString(formatsCStr, true);
+ String[] types = formatsStr.split(" ");
+ return types;
+ }
int[] types1 = getAvailableClipboardTypes();
int[] types2 = getAvailablePrimaryTypes();
String[] result = new String[types1.length + types2.length];
@@ -637,12 +658,6 @@ private int[] getAvailablePrimaryTypes() {
}
private int[] getAvailableClipboardTypes () {
- if(GTK.GTK4) {
- /*TODO: can use gdk_clipboard_get_formats and gdk_content_formats_to_string
- *Then from the comma separated list of formats find their respective IDs
- */
- }
-
int[] types = new int[0];
long selection_data = gtk_clipboard_wait_for_contents(GTKCLIPBOARD, TARGET);
if (selection_data != 0) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ClipboardProxy.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ClipboardProxy.java
index 0ff502762c8..b4b4f11666a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ClipboardProxy.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ClipboardProxy.java
@@ -14,6 +14,8 @@
package org.eclipse.swt.dnd;
+import org.eclipse.swt.*;
+import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.gtk.*;
import org.eclipse.swt.internal.gtk3.*;
@@ -220,8 +222,6 @@ boolean setData(Clipboard owner, Object[] data, Transfer[] dataTypes, int clipbo
private boolean setData_gtk4(Clipboard owner, Object[] data, Transfer[] dataTypes, int clipboards) {
boolean result = false;
-
- //Handle the text transfer case first
for (int i = 0; i < dataTypes.length; i++) {
Transfer transfer = dataTypes[i];
String[] typeNames = transfer.getTypeNames();
@@ -232,15 +232,25 @@ private boolean setData_gtk4(Clipboard owner, Object[] data, Transfer[] dataType
activeClipboard = owner;
}
}
- //TODO: [GTK4] Other cases for setting data
return result;
}
private boolean setContentFromType(long clipboard, String string, Object data) {
- if(data != null) {
+ if (data == null ) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+ else {
if(string.equals("STRING") || string.equals("text/rtf")) {
GTK4.gdk_clipboard_set_text(clipboard, Converter.javaStringToCString((String)data));
}
+ if(string.equals("PIXBUF")) {
+ if(!(data instanceof ImageData)) DND.error(DND.ERROR_INVALID_DATA);
+ ImageData imgData = (ImageData)data;
+ Image image = new Image(Display.getCurrent(), imgData);
+ long pixbuf = ImageList.createPixbuf(image);
+ if (pixbuf != 0) {
+ GTK4.gdk_clipboard_set(clipboard, GDK.GDK_TYPE_PIXBUF(), pixbuf);
+ }
+ image.dispose();
+ }
return true;
}
return false;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ImageTransfer.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ImageTransfer.java
index 31b9b27ae9f..7aacfe54383 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ImageTransfer.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ImageTransfer.java
@@ -40,27 +40,27 @@ public class ImageTransfer extends ByteArrayTransfer {
private static ImageTransfer _instance = new ImageTransfer();
private static final String JPEG = "image/jpeg"; //$NON-NLS-1$
- private static final int JPEG_ID = registerType(JPEG);
+ private static final int JPEG_ID = GTK.GTK4 ? 0: registerType(JPEG);
private static final String PNG = "image/png"; //$NON-NLS-1$
- private static final int PNG_ID = registerType(PNG);
+ private static final int PNG_ID = GTK.GTK4 ? 0:registerType(PNG);
private static final String BMP = "image/bmp"; //$NON-NLS-1$
- private static final int BMP_ID = registerType(BMP);
+ private static final int BMP_ID = GTK.GTK4 ? 0:registerType(BMP);
private static final String EPS = "image/eps"; //$NON-NLS-1$
- private static final int EPS_ID = registerType(EPS);
+ private static final int EPS_ID = GTK.GTK4 ? 0:registerType(EPS);
private static final String PCX = "image/pcx"; //$NON-NLS-1$
- private static final int PCX_ID = registerType(PCX);
+ private static final int PCX_ID = GTK.GTK4 ? 0:registerType(PCX);
private static final String PPM = "image/ppm"; //$NON-NLS-1$
- private static final int PPM_ID = registerType(PPM);
+ private static final int PPM_ID = GTK.GTK4 ? 0:registerType(PPM);
private static final String RGB = "image/ppm"; //$NON-NLS-1$
- private static final int RGB_ID = registerType(RGB);
+ private static final int RGB_ID = GTK.GTK4 ? 0:registerType(RGB);
private static final String TGA = "image/tga"; //$NON-NLS-1$
- private static final int TGA_ID = registerType(TGA);
+ private static final int TGA_ID = GTK.GTK4 ? 0:registerType(TGA);
private static final String XBM = "image/xbm"; //$NON-NLS-1$
- private static final int XBM_ID = registerType(XBM);
+ private static final int XBM_ID = GTK.GTK4 ? 0:registerType(XBM);
private static final String XPM = "image/xpm"; //$NON-NLS-1$
- private static final int XPM_ID = registerType(XPM);
+ private static final int XPM_ID = GTK.GTK4 ? 0:registerType(XPM);
private static final String XV = "image/xv"; //$NON-NLS-1$
- private static final int XV_ID = registerType(XV);
+ private static final int XV_ID = GTK.GTK4 ? 0:registerType(XV);
private ImageTransfer() {}
@@ -116,7 +116,7 @@ public void javaToNative(Object object, TransferData transferData) {
transferData.result = 1;
// The following value has been changed from 32 to 8 as a simple fix for #146
// See https://www.cc.gatech.edu/data_files/public/doc/gtk/tutorial/gtk_tut-16.html where it states:
- // "The format field is actually important here - the X server uses it to figure out whether the data
+ // "The format field is actually important here - the X server uses it to figure out whether the data
// needs to be byte-swapped or not. Usually it will be 8 - i.e. a character - or 32 - i.e. a. integer."
transferData.format = 8;
}
@@ -156,11 +156,17 @@ public Object nativeToJava(TransferData transferData) {
@Override
protected int[] getTypeIds(){
+ if(GTK.GTK4) {
+ return new int[] {(int) GDK.GDK_TYPE_PIXBUF()};
+ }
return new int[]{PNG_ID, BMP_ID, EPS_ID, JPEG_ID, PCX_ID, PPM_ID, RGB_ID, TGA_ID, XBM_ID, XPM_ID, XV_ID};
}
@Override
protected String[] getTypeNames(){
+ if(GTK.GTK4) {
+ return new String[]{"PIXBUF"};
+ }
return new String[]{PNG, BMP, EPS, JPEG, PCX, PPM, RGB, TGA, XBM, XPM, XV};
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/common/org/eclipse/swt/internal/Library.java b/bundles/org.eclipse.swt/Eclipse SWT PI/common/org/eclipse/swt/internal/Library.java
index 1cfd996f0be..6f0a63d7939 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/common/org/eclipse/swt/internal/Library.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/common/org/eclipse/swt/internal/Library.java
@@ -30,12 +30,12 @@ public class Library {
/**
* SWT Minor version number (must be in the range 0..999)
*/
- static int MINOR_VERSION = 952;
+ static int MINOR_VERSION = 954;
/**
* SWT revision number (must be >= 0)
*/
- static int REVISION = 11;
+ static int REVISION = 3;
/**
* The JAVA and SWT versions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk4.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk4.c
index 9cfa59985c8..f2fe47b353c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk4.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk4.c
@@ -37,18 +37,20 @@ JNIEXPORT jlong JNICALL GTK4_NATIVE(gdk_1clipboard_1get_1content)
#endif
#ifndef NO_gdk_1clipboard_1get_1formats
-JNIEXPORT void JNICALL GTK4_NATIVE(gdk_1clipboard_1get_1formats)
+JNIEXPORT jlong JNICALL GTK4_NATIVE(gdk_1clipboard_1get_1formats)
(JNIEnv *env, jclass that, jlong arg0)
{
+ jlong rc = 0;
GTK4_NATIVE_ENTER(env, that, gdk_1clipboard_1get_1formats_FUNC);
- gdk_clipboard_get_formats((GdkClipboard*)arg0);
+ rc = (jlong)gdk_clipboard_get_formats((GdkClipboard*)arg0);
GTK4_NATIVE_EXIT(env, that, gdk_1clipboard_1get_1formats_FUNC);
+ return rc;
}
#endif
#ifndef NO_gdk_1clipboard_1set
JNIEXPORT void JNICALL GTK4_NATIVE(gdk_1clipboard_1set)
- (JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2)
+ (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2)
{
GTK4_NATIVE_ENTER(env, that, gdk_1clipboard_1set_FUNC);
gdk_clipboard_set((GdkClipboard*)arg0, (GType)arg1, arg2);
@@ -108,6 +110,18 @@ JNIEXPORT jlong JNICALL GTK4_NATIVE(gdk_1content_1formats_1builder_1new)
}
#endif
+#ifndef NO_gdk_1content_1formats_1to_1string
+JNIEXPORT jlong JNICALL GTK4_NATIVE(gdk_1content_1formats_1to_1string)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ GTK4_NATIVE_ENTER(env, that, gdk_1content_1formats_1to_1string_FUNC);
+ rc = (jlong)gdk_content_formats_to_string((GdkContentFormats *)arg0);
+ GTK4_NATIVE_EXIT(env, that, gdk_1content_1formats_1to_1string_FUNC);
+ return rc;
+}
+#endif
+
#ifndef NO_gdk_1content_1provider_1get_1value
JNIEXPORT jboolean JNICALL GTK4_NATIVE(gdk_1content_1provider_1get_1value)
(JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlongArray arg2)
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk4_stats.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk4_stats.c
index d09cf6eab8b..167122eb971 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk4_stats.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk4_stats.c
@@ -28,6 +28,7 @@ char * GTK4_nativeFunctionNames[] = {
"gdk_1content_1formats_1builder_1add_1mime_1type",
"gdk_1content_1formats_1builder_1free_1to_1formats",
"gdk_1content_1formats_1builder_1new",
+ "gdk_1content_1formats_1to_1string",
"gdk_1content_1provider_1get_1value",
"gdk_1toplevel_1focus",
"gdk_1toplevel_1get_1state",
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk4_stats.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk4_stats.h
index cec9bb929df..c8f65e8b71e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk4_stats.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk4_stats.h
@@ -38,6 +38,7 @@ typedef enum {
gdk_1content_1formats_1builder_1add_1mime_1type_FUNC,
gdk_1content_1formats_1builder_1free_1to_1formats_FUNC,
gdk_1content_1formats_1builder_1new_FUNC,
+ gdk_1content_1formats_1to_1string_FUNC,
gdk_1content_1provider_1get_1value_FUNC,
gdk_1toplevel_1focus_FUNC,
gdk_1toplevel_1get_1state_FUNC,
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c
index 43e6d9ac2d9..8837a0ee091 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c
@@ -12920,6 +12920,18 @@ JNIEXPORT jlong JNICALL OS_NATIVE(g_1value_1get_1int64)
}
#endif
+#ifndef NO_g_1value_1get_1object
+JNIEXPORT jlong JNICALL OS_NATIVE(g_1value_1get_1object)
+ (JNIEnv *env, jclass that, jlong arg0)
+{
+ jlong rc = 0;
+ OS_NATIVE_ENTER(env, that, g_1value_1get_1object_FUNC);
+ rc = (jlong)g_value_get_object((GValue *)arg0);
+ OS_NATIVE_EXIT(env, that, g_1value_1get_1object_FUNC);
+ return rc;
+}
+#endif
+
#ifndef NO_g_1value_1get_1string
JNIEXPORT jlong JNICALL OS_NATIVE(g_1value_1get_1string)
(JNIEnv *env, jclass that, jlong arg0)
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c
index 163b6c27b95..2358926da01 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c
@@ -1092,6 +1092,7 @@ char * OS_nativeFunctionNames[] = {
"g_1value_1get_1float",
"g_1value_1get_1int",
"g_1value_1get_1int64",
+ "g_1value_1get_1object",
"g_1value_1get_1string",
"g_1value_1init",
"g_1value_1peek_1pointer",
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h
index 24e412b3f4b..bd93ff7c0e7 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h
@@ -1066,6 +1066,7 @@ typedef enum {
g_1value_1get_1float_FUNC,
g_1value_1get_1int_FUNC,
g_1value_1get_1int64_FUNC,
+ g_1value_1get_1object_FUNC,
g_1value_1get_1string_FUNC,
g_1value_1init_FUNC,
g_1value_1peek_1pointer_FUNC,
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
index cc84e72f979..0c7a9e916c9 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
@@ -1382,6 +1382,8 @@ public static boolean isX11 () {
/** @param value cast=(GValue *) */
public static final native long g_value_get_string (long value);
/** @param value cast=(GValue *) */
+public static final native long g_value_get_object (long value);
+/** @param value cast=(GValue *) */
public static final native void g_value_unset (long value);
/** @param value cast=(const GValue *) */
public static final native long g_value_peek_pointer(long value);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk4/GTK4.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk4/GTK4.java
index ed972984dcd..733d12d6600 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk4/GTK4.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk4/GTK4.java
@@ -569,11 +569,11 @@ public class GTK4 {
* @param clipboard cast=(GdkClipboard*)
* @param type cast=(GType)
*/
- public static final native void gdk_clipboard_set(long clipboard, int type, long data);
+ public static final native void gdk_clipboard_set(long clipboard, long type, long data);
/**
* @param clipboard cast=(GdkClipboard*)
*/
- public static final native void gdk_clipboard_get_formats(long clipboard);
+ public static final native long gdk_clipboard_get_formats(long clipboard);
/**
* @param clipboard cast=(GdkClipboard*)
*/
@@ -584,6 +584,7 @@ public class GTK4 {
* @param error cast=(GError **)
*/
public static final native boolean gdk_content_provider_get_value(long provider, long value, long[] error);
-
+ /** @param formats cast=(GdkContentFormats *) */
+ public static final native long gdk_content_formats_to_string(long formats);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/library/make_common.mak b/bundles/org.eclipse.swt/Eclipse SWT/common/library/make_common.mak
index 1ff5767a16e..cbaf392bab0 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/library/make_common.mak
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/library/make_common.mak
@@ -13,7 +13,7 @@
#*******************************************************************************
maj_ver=4
-min_ver=952
-rev=11
-comma_ver=4,952,11,0
+min_ver=954
+rev=3
+comma_ver=4,954,3,0
cef_ver=3071
\ No newline at end of file
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/version.txt b/bundles/org.eclipse.swt/Eclipse SWT/common/version.txt
index ccc5290de9f..59e3e550bc3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/version.txt
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/version.txt
@@ -1 +1 @@
-version 4.952
\ No newline at end of file
+version 4.954
\ No newline at end of file
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
index 41dbe6b4783..aef57765574 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
@@ -785,7 +785,14 @@ void createHandle (int index) {
}
}
} else if ((style & SWT.ON_TOP) != 0) {
- GTK3.gtk_window_set_keep_above(shellHandle, true);
+ /*
+ * gtk_window_set_keep_above is not available in GTK 4.
+ * No replacements were provided. GTK dev suggestion is
+ * to use platform-specific API if this functionality
+ * is necessary.
+ */
+
+ if(!GTK.GTK4)GTK3.gtk_window_set_keep_above(shellHandle, true);
}
GTK.gtk_window_set_title(shellHandle, new byte[1]);
@@ -2246,8 +2253,10 @@ void resizeBounds (int width, int height, boolean notify) {
if (GTK.GTK4) {
if (parent != null) {
GtkAllocation allocation = new GtkAllocation();
+ GtkAllocation currentSizeAlloc = new GtkAllocation();
+ GTK.gtk_widget_get_allocation(vboxHandle, currentSizeAlloc);
allocation.width = width;
- allocation.height = height;
+ allocation.height = height + currentSizeAlloc.y;
GTK4.gtk_widget_size_allocate(shellHandle, allocation, -1);
}
} else {
@@ -2928,7 +2937,7 @@ public void setVisible (boolean visible) {
* the screen. The fix is to set the default size to the smallest possible (1, 1)
* before gtk_widget_show.
*/
- if (oldWidth == 0 && oldHeight == 0) {
+ if (!GTK.GTK4 && (oldWidth == 0 && oldHeight == 0)) {
int [] init_width = new int[1], init_height = new int[1];
GTK3.gtk_window_get_size(shellHandle, init_width, init_height);
GTK3.gtk_window_resize(shellHandle, 1, 1);
diff --git a/bundles/org.eclipse.swt/META-INF/MANIFEST.MF b/bundles/org.eclipse.swt/META-INF/MANIFEST.MF
index c3ca7ca754b..29c43b96ae9 100644
--- a/bundles/org.eclipse.swt/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.swt/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-SymbolicName: org.eclipse.swt; singleton:=true
-Bundle-Version: 3.120.0.qualifier
+Bundle-Version: 3.121.0.qualifier
Bundle-ManifestVersion: 2
Bundle-Localization: plugin
DynamicImport-Package: org.eclipse.swt.accessibility2
diff --git a/bundles/org.eclipse.swt/pom.xml b/bundles/org.eclipse.swt/pom.xml
index e5bbbaa7160..5e98d5ac48d 100644
--- a/bundles/org.eclipse.swt/pom.xml
+++ b/bundles/org.eclipse.swt/pom.xml
@@ -16,12 +16,12 @@
eclipse.platform.swt
eclipse.platform.swt
- 4.24.0-SNAPSHOT
+ 4.25.0-SNAPSHOT
../../
org.eclipse.swt
org.eclipse.swt
- 3.120.0-SNAPSHOT
+ 3.121.0-SNAPSHOT
eclipse-plugin
@@ -29,7 +29,7 @@
forceContextQualifier gets updated during build input process using
ant script /bundles/org.eclipse.swt/buildInternal.xml
-->
- v20220530-1036
+ v20220614-2203
Eclipse SWT Accessibility/cocoa,Eclipse SWT Accessibility/common,Eclipse SWT Accessibility/gtk,Eclipse SWT Accessibility/win32,Eclipse SWT AWT/cocoa,Eclipse SWT AWT/common,Eclipse SWT AWT/gtk,Eclipse SWT AWT/win32,Eclipse SWT Browser/cocoa,Eclipse SWT Browser/common,Eclipse SWT Browser/gtk,Eclipse SWT Browser/win32,Eclipse SWT Custom Widgets/common,Eclipse SWT Drag and Drop/cocoa,Eclipse SWT Drag and Drop/common,Eclipse SWT Drag and Drop/gtk,Eclipse SWT Drag and Drop/win32,Eclipse SWT OLE Win32/win32,Eclipse SWT OpenGL/cocoa,Eclipse SWT OpenGL/common,Eclipse SWT OpenGL/glx,Eclipse SWT OpenGL/gtk,Eclipse SWT OpenGL/win32,Eclipse SWT PI/cairo,Eclipse SWT PI/cocoa,Eclipse SWT PI/common,Eclipse SWT PI/gtk,Eclipse SWT PI/win32,Eclipse SWT Printing/cocoa,Eclipse SWT Printing/common,Eclipse SWT Printing/gtk,Eclipse SWT Printing/win32,Eclipse SWT Program/cocoa,Eclipse SWT Program/common,Eclipse SWT Program/gtk,Eclipse SWT Program/win32,Eclipse SWT WebKit/cocoa,Eclipse SWT WebKit/gtk,Eclipse SWT/cairo,Eclipse SWT/cocoa,Eclipse SWT/common,Eclipse SWT/emulated/bidi,Eclipse SWT/emulated/coolbar,Eclipse SWT/emulated/expand,Eclipse SWT/emulated/taskbar,Eclipse SWT/emulated/tooltip,Eclipse SWT/gtk,Eclipse SWT/win32
diff --git a/container/Dockerfile b/container/Dockerfile
index cd1a4f56497..e07368069bd 100644
--- a/container/Dockerfile
+++ b/container/Dockerfile
@@ -1,4 +1,4 @@
-FROM eclipsecbi/fedora-gtk3-mutter:30-gtk3.24
+FROM eclipsecbi/fedora-gtk3-mutter:36-gtk3.24
# Back to root for install
USER 0
@@ -23,7 +23,7 @@ ENTRYPOINT [ "uid_entrypoint", "jenkins-slave" ]
RUN dnf -y update && dnf -y install \
java-openjdk maven webkit2gtk3-devel \
make gcc mesa-libGLU-devel mesa-libGL-devel \
- libXt-devel \
+ libXt-devel procps-ng \
&& dnf clean all
#Back to named user
diff --git a/examples/org.eclipse.swt.examples.browser.demos/pom.xml b/examples/org.eclipse.swt.examples.browser.demos/pom.xml
index 65935103746..19a9bd95d2d 100644
--- a/examples/org.eclipse.swt.examples.browser.demos/pom.xml
+++ b/examples/org.eclipse.swt.examples.browser.demos/pom.xml
@@ -14,7 +14,7 @@
eclipse.platform.swt.localbuild
eclipse.platform.swt
- 4.24.0-SNAPSHOT
+ 4.25.0-SNAPSHOT
../../local-build/local-build-parent/
org.eclipse.swt
diff --git a/examples/org.eclipse.swt.examples.launcher/pom.xml b/examples/org.eclipse.swt.examples.launcher/pom.xml
index f11d4f2e351..360e8c9aa2f 100644
--- a/examples/org.eclipse.swt.examples.launcher/pom.xml
+++ b/examples/org.eclipse.swt.examples.launcher/pom.xml
@@ -14,7 +14,7 @@
eclipse.platform.swt.localbuild
eclipse.platform.swt
- 4.24.0-SNAPSHOT
+ 4.25.0-SNAPSHOT
../../local-build/local-build-parent/
org.eclipse.swt
diff --git a/examples/org.eclipse.swt.examples.ole.win32/pom.xml b/examples/org.eclipse.swt.examples.ole.win32/pom.xml
index 5e504710437..b60acdba699 100644
--- a/examples/org.eclipse.swt.examples.ole.win32/pom.xml
+++ b/examples/org.eclipse.swt.examples.ole.win32/pom.xml
@@ -14,7 +14,7 @@
eclipse.platform.swt
eclipse.platform.swt
- 4.24.0-SNAPSHOT
+ 4.25.0-SNAPSHOT
../../
org.eclipse.swt
diff --git a/examples/org.eclipse.swt.examples.views/pom.xml b/examples/org.eclipse.swt.examples.views/pom.xml
index bb452c0d914..8b5291468b3 100644
--- a/examples/org.eclipse.swt.examples.views/pom.xml
+++ b/examples/org.eclipse.swt.examples.views/pom.xml
@@ -14,7 +14,7 @@
eclipse.platform.swt.localbuild
eclipse.platform.swt
- 4.24.0-SNAPSHOT
+ 4.25.0-SNAPSHOT
../../local-build/local-build-parent/
org.eclipse.swt
diff --git a/examples/org.eclipse.swt.examples/pom.xml b/examples/org.eclipse.swt.examples/pom.xml
index 3ad1cd1c123..ad198659138 100644
--- a/examples/org.eclipse.swt.examples/pom.xml
+++ b/examples/org.eclipse.swt.examples/pom.xml
@@ -14,7 +14,7 @@
eclipse.platform.swt.localbuild
eclipse.platform.swt
- 4.24.0-SNAPSHOT
+ 4.25.0-SNAPSHOT
../../local-build/local-build-parent/
org.eclipse.swt
diff --git a/features/org.eclipse.swt.tools.feature/feature.xml b/features/org.eclipse.swt.tools.feature/feature.xml
index c3b996419a7..bcbd5bc2375 100644
--- a/features/org.eclipse.swt.tools.feature/feature.xml
+++ b/features/org.eclipse.swt.tools.feature/feature.xml
@@ -2,7 +2,7 @@
diff --git a/features/org.eclipse.swt.tools.feature/pom.xml b/features/org.eclipse.swt.tools.feature/pom.xml
index 7ac6b300743..62163ec8e94 100644
--- a/features/org.eclipse.swt.tools.feature/pom.xml
+++ b/features/org.eclipse.swt.tools.feature/pom.xml
@@ -15,12 +15,12 @@
eclipse.platform.swt
eclipse.platform.swt
- 4.24.0-SNAPSHOT
+ 4.25.0-SNAPSHOT
../../
org.eclipse.swt.tools.feature
org.eclipse.swt.tools.feature
- 3.108.500-SNAPSHOT
+ 3.108.600-SNAPSHOT
eclipse-feature
diff --git a/local-build/local-build-parent/pom.xml b/local-build/local-build-parent/pom.xml
index 424afe267b6..c5013ed3198 100644
--- a/local-build/local-build-parent/pom.xml
+++ b/local-build/local-build-parent/pom.xml
@@ -14,7 +14,7 @@
eclipse.platform.swt
eclipse.platform.swt
- 4.24.0-SNAPSHOT
+ 4.25.0-SNAPSHOT
../../
eclipse.platform.swt.localbuild
diff --git a/local-build/org.eclipse.swt.fragments.localbuild/pom.xml b/local-build/org.eclipse.swt.fragments.localbuild/pom.xml
index 4014fe2bbaa..58eb75a76c5 100644
--- a/local-build/org.eclipse.swt.fragments.localbuild/pom.xml
+++ b/local-build/org.eclipse.swt.fragments.localbuild/pom.xml
@@ -14,7 +14,7 @@
eclipse.platform.swt
eclipse.platform.swt
- 4.24.0-SNAPSHOT
+ 4.25.0-SNAPSHOT
../../
org.eclipse.swt
diff --git a/pom.xml b/pom.xml
index 7aba6a90546..fddf5207947 100644
--- a/pom.xml
+++ b/pom.xml
@@ -16,7 +16,7 @@
org.eclipse
eclipse-platform-parent
- 4.24.0-SNAPSHOT
+ 4.25.0-SNAPSHOT
../eclipse-platform-parent
@@ -27,6 +27,18 @@
scm:git:https://github.com/eclipse-platform/eclipse.platform.swt.git
+
+
+
+ https://sonarcloud.io
+
+ ${project.artifactId}
+
+ target
+
+ -
+ -
+ -