< prev index next >

modules/graphics/src/main/java/com/sun/glass/ui/Window.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 293,302 **** --- 293,305 ---- this.ptr = _createChildWindow(parent); if (this.ptr == 0L) { throw new RuntimeException("could not create platform window"); } + if (screen == null) { + screen = Screen.getMainScreen(); // start with a default + } } public boolean isClosed() { Application.checkEventThread(); return this.ptr == 0L;
< prev index next >