mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 08:44:19 -04:00
x11: Fix occasional crash on shutdown
This commit is contained in:
parent
0747f46055
commit
d5fed54a0c
@ -121,6 +121,7 @@ x11GraphicsWindow(GraphicsEngine *engine, GraphicsPipe *pipe,
|
|||||||
_override_redirect = False;
|
_override_redirect = False;
|
||||||
_wm_delete_window = x11_pipe->_wm_delete_window;
|
_wm_delete_window = x11_pipe->_wm_delete_window;
|
||||||
_net_wm_ping = x11_pipe->_net_wm_ping;
|
_net_wm_ping = x11_pipe->_net_wm_ping;
|
||||||
|
_net_wm_state = x11_pipe->_net_wm_state;
|
||||||
|
|
||||||
PT(GraphicsWindowInputDevice) device = GraphicsWindowInputDevice::pointer_and_keyboard(this, "keyboard_mouse");
|
PT(GraphicsWindowInputDevice) device = GraphicsWindowInputDevice::pointer_and_keyboard(this, "keyboard_mouse");
|
||||||
add_input_device(device);
|
add_input_device(device);
|
||||||
@ -368,9 +369,7 @@ process_events() {
|
|||||||
|
|
||||||
case PropertyNotify:
|
case PropertyNotify:
|
||||||
//std::cout << "PropertyNotify event: atom = " << event.xproperty.atom << std::endl;
|
//std::cout << "PropertyNotify event: atom = " << event.xproperty.atom << std::endl;
|
||||||
x11GraphicsPipe *x11_pipe;
|
if (event.xproperty.atom == _net_wm_state) {
|
||||||
DCAST_INTO_V(x11_pipe, _pipe);
|
|
||||||
if (event.xproperty.atom == x11_pipe->_net_wm_state) {
|
|
||||||
// currently we're only interested in the net_wm_state type of
|
// currently we're only interested in the net_wm_state type of
|
||||||
// changes and only need to gather property informations once at
|
// changes and only need to gather property informations once at
|
||||||
// the end after the while loop
|
// the end after the while loop
|
||||||
@ -516,6 +515,7 @@ process_events() {
|
|||||||
}
|
}
|
||||||
else if ((Atom)(event.xclient.data.l[0]) == _net_wm_ping &&
|
else if ((Atom)(event.xclient.data.l[0]) == _net_wm_ping &&
|
||||||
event.xclient.window == _xwindow) {
|
event.xclient.window == _xwindow) {
|
||||||
|
x11GraphicsPipe *x11_pipe;
|
||||||
DCAST_INTO_V(x11_pipe, _pipe);
|
DCAST_INTO_V(x11_pipe, _pipe);
|
||||||
event.xclient.window = x11_pipe->get_root();
|
event.xclient.window = x11_pipe->get_root();
|
||||||
XSendEvent(_display, x11_pipe->get_root(), False, SubstructureRedirectMask | SubstructureNotifyMask, &event);
|
XSendEvent(_display, x11_pipe->get_root(), False, SubstructureRedirectMask | SubstructureNotifyMask, &event);
|
||||||
|
@ -109,6 +109,7 @@ protected:
|
|||||||
Bool _override_redirect;
|
Bool _override_redirect;
|
||||||
Atom _wm_delete_window;
|
Atom _wm_delete_window;
|
||||||
Atom _net_wm_ping;
|
Atom _net_wm_ping;
|
||||||
|
Atom _net_wm_state;
|
||||||
|
|
||||||
x11GraphicsPipe::pfn_XRRGetScreenInfo _XRRGetScreenInfo;
|
x11GraphicsPipe::pfn_XRRGetScreenInfo _XRRGetScreenInfo;
|
||||||
x11GraphicsPipe::pfn_XRRSetScreenConfig _XRRSetScreenConfig;
|
x11GraphicsPipe::pfn_XRRSetScreenConfig _XRRSetScreenConfig;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user