|
|
@@ -120,6 +120,7 @@ x11GraphicsWindow(GraphicsEngine *engine, GraphicsPipe *pipe,
|
|
|
_raw_mouse_enabled = false;
|
|
|
_override_redirect = False;
|
|
|
_wm_delete_window = x11_pipe->_wm_delete_window;
|
|
|
+ _net_wm_ping = x11_pipe->_net_wm_ping;
|
|
|
|
|
|
PT(GraphicsWindowInputDevice) device = GraphicsWindowInputDevice::pointer_and_keyboard(this, "keyboard_mouse");
|
|
|
add_input_device(device);
|
|
|
@@ -513,6 +514,12 @@ process_events() {
|
|
|
system_changed_properties(properties);
|
|
|
}
|
|
|
}
|
|
|
+ else if ((Atom)(event.xclient.data.l[0]) == _net_wm_ping &&
|
|
|
+ event.xclient.window == _xwindow) {
|
|
|
+ DCAST_INTO_V(x11_pipe, _pipe);
|
|
|
+ event.xclient.window = x11_pipe->get_root();
|
|
|
+ XSendEvent(_display, x11_pipe->get_root(), False, SubstructureRedirectMask | SubstructureNotifyMask, &event);
|
|
|
+ }
|
|
|
break;
|
|
|
|
|
|
case DestroyNotify:
|
|
|
@@ -1480,9 +1487,6 @@ set_wm_properties(const WindowProperties &properties, bool already_mapped) {
|
|
|
// mapped. To do this, we need to send a client message to the root
|
|
|
// window for each change.
|
|
|
|
|
|
- x11GraphicsPipe *x11_pipe;
|
|
|
- DCAST_INTO_V(x11_pipe, _pipe);
|
|
|
-
|
|
|
for (int i = 0; i < next_set_data; ++i) {
|
|
|
XClientMessageEvent event;
|
|
|
memset(&event, 0, sizeof(event));
|
|
|
@@ -1519,6 +1523,7 @@ set_wm_properties(const WindowProperties &properties, bool already_mapped) {
|
|
|
// X server if the user requests a window close.
|
|
|
Atom protocols[] = {
|
|
|
_wm_delete_window,
|
|
|
+ _net_wm_ping,
|
|
|
};
|
|
|
|
|
|
XSetWMProtocols(_display, _xwindow, protocols,
|