public void update() { nUpdate(); if (!isFocused && parent != null && parent_focused.compareAndSet(true, false)) { setFocus(getHwnd()); } if (redoMakeContextCurrent) { redoMakeContextCurrent = false; /** * WORKAROUND: Making the context current (redundantly) when the window is maximized helps * some gfx cards recover from fullscreen */ try { Context context = ((DrawableLWJGL) Display.getDrawable()).getContext(); if (context != null && context.isCurrent()) context.makeCurrent(); } catch (LWJGLException e) { LWJGLUtil.log("Exception occurred while trying to make context current: " + e); } } }