mirror of
https://github.com/gwm17/glfw.git
synced 2025-01-31 03:18:50 -05:00
Cocoa: Remove calls to -update on nil
These calls have no effect unless the context was created with NSGL.
(cherry picked from commit 836e709503
)
This commit is contained in:
parent
9a5511b311
commit
a7202e2341
|
@ -243,7 +243,7 @@ static const NSRange kEmptyRange = { NSNotFound, 0 };
|
||||||
|
|
||||||
- (void)windowDidResize:(NSNotification *)notification
|
- (void)windowDidResize:(NSNotification *)notification
|
||||||
{
|
{
|
||||||
if (window->context.client != GLFW_NO_API)
|
if (window->context.source == GLFW_NATIVE_CONTEXT_API)
|
||||||
[window->context.nsgl.object update];
|
[window->context.nsgl.object update];
|
||||||
|
|
||||||
if (_glfw.ns.disabledCursorWindow == window)
|
if (_glfw.ns.disabledCursorWindow == window)
|
||||||
|
@ -278,7 +278,7 @@ static const NSRange kEmptyRange = { NSNotFound, 0 };
|
||||||
|
|
||||||
- (void)windowDidMove:(NSNotification *)notification
|
- (void)windowDidMove:(NSNotification *)notification
|
||||||
{
|
{
|
||||||
if (window->context.client != GLFW_NO_API)
|
if (window->context.source == GLFW_NATIVE_CONTEXT_API)
|
||||||
[window->context.nsgl.object update];
|
[window->context.nsgl.object update];
|
||||||
|
|
||||||
if (_glfw.ns.disabledCursorWindow == window)
|
if (_glfw.ns.disabledCursorWindow == window)
|
||||||
|
@ -397,7 +397,7 @@ static const NSRange kEmptyRange = { NSNotFound, 0 };
|
||||||
|
|
||||||
- (void)updateLayer
|
- (void)updateLayer
|
||||||
{
|
{
|
||||||
if (window->context.client != GLFW_NO_API)
|
if (window->context.source == GLFW_NATIVE_CONTEXT_API)
|
||||||
[window->context.nsgl.object update];
|
[window->context.nsgl.object update];
|
||||||
|
|
||||||
_glfwInputWindowDamage(window);
|
_glfwInputWindowDamage(window);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user