Skip to content

Commit 42d0612

Browse files
committed
add activate() jni call
1 parent 162554f commit 42d0612

5 files changed

Lines changed: 10 additions & 2 deletions

File tree

core/different/different.m

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#import <AppKit/AppKit.h>
22
#import <Cocoa/Cocoa.h>
3-
#import <JavaNativeFoundation/JavaNativeFoundation.h>
4-
// #include <jni.h>
3+
// #import <JavaNativeFoundation/JavaNativeFoundation.h>
4+
#include <jni.h>
55

66
JNIEXPORT void JNICALL Java_processing_core_ThinkDifferent_hideMenuBar
77
(JNIEnv *env, jclass clazz, jboolean visible, jboolean kioskMode)
@@ -24,3 +24,10 @@
2424
{
2525
[NSApp activateIgnoringOtherApps:true];
2626
}
27+
28+
29+
JNIEXPORT void JNICALL Java_processing_core_ThinkDifferent_activate
30+
(JNIEnv *env, jclass klass)
31+
{
32+
[NSApp activate];
33+
}
135 Bytes
Binary file not shown.

core/different/libDifferent_x86_64

-23.9 KB
Binary file not shown.

core/src/processing/core/ThinkDifferent.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ static private Desktop getDesktop() {
127127
// Used by Python (Jython) Mode to bring windows to the front
128128
static native public void activateIgnoringOtherApps();
129129

130+
static native public void activate();
130131

131132
static {
132133
final String NATIVE_FILENAME = "libDifferent.jnilib";
-47.9 KB
Binary file not shown.

0 commit comments

Comments
 (0)