mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-23 02:38:52 -05:00
Improved documentation of hacks.
This commit is contained in:
parent
a79c844c4d
commit
b9d4875f3e
3
deps/GL/glext.h
vendored
3
deps/GL/glext.h
vendored
|
@ -4130,6 +4130,9 @@ GLAPI void APIENTRY glVertexBlendARB (GLint count);
|
||||||
|
|
||||||
#ifndef GL_ARB_vertex_buffer_object
|
#ifndef GL_ARB_vertex_buffer_object
|
||||||
#define GL_ARB_vertex_buffer_object 1
|
#define GL_ARB_vertex_buffer_object 1
|
||||||
|
/* HACK: This is a workaround for gltypes.h on OS X 10.9 defining these types as
|
||||||
|
* long instead of ptrdiff_t
|
||||||
|
*/
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
typedef long GLsizeiptrARB;
|
typedef long GLsizeiptrARB;
|
||||||
typedef long GLintptrARB;
|
typedef long GLintptrARB;
|
||||||
|
|
|
@ -67,7 +67,7 @@ static void enterFullscreenMode(_GLFWwindow* window)
|
||||||
withOptions:options];
|
withOptions:options];
|
||||||
|
|
||||||
// HACK: Synthesize focus event as window does not become key when the view
|
// HACK: Synthesize focus event as window does not become key when the view
|
||||||
// is made full screen
|
// is made full screen
|
||||||
// TODO: Remove this when moving to a full screen window
|
// TODO: Remove this when moving to a full screen window
|
||||||
_glfwInputWindowFocus(window, GL_TRUE);
|
_glfwInputWindowFocus(window, GL_TRUE);
|
||||||
}
|
}
|
||||||
|
@ -80,7 +80,7 @@ static void leaveFullscreenMode(_GLFWwindow* window)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// HACK: Synthesize focus event as window does not become key when the view
|
// HACK: Synthesize focus event as window does not become key when the view
|
||||||
// is made full screen
|
// is made full screen
|
||||||
// TODO: Remove this when moving to a full screen window
|
// TODO: Remove this when moving to a full screen window
|
||||||
_glfwInputWindowFocus(window, GL_FALSE);
|
_glfwInputWindowFocus(window, GL_FALSE);
|
||||||
|
|
||||||
|
@ -1036,6 +1036,9 @@ void _glfwPlatformRestoreWindow(_GLFWwindow* window)
|
||||||
void _glfwPlatformShowWindow(_GLFWwindow* window)
|
void _glfwPlatformShowWindow(_GLFWwindow* window)
|
||||||
{
|
{
|
||||||
// Make us the active application
|
// Make us the active application
|
||||||
|
// HACK: This has been moved here from initializeAppKit to prevent
|
||||||
|
// applications using only hidden windows from being activated, but
|
||||||
|
// should probably not be done every time any window is shown
|
||||||
[NSApp activateIgnoringOtherApps:YES];
|
[NSApp activateIgnoringOtherApps:YES];
|
||||||
|
|
||||||
[window->ns.object makeKeyAndOrderFront:nil];
|
[window->ns.object makeKeyAndOrderFront:nil];
|
||||||
|
|
|
@ -402,8 +402,8 @@ GLboolean _glfwRefreshContextAttribs(void)
|
||||||
else if (glfwExtensionSupported("GL_ARB_debug_output"))
|
else if (glfwExtensionSupported("GL_ARB_debug_output"))
|
||||||
{
|
{
|
||||||
// HACK: This is a workaround for older drivers (pre KHR_debug)
|
// HACK: This is a workaround for older drivers (pre KHR_debug)
|
||||||
// not setting the debug bit in the context flags for debug
|
// not setting the debug bit in the context flags for
|
||||||
// contexts
|
// debug contexts
|
||||||
window->glDebug = GL_TRUE;
|
window->glDebug = GL_TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,7 +75,7 @@ static GLboolean chooseFBConfig(const _GLFWfbconfig* desired, GLXFBConfig* resul
|
||||||
if (strcmp(vendor, "Chromium") == 0)
|
if (strcmp(vendor, "Chromium") == 0)
|
||||||
{
|
{
|
||||||
// HACK: This is a (hopefully temporary) workaround for Chromium
|
// HACK: This is a (hopefully temporary) workaround for Chromium
|
||||||
// (VirtualBox GL) not setting the window bit on any GLXFBConfigs
|
// (VirtualBox GL) not setting the window bit on any GLXFBConfigs
|
||||||
trustWindowBit = GL_FALSE;
|
trustWindowBit = GL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -485,8 +485,9 @@ int _glfwCreateContext(_GLFWwindow* window,
|
||||||
if (window->glx.context == NULL)
|
if (window->glx.context == NULL)
|
||||||
{
|
{
|
||||||
// HACK: This is a fallback for the broken Mesa implementation of
|
// HACK: This is a fallback for the broken Mesa implementation of
|
||||||
// GLX_ARB_create_context_profile, which fails default 1.0 context
|
// GLX_ARB_create_context_profile, which fails default 1.0
|
||||||
// creation with a GLXBadProfileARB error in violation of the spec
|
// context creation with a GLXBadProfileARB error in violation
|
||||||
|
// of the extension spec
|
||||||
if (_glfw.x11.errorCode == _glfw.glx.errorBase + GLXBadProfileARB &&
|
if (_glfw.x11.errorCode == _glfw.glx.errorBase + GLXBadProfileARB &&
|
||||||
wndconfig->clientAPI == GLFW_OPENGL_API &&
|
wndconfig->clientAPI == GLFW_OPENGL_API &&
|
||||||
wndconfig->glProfile == GLFW_OPENGL_ANY_PROFILE &&
|
wndconfig->glProfile == GLFW_OPENGL_ANY_PROFILE &&
|
||||||
|
|
|
@ -129,8 +129,8 @@ static GLboolean createWindow(_GLFWwindow* window,
|
||||||
if (wndconfig->monitor == NULL)
|
if (wndconfig->monitor == NULL)
|
||||||
{
|
{
|
||||||
// HACK: This is a workaround for windows without a background pixel
|
// HACK: This is a workaround for windows without a background pixel
|
||||||
// not getting any decorations on certain older versions of Compiz
|
// not getting any decorations on certain older versions of
|
||||||
// running on Intel hardware
|
// Compiz running on Intel hardware
|
||||||
wa.background_pixel = BlackPixel(_glfw.x11.display,
|
wa.background_pixel = BlackPixel(_glfw.x11.display,
|
||||||
_glfw.x11.screen);
|
_glfw.x11.screen);
|
||||||
wamask |= CWBackPixel;
|
wamask |= CWBackPixel;
|
||||||
|
@ -258,6 +258,9 @@ static GLboolean createWindow(_GLFWwindow* window,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// HACK: Explicitly setting PPosition to any value causes some WMs,
|
||||||
|
// notably Compiz and Metacity, to honor the position of
|
||||||
|
// unmapped windows set by XMoveWindow
|
||||||
hints->flags |= PPosition;
|
hints->flags |= PPosition;
|
||||||
hints->x = hints->y = 0;
|
hints->x = hints->y = 0;
|
||||||
}
|
}
|
||||||
|
@ -275,7 +278,7 @@ static GLboolean createWindow(_GLFWwindow* window,
|
||||||
|
|
||||||
// Set ICCCM WM_CLASS property
|
// Set ICCCM WM_CLASS property
|
||||||
// HACK: Until a mechanism for specifying the application name is added, the
|
// HACK: Until a mechanism for specifying the application name is added, the
|
||||||
// initial window title is used as the window class name
|
// initial window title is used as the window class name
|
||||||
if (strlen(wndconfig->title))
|
if (strlen(wndconfig->title))
|
||||||
{
|
{
|
||||||
XClassHint* hint = XAllocClassHint();
|
XClassHint* hint = XAllocClassHint();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user