|
|
|
@ -205,13 +205,13 @@ static GLboolean createWindow(_GLFWwindow* window, |
|
|
|
|
|
|
|
|
|
// The WM_DELETE_WINDOW ICCCM protocol
|
|
|
|
|
// Basic window close notification protocol
|
|
|
|
|
if (_glfw.x11.WM_DELETE_WINDOW != None) |
|
|
|
|
if (_glfw.x11.WM_DELETE_WINDOW) |
|
|
|
|
protocols[count++] = _glfw.x11.WM_DELETE_WINDOW; |
|
|
|
|
|
|
|
|
|
// The _NET_WM_PING EWMH protocol
|
|
|
|
|
// Tells the WM to ping the GLFW window and flag the application as
|
|
|
|
|
// unresponsive if the WM doesn't get a reply within a few seconds
|
|
|
|
|
if (_glfw.x11.NET_WM_PING != None) |
|
|
|
|
if (_glfw.x11.NET_WM_PING) |
|
|
|
|
protocols[count++] = _glfw.x11.NET_WM_PING; |
|
|
|
|
|
|
|
|
|
if (count > 0) |
|
|
|
@ -221,7 +221,7 @@ static GLboolean createWindow(_GLFWwindow* window, |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (_glfw.x11.NET_WM_PID != None) |
|
|
|
|
if (_glfw.x11.NET_WM_PID) |
|
|
|
|
{ |
|
|
|
|
const pid_t pid = getpid(); |
|
|
|
|
|
|
|
|
@ -399,7 +399,7 @@ static void enterFullscreenMode(_GLFWwindow* window) |
|
|
|
|
|
|
|
|
|
_glfwSetVideoMode(window->monitor, &window->videoMode); |
|
|
|
|
|
|
|
|
|
if (_glfw.x11.NET_WM_BYPASS_COMPOSITOR != None) |
|
|
|
|
if (_glfw.x11.NET_WM_BYPASS_COMPOSITOR) |
|
|
|
|
{ |
|
|
|
|
const unsigned long value = 1; |
|
|
|
|
|
|
|
|
@ -408,15 +408,13 @@ static void enterFullscreenMode(_GLFWwindow* window) |
|
|
|
|
PropModeReplace, (unsigned char*) &value, 1); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (_glfw.x11.hasEWMH && |
|
|
|
|
_glfw.x11.NET_WM_STATE != None && |
|
|
|
|
_glfw.x11.NET_WM_STATE_FULLSCREEN != None) |
|
|
|
|
if (_glfw.x11.NET_WM_STATE && _glfw.x11.NET_WM_STATE_FULLSCREEN) |
|
|
|
|
{ |
|
|
|
|
int x, y; |
|
|
|
|
_glfwPlatformGetMonitorPos(window->monitor, &x, &y); |
|
|
|
|
_glfwPlatformSetWindowPos(window, x, y); |
|
|
|
|
|
|
|
|
|
if (_glfw.x11.NET_ACTIVE_WINDOW != None) |
|
|
|
|
if (_glfw.x11.NET_ACTIVE_WINDOW) |
|
|
|
|
{ |
|
|
|
|
// Ask the window manager to raise and focus the GLFW window
|
|
|
|
|
// Only focused windows with the _NET_WM_STATE_FULLSCREEN state end
|
|
|
|
@ -496,7 +494,7 @@ static void leaveFullscreenMode(_GLFWwindow* window) |
|
|
|
|
_glfw.x11.saver.exposure); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (_glfw.x11.NET_WM_BYPASS_COMPOSITOR != None) |
|
|
|
|
if (_glfw.x11.NET_WM_BYPASS_COMPOSITOR) |
|
|
|
|
{ |
|
|
|
|
const unsigned long value = 0; |
|
|
|
|
|
|
|
|
@ -505,9 +503,7 @@ static void leaveFullscreenMode(_GLFWwindow* window) |
|
|
|
|
PropModeReplace, (unsigned char*) &value, 1); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (_glfw.x11.hasEWMH && |
|
|
|
|
_glfw.x11.NET_WM_STATE != None && |
|
|
|
|
_glfw.x11.NET_WM_STATE_FULLSCREEN != None) |
|
|
|
|
if (_glfw.x11.NET_WM_STATE && _glfw.x11.NET_WM_STATE_FULLSCREEN) |
|
|
|
|
{ |
|
|
|
|
// Ask the window manager to make the GLFW window a normal window
|
|
|
|
|
// Normal windows usually have frames and other decorations
|
|
|
|
@ -735,7 +731,7 @@ static void processEvent(XEvent *event) |
|
|
|
|
|
|
|
|
|
_glfwInputWindowCloseRequest(window); |
|
|
|
|
} |
|
|
|
|
else if (_glfw.x11.NET_WM_PING != None && |
|
|
|
|
else if (_glfw.x11.NET_WM_PING && |
|
|
|
|
(Atom) event->xclient.data.l[0] == _glfw.x11.NET_WM_PING) |
|
|
|
|
{ |
|
|
|
|
// The window manager is pinging the application to ensure it's
|
|
|
|
@ -1017,7 +1013,7 @@ void _glfwPlatformSetWindowTitle(_GLFWwindow* window, const char* title) |
|
|
|
|
NULL, NULL, NULL); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
if (_glfw.x11.NET_WM_NAME != None) |
|
|
|
|
if (_glfw.x11.NET_WM_NAME) |
|
|
|
|
{ |
|
|
|
|
XChangeProperty(_glfw.x11.display, window->x11.handle, |
|
|
|
|
_glfw.x11.NET_WM_NAME, _glfw.x11.UTF8_STRING, 8, |
|
|
|
@ -1025,7 +1021,7 @@ void _glfwPlatformSetWindowTitle(_GLFWwindow* window, const char* title) |
|
|
|
|
(unsigned char*) title, strlen(title)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (_glfw.x11.NET_WM_ICON_NAME != None) |
|
|
|
|
if (_glfw.x11.NET_WM_ICON_NAME) |
|
|
|
|
{ |
|
|
|
|
XChangeProperty(_glfw.x11.display, window->x11.handle, |
|
|
|
|
_glfw.x11.NET_WM_ICON_NAME, _glfw.x11.UTF8_STRING, 8, |
|
|
|
@ -1042,7 +1038,7 @@ void _glfwPlatformGetWindowPos(_GLFWwindow* window, int* xpos, int* ypos) |
|
|
|
|
XTranslateCoordinates(_glfw.x11.display, window->x11.handle, _glfw.x11.root, |
|
|
|
|
0, 0, &x, &y, &child); |
|
|
|
|
|
|
|
|
|
if (child != None) |
|
|
|
|
if (child) |
|
|
|
|
{ |
|
|
|
|
int left, top; |
|
|
|
|
|
|
|
|
|