Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ public class ChromaScapeApplication {
* @param args command-line arguments passed to the application
*/
public static void main(String[] args) {
// Disable headless mode to allow GUI components (e.g., MouseOverlay)
System.setProperty("java.awt.headless", "false");
SpringApplication.run(ChromaScapeApplication.class, args);
}

Expand Down
8 changes: 2 additions & 6 deletions src/main/java/com/chromascape/web/ServePages.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,22 @@
public class ServePages {

/**
* Handles GET requests for the root ("/") URL. Sets the AWT system property to non-headless mode,
* then returns the view name for the index page.
* Handles GET requests for the root ("/") URL.
*
* @return the logical view name "index"
*/
@GetMapping("/")
public String serveIndexPage() {
System.setProperty("java.awt.headless", "false");
return "index";
}

/**
* Handles GET requests for the "/colour" URL. Sets the AWT system property to non-headless mode,
* then returns the view name for the colour picker page.
* Handles GET requests for the "/colour" URL.
*
* @return the logical view name "colour"
*/
@GetMapping("/colour")
public String serveColourPickerPage() {
System.setProperty("java.awt.headless", "false");
return "colour";
}
}