Replace last definitions from Xcomposite.h with xcb
Note that this adds an include for Xfixes.h, because that header is still needed and was previously included through Xcomposite.h. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
2f49f6f03d
commit
3ed73b1f8e
|
@ -82,7 +82,7 @@
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
#include <X11/Xutil.h>
|
#include <X11/Xutil.h>
|
||||||
#include <X11/Xatom.h>
|
#include <X11/Xatom.h>
|
||||||
#include <X11/extensions/Xcomposite.h> /* FIXME remove this once done porting to xcb-composite */
|
#include <X11/extensions/Xfixes.h>
|
||||||
#include <X11/extensions/shape.h>
|
#include <X11/extensions/shape.h>
|
||||||
#include <X11/extensions/Xdbe.h>
|
#include <X11/extensions/Xdbe.h>
|
||||||
#ifdef CONFIG_XSYNC
|
#ifdef CONFIG_XSYNC
|
||||||
|
@ -172,9 +172,6 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// === Constants ===
|
// === Constants ===
|
||||||
#if !(COMPOSITE_MAJOR > 0 || COMPOSITE_MINOR >= 2)
|
|
||||||
#error libXcomposite version unsupported
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/// @brief Length of generic buffers.
|
/// @brief Length of generic buffers.
|
||||||
#define BUF_LEN 80
|
#define BUF_LEN 80
|
||||||
|
|
|
@ -2510,7 +2510,7 @@ xerror(Display __attribute__((unused)) *dpy, XErrorEvent *ev) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ev->request_code == ps->composite_opcode
|
if (ev->request_code == ps->composite_opcode
|
||||||
&& ev->minor_code == X_CompositeRedirectSubwindows) {
|
&& ev->minor_code == XCB_COMPOSITE_REDIRECT_SUBWINDOWS) {
|
||||||
fprintf(stderr, "Another composite manager is already running "
|
fprintf(stderr, "Another composite manager is already running "
|
||||||
"(and does not handle _NET_WM_CM_Sn correctly)\n");
|
"(and does not handle _NET_WM_CM_Sn correctly)\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
|
@ -3691,7 +3691,7 @@ register_cm(session_t *ps) {
|
||||||
|
|
||||||
// Unredirect the window if it's redirected, just in case
|
// Unredirect the window if it's redirected, just in case
|
||||||
if (ps->redirected)
|
if (ps->redirected)
|
||||||
xcb_composite_unredirect_window(c, ps->reg_win, CompositeRedirectManual);
|
xcb_composite_unredirect_window(c, ps->reg_win, XCB_COMPOSITE_REDIRECT_MANUAL);
|
||||||
|
|
||||||
{
|
{
|
||||||
XClassHint *h = XAllocClassHint();
|
XClassHint *h = XAllocClassHint();
|
||||||
|
@ -4795,15 +4795,15 @@ redir_start(session_t *ps) {
|
||||||
if (ps->overlay)
|
if (ps->overlay)
|
||||||
XMapWindow(ps->dpy, ps->overlay);
|
XMapWindow(ps->dpy, ps->overlay);
|
||||||
|
|
||||||
xcb_composite_redirect_subwindows(c, ps->root, CompositeRedirectManual);
|
xcb_composite_redirect_subwindows(c, ps->root, XCB_COMPOSITE_REDIRECT_MANUAL);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
// Unredirect GL context window as this may have an effect on VSync:
|
// Unredirect GL context window as this may have an effect on VSync:
|
||||||
// < http://dri.freedesktop.org/wiki/CompositeSwap >
|
// < http://dri.freedesktop.org/wiki/CompositeSwap >
|
||||||
xcb_composite_unredirect_window(c, ps->reg_win, CompositeRedirectManual);
|
xcb_composite_unredirect_window(c, ps->reg_win, XCB_COMPOSITE_REDIRECT_MANUAL);
|
||||||
if (ps->o.paint_on_overlay && ps->overlay) {
|
if (ps->o.paint_on_overlay && ps->overlay) {
|
||||||
xcb_composite_unredirect_window(c, ps->overlay,
|
xcb_composite_unredirect_window(c, ps->overlay,
|
||||||
CompositeRedirectManual);
|
XCB_COMPOSITE_REDIRECT_MANUAL);
|
||||||
} */
|
} */
|
||||||
|
|
||||||
// Must call XSync() here
|
// Must call XSync() here
|
||||||
|
@ -4977,7 +4977,7 @@ redir_stop(session_t *ps) {
|
||||||
for (win *w = ps->list; w; w = w->next)
|
for (win *w = ps->list; w; w = w->next)
|
||||||
free_wpaint(ps, w);
|
free_wpaint(ps, w);
|
||||||
|
|
||||||
xcb_composite_unredirect_subwindows(c, ps->root, CompositeRedirectManual);
|
xcb_composite_unredirect_subwindows(c, ps->root, XCB_COMPOSITE_REDIRECT_MANUAL);
|
||||||
// Unmap overlay window
|
// Unmap overlay window
|
||||||
if (ps->overlay)
|
if (ps->overlay)
|
||||||
XUnmapWindow(ps->dpy, ps->overlay);
|
XUnmapWindow(ps->dpy, ps->overlay);
|
||||||
|
|
Loading…
Reference in New Issue