code: public static Window getActiveWindowFromMapset( String mapsetPath ) {
          File windFile = new File(mapsetPath + File.separator + GrassLegacyConstans.WIND);
          if (!windFile.exists()) {
              return null;
          }
  
          return new Window(windFile.getAbsolutePath());
      }
docs: Get the active region window from the mapset
  
  @param mapsetPath the path to the mapset folder
  @return the active Window object of that mapset