diff --git a/include/GL/glfw3.h b/include/GL/glfw3.h index 69fe6bfd..191633a2 100644 --- a/include/GL/glfw3.h +++ b/include/GL/glfw3.h @@ -538,8 +538,6 @@ GLFWAPI void glfwDestroyWindow(GLFWwindow window); GLFWAPI void glfwSetWindowTitle(GLFWwindow window, const char* title); GLFWAPI void glfwGetWindowSize(GLFWwindow window, int* width, int* height); GLFWAPI void glfwSetWindowSize(GLFWwindow window, int width, int height); -GLFWAPI void glfwGetWindowPos(GLFWwindow window, int* xpos, int* ypos); -GLFWAPI void glfwSetWindowPos(GLFWwindow window, int xpos, int ypos); GLFWAPI void glfwIconifyWindow(GLFWwindow window); GLFWAPI void glfwRestoreWindow(GLFWwindow window); GLFWAPI void glfwShowWindow(GLFWwindow window); diff --git a/src/cocoa_window.m b/src/cocoa_window.m index 8fa1b866..5e4c7d81 100644 --- a/src/cocoa_window.m +++ b/src/cocoa_window.m @@ -1006,27 +1006,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 //======================================================================== diff --git a/src/internal.h b/src/internal.h index 573c9851..2101ad23 100644 --- a/src/internal.h +++ b/src/internal.h @@ -294,7 +294,6 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window, const _GLFWwndconfig* wndcon void _glfwPlatformDestroyWindow(_GLFWwindow* window); void _glfwPlatformSetWindowTitle(_GLFWwindow* window, const char* title); void _glfwPlatformSetWindowSize(_GLFWwindow* window, int width, int height); -void _glfwPlatformSetWindowPos(_GLFWwindow* window, int x, int y); void _glfwPlatformIconifyWindow(_GLFWwindow* window); void _glfwPlatformRestoreWindow(_GLFWwindow* window); void _glfwPlatformShowWindow(_GLFWwindow* window); diff --git a/src/win32_window.c b/src/win32_window.c index 2e6070ae..fd342da6 100644 --- a/src/win32_window.c +++ b/src/win32_window.c @@ -1058,23 +1058,6 @@ void _glfwPlatformSetWindowSize(_GLFWwindow* window, int width, int height) } -//======================================================================== -// Set the window position -//======================================================================== - -void _glfwPlatformSetWindowPos(_GLFWwindow* window, int x, int y) -{ - RECT rect; - - GetClientRect(window->Win32.handle, &rect); - AdjustWindowRectEx(&rect, window->Win32.dwStyle, FALSE, window->Win32.dwExStyle); - - SetWindowPos(window->Win32.handle, HWND_TOP, - x + rect.left, y + rect.top, 0, 0, - SWP_NOOWNERZORDER | SWP_NOSIZE | SWP_NOZORDER); -} - - //======================================================================== // Window iconification //======================================================================== diff --git a/src/window.c b/src/window.c index bf499a0a..986a0cb6 100644 --- a/src/window.c +++ b/src/window.c @@ -598,52 +598,6 @@ GLFWAPI void glfwSetWindowSize(GLFWwindow handle, int width, int height) } -//======================================================================== -// Get the window position -//======================================================================== - -GLFWAPI void glfwGetWindowPos(GLFWwindow handle, int* xpos, int* ypos) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - - if (!_glfwInitialized) - { - _glfwSetError(GLFW_NOT_INITIALIZED, NULL); - return; - } - - if (xpos != NULL) - *xpos = window->positionX; - - if (ypos != NULL) - *ypos = window->positionY; -} - - -//======================================================================== -// Set the window position -//======================================================================== - -GLFWAPI void glfwSetWindowPos(GLFWwindow handle, int xpos, int ypos) -{ - _GLFWwindow* window = (_GLFWwindow*) handle; - - if (!_glfwInitialized) - { - _glfwSetError(GLFW_NOT_INITIALIZED, NULL); - return; - } - - if (window->mode == GLFW_FULLSCREEN || window->iconified) - { - // TODO: Figure out if this is an error - return; - } - - _glfwPlatformSetWindowPos(window, xpos, ypos); -} - - //======================================================================== // Window iconification //======================================================================== diff --git a/src/x11_window.c b/src/x11_window.c index a4233f26..28724750 100644 --- a/src/x11_window.c +++ b/src/x11_window.c @@ -1012,16 +1012,6 @@ void _glfwPlatformSetWindowSize(_GLFWwindow* window, int width, int height) } -//======================================================================== -// Set the window position. -//======================================================================== - -void _glfwPlatformSetWindowPos(_GLFWwindow* window, int x, int y) -{ - XMoveWindow(_glfwLibrary.X11.display, window->X11.handle, x, y); -} - - //======================================================================== // Window iconification //========================================================================