Merge branch 'master' into multi-monitor

Conflicts:
	include/GL/glfw3.h
	readme.html
	src/CMakeLists.txt
	src/win32_window.c
	src/window.c
	src/x11_window.c
	tests/clipboard.c
	tests/defaults.c
	tests/events.c
	tests/fsfocus.c
	tests/glfwinfo.c
	tests/joysticks.c
	tests/peter.c
	tests/sharing.c
	tests/tearing.c
	tests/title.c
	tests/windows.c
This commit is contained in:
Camilla Berglund
2012-11-27 16:55:04 +01:00
36 changed files with 1239 additions and 678 deletions
+2 -24
View File
@@ -455,8 +455,7 @@ static int convertMacKeyCode(unsigned int macKeyCode)
if ([event modifierFlags] & NSCommandKeyMask)
{
if (window->systemKeys)
[super keyDown:event];
[super keyDown:event];
}
else
{
@@ -686,7 +685,7 @@ static GLboolean createWindow(_GLFWwindow* window,
}
window->NS.object = [[NSWindow alloc]
initWithContentRect:NSMakeRect(0, 0, window->width, window->height)
initWithContentRect:NSMakeRect(wndconfig->positionX, wndconfig->positionY, window->width, window->height)
styleMask:styleMask
backing:NSBackingStoreBuffered
defer:NO];
@@ -1006,27 +1005,6 @@ void _glfwPlatformSetWindowSize(_GLFWwindow* window, int width, int height)
}
//========================================================================
// Set the window position
//========================================================================
void _glfwPlatformSetWindowPos(_GLFWwindow* window, int x, int y)
{
NSRect contentRect =
[window->NS.object contentRectForFrameRect:[window->NS.object frame]];
// We assume here that the client code wants to position the window within the
// screen the window currently occupies
NSRect screenRect = [[window->NS.object screen] visibleFrame];
contentRect.origin = NSMakePoint(screenRect.origin.x + x,
screenRect.origin.y + screenRect.size.height -
y - contentRect.size.height);
[window->NS.object setFrame:[window->NS.object frameRectForContentRect:contentRect]
display:YES];
}
//========================================================================
// Iconify the window
//========================================================================