[clutter] winsys-glx: map X window automatically if not foreign



commit 799caeb588973ea4b64003efc31c9853a05d8f73
Author: Robert Bragg <robert linux intel com>
Date:   Mon Apr 18 16:26:17 2011 +0100

    winsys-glx: map X window automatically if not foreign
    
    For now we are going for the semantics that when a CoglOnscreen is first
    allocated then it will automatically be mapped. This is for convenience
    and if you don't want that behaviour then it is possible to instead
    create an Onscreen from a foreign X window and in that case it wont be
    mapped automatically.
    
    This approach means that Cogl doesn't need onscreen_map/unmap functions
    but it's possible we'll decide later that we can't avoid adding such
    functions and we'll have to change these semantics.

 clutter/cogl/cogl/winsys/cogl-winsys-glx.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/clutter/cogl/cogl/winsys/cogl-winsys-glx.c b/clutter/cogl/cogl/winsys/cogl-winsys-glx.c
index b15263c..1f115f2 100644
--- a/clutter/cogl/cogl/winsys/cogl-winsys-glx.c
+++ b/clutter/cogl/cogl/winsys/cogl-winsys-glx.c
@@ -806,6 +806,8 @@ _cogl_winsys_onscreen_init (CoglOnscreen *onscreen,
 
       XFree (xvisinfo);
 
+      XMapWindow (xlib_renderer->xdpy, xwin);
+
       XSync (xlib_renderer->xdpy, False);
       xerror = _cogl_renderer_xlib_untrap_errors (display->renderer, &state);
       if (xerror)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]