Skip to content

Commit 27cd2d3

Browse files
committed
gui-agent: switch to automatic composition mode, fix in-vm screenshots
For in-vm screenshots (including screen sharing etc) to work, window composition buffers needs to be rendered back to root window. Using "automatic" composition mode does that. Fixes QubesOS/qubes-issues#4351
1 parent b6de187 commit 27cd2d3

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

gui-agent/vmside.c

+9-2
Original file line numberDiff line numberDiff line change
@@ -2013,11 +2013,18 @@ int main(int argc, char **argv)
20132013
mkghandles(&g);
20142014
ghandles_for_vchan_reinitialize = &g;
20152015
parse_args(&g, argc, argv);
2016+
/* Turn on Composite for all children of root window. This way X server
2017+
* keeps separate buffers for each (root child) window.
2018+
* There are two modes:
2019+
* - manual - this way only off-screen buffers are maintained
2020+
* - automatic - in addition to manual, widows are rendered back to the
2021+
* root window
2022+
*/
20162023
for (i = 0; i < ScreenCount(g.display); i++)
20172024
XCompositeRedirectSubwindows(g.display,
20182025
RootWindow(g.display, i),
2019-
// CompositeRedirectAutomatic);
2020-
CompositeRedirectManual);
2026+
CompositeRedirectAutomatic);
2027+
// CompositeRedirectManual);
20212028
for (i = 0; i < ScreenCount(g.display); i++)
20222029
XSelectInput(g.display, RootWindow(g.display, i),
20232030
SubstructureNotifyMask);

0 commit comments

Comments
 (0)