mirror of
https://github.com/processing/processing4.git
synced 2026-02-03 13:49:18 +01:00
set frame icon images for Java2D (dock and cmd-tab)
This commit is contained in:
@@ -988,6 +988,12 @@ public class PSurfaceAWT extends PSurfaceNone {
|
||||
frame.setIconImages(iconImages);
|
||||
|
||||
} catch (Exception e) { } // harmless; keep this to ourselves
|
||||
|
||||
} else {
|
||||
// On OS X, set this for AWT surfaces, which handles the dock image
|
||||
// as well as the cmd-tab image that's shown. Just one size, I guess.
|
||||
URL url = PApplet.class.getResource("/icon/icon-512.png");
|
||||
ThinkDifferent.setIconImage(Toolkit.getDefaultToolkit().getImage(url));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
|
||||
package processing.core;
|
||||
|
||||
import java.awt.Image;
|
||||
|
||||
import com.apple.eawt.AppEvent.QuitEvent;
|
||||
import com.apple.eawt.Application;
|
||||
import com.apple.eawt.QuitHandler;
|
||||
@@ -118,4 +120,9 @@ public class ThinkDifferent {
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
static void setIconImage(Image image) {
|
||||
application.setDockIconImage(image);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
0237 (3.0a10)
|
||||
X retain original java.awt.Frame when it's in use
|
||||
X set frame icon images for Java2D (dock and cmd-tab)
|
||||
|
||||
fixed earlier/can no longer reproduce
|
||||
X strips when rendering spheres with lights and anti-aliasing
|
||||
|
||||
Reference in New Issue
Block a user