@ -295,7 +295,7 @@ static void updateWindowMode(_GLFWwindow* window)
window - > x11 . overrideRedirect = GLFW_TRUE ;
}
if ( _glfw . x11 . NET_WM_BYPASS_COMPOSITOR )
// Enable compositor bypass
{
const unsigned long value = 1 ;
@ -333,7 +333,7 @@ static void updateWindowMode(_GLFWwindow* window)
window - > x11 . overrideRedirect = GLFW_FALSE ;
}
if ( _glfw . x11 . NET_WM_BYPASS_COMPOSITOR )
// Disable compositor bypass
{
XDeleteProperty ( _glfw . x11 . display , window - > x11 . handle ,
_glfw . x11 . NET_WM_BYPASS_COMPOSITOR ) ;
@ -495,28 +495,17 @@ static GLFWbool createWindow(_GLFWwindow* window,
// Declare the WM protocols supported by GLFW
{
int count = 0 ;
Atom protocols [ 2 ] ;
// The WM_DELETE_WINDOW ICCCM protocol
// Basic window close notification protocol
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 )
protocols [ count + + ] = _glfw . x11 . NET_WM_PING ;
if ( count > 0 )
Atom protocols [ ] =
{
XSetWMProtocols ( _glfw . x11 . display , window - > x11 . handle ,
protocols , count ) ;
}
_glfw . x11 . WM_DELETE_WINDOW ,
_glfw . x11 . NET_WM_PING
} ;
XSetWMProtocols ( _glfw . x11 . display , window - > x11 . handle ,
protocols , sizeof ( protocols ) / sizeof ( Atom ) ) ;
}
if ( _glfw . x11 . NET_WM_PID )
// Declare our PID
{
const pid_t pid = getpid ( ) ;
@ -1591,21 +1580,15 @@ void _glfwPlatformSetWindowTitle(_GLFWwindow* window, const char* title)
NULL , NULL , NULL ) ;
# endif
if ( _glfw . x11 . NET_WM_NAME )
{
XChangeProperty ( _glfw . x11 . display , window - > x11 . handle ,
_glfw . x11 . NET_WM_NAME , _glfw . x11 . UTF8_STRING , 8 ,
PropModeReplace ,
( unsigned char * ) title , strlen ( title ) ) ;
}
XChangeProperty ( _glfw . x11 . display , window - > x11 . handle ,
_glfw . x11 . NET_WM_NAME , _glfw . x11 . UTF8_STRING , 8 ,
PropModeReplace ,
( unsigned char * ) title , strlen ( title ) ) ;
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 ,
PropModeReplace ,
( unsigned char * ) title , strlen ( title ) ) ;
}
XChangeProperty ( _glfw . x11 . display , window - > x11 . handle ,
_glfw . x11 . NET_WM_ICON_NAME , _glfw . x11 . UTF8_STRING , 8 ,
PropModeReplace ,
( unsigned char * ) title , strlen ( title ) ) ;
XFlush ( _glfw . x11 . display ) ;
}