This commit is contained in:
Camilla Berglund 2013-01-04 07:11:30 +01:00
parent 7ff86576e3
commit 68098f44db
2 changed files with 7 additions and 8 deletions

View File

@ -395,7 +395,7 @@ static Atom getSupportedAtom(Atom* supportedAtoms,
// Check whether the running window manager is EWMH-compliant
//========================================================================
static void initEWMH(void)
static void detectEWMH(void)
{
Window* windowFromRoot = NULL;
Window* windowFromChild = NULL;
@ -549,6 +549,9 @@ static GLboolean initDisplay(void)
// the keyboard mapping.
updateKeyCodeLUT();
// Detect whether an EWMH-conformant window manager is running
detectEWMH();
// Find or create selection property atom
_glfw.x11.selection.property =
XInternAtom(_glfw.x11.display, "GLFW_SELECTION", False);
@ -638,14 +641,11 @@ int _glfwPlatformInit(void)
if (!_glfwInitOpenGL())
return GL_FALSE;
initEWMH();
_glfw.x11.cursor = createNULLCursor();
if (!_glfwInitJoysticks())
return GL_FALSE;
// Start the timer
_glfwInitTimer();
return GL_TRUE;
@ -672,7 +672,6 @@ void _glfwPlatformTerminate(void)
terminateDisplay();
// Free clipboard memory
if (_glfw.x11.selection.string)
free(_glfw.x11.selection.string);
}

View File

@ -109,9 +109,9 @@ static GLboolean createWindow(_GLFWwindow* window,
if (wndconfig->monitor == NULL)
{
// The /only/ reason for setting the background pixel here is that
// otherwise our window won't get any decorations on systems using
// certain versions of Compiz on Intel hardware
// HACK: This is a workaround for windows without a background pixel
// not getting any decorations on certain older versions of Compiz
// running on Intel hardware
wa.background_pixel = BlackPixel(_glfw.x11.display,
_glfw.x11.screen);
wamask |= CWBackPixel;