Skip to content

Commit

Permalink
temp fix to prevent file dialogs to be displayed behind the window
Browse files Browse the repository at this point in the history
  • Loading branch information
codeanticode committed Sep 19, 2015
1 parent da5c050 commit 8c25523
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions core/src/processing/core/PApplet.java
Expand Up @@ -6208,18 +6208,26 @@ private Frame selectFrame() {
* @param callback name of the method to be called when the selection is made
*/
public void selectInput(String prompt, String callback) {
boolean hide = g instanceof PGraphicsOpenGL && platform == WINDOWS;
if (hide) surface.setVisible(false);
selectInput(prompt, callback, null);
}


public void selectInput(String prompt, String callback, File file) {
boolean hide = g instanceof PGraphicsOpenGL && platform == WINDOWS;
if (hide) surface.setVisible(false);
selectInput(prompt, callback, file, this);
if (hide) surface.setVisible(true);
}


public void selectInput(String prompt, String callback,
File file, Object callbackObject) {
boolean hide = g instanceof PGraphicsOpenGL && platform == WINDOWS;
if (hide) surface.setVisible(false);
selectInput(prompt, callback, file, callbackObject, null); //selectFrame());
if (hide) surface.setVisible(true);
}


Expand All @@ -6237,17 +6245,26 @@ static public void selectInput(String prompt, String callbackMethod,
* @param callback name of the method to be called when the selection is made
*/
public void selectOutput(String prompt, String callback) {
boolean hide = g instanceof PGraphicsOpenGL && platform == WINDOWS;
if (hide) surface.setVisible(false);
selectOutput(prompt, callback, null);
if (hide) surface.setVisible(true);
}

public void selectOutput(String prompt, String callback, File file) {
boolean hide = g instanceof PGraphicsOpenGL && platform == WINDOWS;
if (hide) surface.setVisible(false);
selectOutput(prompt, callback, file, this);
if (hide) surface.setVisible(true);
}


public void selectOutput(String prompt, String callback,
File file, Object callbackObject) {
boolean hide = g instanceof PGraphicsOpenGL && platform == WINDOWS;
if (hide) surface.setVisible(false);
selectOutput(prompt, callback, file, callbackObject, null); //selectFrame());
if (hide) surface.setVisible(true);
}


Expand Down Expand Up @@ -6311,18 +6328,27 @@ public void run() {
* @param callback name of the method to be called when the selection is made
*/
public void selectFolder(String prompt, String callback) {
boolean hide = g instanceof PGraphicsOpenGL && platform == WINDOWS;
if (hide) surface.setVisible(false);
selectFolder(prompt, callback, null);
if (hide) surface.setVisible(true);
}


public void selectFolder(String prompt, String callback, File file) {
boolean hide = g instanceof PGraphicsOpenGL && platform == WINDOWS;
if (hide) surface.setVisible(false);
selectFolder(prompt, callback, file, this);
if (hide) surface.setVisible(true);
}


public void selectFolder(String prompt, String callback,
File file, Object callbackObject) {
boolean hide = g instanceof PGraphicsOpenGL && platform == WINDOWS;
if (hide) surface.setVisible(false);
selectFolder(prompt, callback, file, callbackObject, null); //selectFrame());
if (hide) surface.setVisible(true);
}


Expand Down

0 comments on commit 8c25523

Please sign in to comment.