mirror of
https://github.com/gwm17/glfw.git
synced 2025-01-31 03:18:50 -05:00
Cleanup.
This commit is contained in:
parent
7ff86576e3
commit
68098f44db
|
@ -395,7 +395,7 @@ static Atom getSupportedAtom(Atom* supportedAtoms,
|
||||||
// Check whether the running window manager is EWMH-compliant
|
// Check whether the running window manager is EWMH-compliant
|
||||||
//========================================================================
|
//========================================================================
|
||||||
|
|
||||||
static void initEWMH(void)
|
static void detectEWMH(void)
|
||||||
{
|
{
|
||||||
Window* windowFromRoot = NULL;
|
Window* windowFromRoot = NULL;
|
||||||
Window* windowFromChild = NULL;
|
Window* windowFromChild = NULL;
|
||||||
|
@ -549,6 +549,9 @@ static GLboolean initDisplay(void)
|
||||||
// the keyboard mapping.
|
// the keyboard mapping.
|
||||||
updateKeyCodeLUT();
|
updateKeyCodeLUT();
|
||||||
|
|
||||||
|
// Detect whether an EWMH-conformant window manager is running
|
||||||
|
detectEWMH();
|
||||||
|
|
||||||
// Find or create selection property atom
|
// Find or create selection property atom
|
||||||
_glfw.x11.selection.property =
|
_glfw.x11.selection.property =
|
||||||
XInternAtom(_glfw.x11.display, "GLFW_SELECTION", False);
|
XInternAtom(_glfw.x11.display, "GLFW_SELECTION", False);
|
||||||
|
@ -638,14 +641,11 @@ int _glfwPlatformInit(void)
|
||||||
if (!_glfwInitOpenGL())
|
if (!_glfwInitOpenGL())
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
|
|
||||||
initEWMH();
|
|
||||||
|
|
||||||
_glfw.x11.cursor = createNULLCursor();
|
_glfw.x11.cursor = createNULLCursor();
|
||||||
|
|
||||||
if (!_glfwInitJoysticks())
|
if (!_glfwInitJoysticks())
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
|
|
||||||
// Start the timer
|
|
||||||
_glfwInitTimer();
|
_glfwInitTimer();
|
||||||
|
|
||||||
return GL_TRUE;
|
return GL_TRUE;
|
||||||
|
@ -672,7 +672,6 @@ void _glfwPlatformTerminate(void)
|
||||||
|
|
||||||
terminateDisplay();
|
terminateDisplay();
|
||||||
|
|
||||||
// Free clipboard memory
|
|
||||||
if (_glfw.x11.selection.string)
|
if (_glfw.x11.selection.string)
|
||||||
free(_glfw.x11.selection.string);
|
free(_glfw.x11.selection.string);
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,9 +109,9 @@ static GLboolean createWindow(_GLFWwindow* window,
|
||||||
|
|
||||||
if (wndconfig->monitor == NULL)
|
if (wndconfig->monitor == NULL)
|
||||||
{
|
{
|
||||||
// The /only/ reason for setting the background pixel here is that
|
// HACK: This is a workaround for windows without a background pixel
|
||||||
// otherwise our window won't get any decorations on systems using
|
// not getting any decorations on certain older versions of Compiz
|
||||||
// certain versions of Compiz on Intel hardware
|
// 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;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user