Skip to content

Commit

Permalink
Explicitly request our window to not be composited.
Browse files Browse the repository at this point in the history
This does nothing in KWin though (works anyway), and it looks like other
compositors currently do not support this flag anyway. This makes it
however easier for compositors to fix incompatbilities by adding support
for the flag.
  • Loading branch information
divVerent committed Feb 26, 2018
1 parent c531c5b commit 252bfe5
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,24 @@ int main(int argc, char **argv) {
XChangeProperty(display, background_window, state_atom, XA_ATOM, 32,
PropModeReplace, (const unsigned char *)&fullscreen_atom, 1);

// Bypass compositing, just in case.
Atom dont_composite_atom =
XInternAtom(display, "_NET_WM_BYPASS_COMPOSITOR", False);
long dont_composite = 1;
XChangeProperty(display, background_window, dont_composite_atom, XA_CARDINAL,
32, PropModeReplace, (const unsigned char *)&dont_composite,
1);
#ifdef HAVE_COMPOSITE
if (have_composite) {
// Also set this property on the Composite Overlay Window, just in case a
// compositor were to try compositing it (xcompmgr does, but doesn't know
// this property anyway).
XChangeProperty(display, composite_window, dont_composite_atom, XA_CARDINAL,
32, PropModeReplace, (const unsigned char *)&dont_composite,
1);
}
#endif

// Initialize XInput so we can get multibyte key events.
XIM xim = XOpenIM(display, NULL, NULL, NULL);
if (xim == NULL) {
Expand Down

0 comments on commit 252bfe5

Please sign in to comment.