mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 16:58:40 -04:00
x11display: bypass compositor when switching to fullscreen mode
This commit is contained in:
parent
cedd4172c4
commit
73083127bf
@ -241,6 +241,7 @@ x11GraphicsPipe(const std::string &display) :
|
||||
_net_wm_state_below = XInternAtom(_display, "_NET_WM_STATE_BELOW", false);
|
||||
_net_wm_state_add = XInternAtom(_display, "_NET_WM_STATE_ADD", false);
|
||||
_net_wm_state_remove = XInternAtom(_display, "_NET_WM_STATE_REMOVE", false);
|
||||
_net_wm_bypass_compositor = XInternAtom(_display, "_NET_WM_BYPASS_COMPOSITOR", false);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -80,6 +80,7 @@ public:
|
||||
Atom _net_wm_state_below;
|
||||
Atom _net_wm_state_add;
|
||||
Atom _net_wm_state_remove;
|
||||
Atom _net_wm_bypass_compositor;
|
||||
|
||||
// Extension functions.
|
||||
typedef int (*pfn_XcursorGetDefaultSize)(X11_Display *);
|
||||
|
@ -1272,6 +1272,14 @@ set_wm_properties(const WindowProperties &properties, bool already_mapped) {
|
||||
XA_CARDINAL, 32, PropModeReplace,
|
||||
(unsigned char *)&pid, 1);
|
||||
|
||||
// Disable compositing effects in fullscreen mode.
|
||||
if (properties.has_fullscreen()) {
|
||||
int32_t compositor = properties.get_fullscreen() ? 1 : 0;
|
||||
XChangeProperty(_display, _xwindow, x11_pipe->_net_wm_bypass_compositor,
|
||||
XA_CARDINAL, 32, PropModeReplace,
|
||||
(unsigned char *)&compositor, 1);
|
||||
}
|
||||
|
||||
XChangeProperty(_display, _xwindow, x11_pipe->_net_wm_window_type,
|
||||
XA_ATOM, 32, PropModeReplace,
|
||||
(unsigned char *)type_data, next_type_data);
|
||||
|
Loading…
x
Reference in New Issue
Block a user