Skip to content
This repository was archived by the owner on Jun 19, 2024. It is now read-only.

Commit eca0da8

Browse files
authored
Merge pull request #66 from LabyMod/develop
Release 0.4.11
2 parents f76c332 + d86ce2d commit eca0da8

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.4.10
1+
0.4.11

ultralight-java-glfw-opengl-util/src/main/java/com/labymedia/ultralight/util/UltralightGlfwOpenGLContext.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ public Collection<UltralightGlfwOpenGLWindow> getSubWindows() {
150150
* @return the created sub window
151151
*/
152152
public synchronized UltralightGlfwOpenGLWindow createSubWindow(int width, int height, String title) {
153-
UltralightGlfwOpenGLWindow window = UltralightGlfwOpenGLWindow.create(this, width, height, title, this.getMainWindow().getWindowHandle());
153+
UltralightGlfwOpenGLWindow window = UltralightGlfwOpenGLWindow.create(this, width, height, title, this.getMainWindow().getParentWindow());
154154
this.subWindows.add(window);
155155
return window;
156156
}

ultralight-java-glfw-opengl-util/src/main/java/com/labymedia/ultralight/util/UltralightGlfwOpenGLWindow.java

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
*/
4040
public class UltralightGlfwOpenGLWindow {
4141

42+
private final long parentWindow;
4243
private final UltralightGlfwOpenGLContext context;
4344
private long windowHandle;
4445
private UltralightView view;
@@ -54,12 +55,13 @@ public class UltralightGlfwOpenGLWindow {
5455
*/
5556
private UltralightGlfwOpenGLWindow(UltralightGlfwOpenGLContext context, int width, int height, String title, long sharedWindow) {
5657
this.context = context;
57-
initialize(width, height, title, sharedWindow);
58+
this.parentWindow = sharedWindow;
59+
initialize(width, height, title);
5860
}
5961

60-
private void initialize(int width, int height, String title, long sharedWindow) {
62+
private void initialize(int width, int height, String title) {
6163
glfwWindowHint(GLFW_VISIBLE, GLFW_FALSE);
62-
this.windowHandle = GLFW.glfwCreateWindow(width, height, title, MemoryUtil.NULL, sharedWindow);
64+
this.windowHandle = GLFW.glfwCreateWindow(width, height, title, MemoryUtil.NULL, this.parentWindow);
6365
}
6466

6567
private UltralightView createView() {
@@ -292,4 +294,11 @@ public UltralightGlfwOpenGLWindow bindTexture() {
292294
this.context.bindTexture(this);
293295
return this;
294296
}
297+
298+
/**
299+
* @return the specified parent window of this window or {@link MemoryUtil#NULL}.
300+
*/
301+
public long getParentWindow() {
302+
return this.parentWindow;
303+
}
295304
}

0 commit comments

Comments
 (0)