Skip to content

Commit 69c26b8

Browse files
committed
add surface.setAlwaysOnTop(boolean) for all renderers (fixes #3718)
1 parent 91618bc commit 69c26b8

File tree

6 files changed

+27
-0
lines changed

6 files changed

+27
-0
lines changed

core/src/processing/awt/PSurfaceAWT.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,12 @@ public void setIcon(PImage image) {
594594
}
595595

596596

597+
@Override
598+
public void setAlwaysOnTop(boolean always) {
599+
frame.setAlwaysOnTop(always);
600+
}
601+
602+
597603
List<Image> iconImages;
598604

599605
protected void setProcessingIcon(Frame frame) {

core/src/processing/core/PSurface.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ public interface PSurface {
7171
/** Set true if we want to resize things (default is not resizable) */
7272
public void setResizable(boolean resizable);
7373

74+
/** Dumb name, but inherited from Frame and no better ideas. */
75+
public void setAlwaysOnTop(boolean always);
76+
7477
public void setIcon(PImage icon);
7578

7679
//

core/src/processing/core/PSurfaceNone.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,10 @@ public void placePresent(int stopColor) { }
111111
public void setupExternalMessages() { }
112112

113113

114+
@Override
115+
public void setAlwaysOnTop(boolean always) { }
116+
117+
114118
//
115119

116120

core/src/processing/javafx/PSurfaceFX.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,12 @@ public void setIcon(PImage icon) {
302302
}
303303

304304

305+
@Override
306+
public void setAlwaysOnTop(boolean always) {
307+
stage.setAlwaysOnTop(always);
308+
}
309+
310+
305311
/*
306312
@Override
307313
public void placeWindow(int[] location) {

core/src/processing/opengl/PSurfaceJOGL.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,12 @@ public void setIcon(PImage icon) {
459459
}
460460

461461

462+
@Override
463+
public void setAlwaysOnTop(boolean always) {
464+
window.setAlwaysOnTop(always);
465+
}
466+
467+
462468
protected void initIcons() {
463469
final int[] sizes = { 16, 32, 48, 64, 128, 256, 512 };
464470
String[] iconImages = new String[sizes.length];

core/todo.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ o this is the difference between a lot of loadPixels() and not
1010
o so important to have it in before beta if that's the change
1111
o https://github.com/processing/processing/issues/99
1212
X won't fix for now, requires too much reworking on the image system
13+
X add surface.setAlwaysOnTop(boolean)
14+
X https://github.com/processing/processing/issues/3718
1315

1416
andres
1517
X P2D: error calling surface.setTitle()

0 commit comments

Comments
 (0)