File tree Expand file tree Collapse file tree 4 files changed +16
-1
lines changed
org/eclipse/swt/internal/gtk4
Eclipse SWT/gtk/org/eclipse/swt/widgets Expand file tree Collapse file tree 4 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -2776,6 +2776,16 @@ JNIEXPORT jlong JNICALL GTK4_NATIVE(gtk_1window_1new)
27762776}
27772777#endif
27782778
2779+ #ifndef NO_gtk_1window_1present
2780+ JNIEXPORT void JNICALL GTK4_NATIVE (gtk_1window_1present )
2781+ (JNIEnv * env , jclass that , jlong arg0 )
2782+ {
2783+ GTK4_NATIVE_ENTER (env , that , gtk_1window_1present_FUNC );
2784+ gtk_window_present ((GtkWindow * )arg0 );
2785+ GTK4_NATIVE_EXIT (env , that , gtk_1window_1present_FUNC );
2786+ }
2787+ #endif
2788+
27792789#ifndef NO_gtk_1window_1set_1child
27802790JNIEXPORT void JNICALL GTK4_NATIVE (gtk_1window_1set_1child )
27812791 (JNIEnv * env , jclass that , jlong arg0 , jlong arg1 )
Original file line number Diff line number Diff line change @@ -226,6 +226,7 @@ typedef enum {
226226 gtk_1window_1maximize_FUNC ,
227227 gtk_1window_1minimize_FUNC ,
228228 gtk_1window_1new_FUNC ,
229+ gtk_1window_1present_FUNC ,
229230 gtk_1window_1set_1child_FUNC ,
230231 gtk_1window_1set_1default_1widget_FUNC ,
231232 gtk_1window_1set_1icon_1name_FUNC ,
Original file line number Diff line number Diff line change @@ -453,6 +453,7 @@ public class GTK4 {
453453 public static final native void gtk_window_set_child (long window , long child );
454454 /** @param window cast=(GtkWindow *) */
455455 public static final native void gtk_window_destroy (long window );
456+
456457 /** @param window cast=(GtkWindow *) */
457458 public static final native long gtk_window_get_icon_name (long window );
458459 /**
@@ -463,6 +464,9 @@ public class GTK4 {
463464 /** @param window cast=(GtkWindow *) */
464465 public static final native long gtk_window_get_titlebar (long window );
465466
467+ /** @param window cast=(GtkWindow *) */
468+ public static final native void gtk_window_present (long window ) ;
469+
466470 /* GtkShortcutController */
467471 public static final native long gtk_shortcut_controller_new ();
468472 /**
Original file line number Diff line number Diff line change @@ -637,7 +637,7 @@ void bringToTop (boolean force) {
637637 }
638638 long seat = GDK .gdk_display_get_default_seat (gdkDisplay );
639639 if (GTK .GTK4 ) {
640- /* TODO: GTK does not provide a gdk_surface_show, probably will require use of the present api */
640+ GTK4 . gtk_window_present ( shellHandle );
641641 } else {
642642 GDK .gdk_window_show (gdkResource );
643643 }
You can’t perform that action at this time.
0 commit comments