Re: How to debug the xserver?

2012-09-02 Thread Scott Moreau
On Mon, Sep 3, 2012 at 12:01 AM, Bill Spitzak  wrote:

> On 08/31/2012 05:03 AM, Tiago Vignatti wrote:
>
>  you need to update your xtrans library:
>> http://lists.freedesktop.org/**archives/wayland-devel/2012-**
>> August/005157.html
>>
>
> I tried guessing at the name of the git repository but am not having much
> luck in figuring this out. Can you supply some more hints on how I get the
> updated xtrans library?
>
>
>
The repo is here git://anongit.freedesktop.org/xorg/lib/libxtrans
http://cgit.freedesktop.org/xorg/lib/libxtrans
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: How to debug the xserver?

2012-09-02 Thread Bill Spitzak

On 08/31/2012 05:03 AM, Tiago Vignatti wrote:


you need to update your xtrans library:
http://lists.freedesktop.org/archives/wayland-devel/2012-August/005157.html


I tried guessing at the name of the git repository but am not having 
much luck in figuring this out. Can you supply some more hints on how I 
get the updated xtrans library?


___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: How to debug the xserver?

2012-09-02 Thread Bill Spitzak

On 08/31/2012 05:03 AM, Tiago Vignatti wrote:


you need to update your xtrans library:
http://lists.freedesktop.org/archives/wayland-devel/2012-August/005157.html


That patch is not in the 1.12 branch I was told I needed to run. Can it 
be back-ported?


___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel


[PATCH weston] compositor: Fix xwayland surface alpha.

2012-09-02 Thread Scott Moreau
Re-add the opaque_rect hack back to shaders so xwayland surfaces are not 
broken. xwm
is the only one that uses weston_surface::opaque_rect, specifically for this 
reason.
It was removed by 0e5a2d02191 - "compositor: simplify shaders", which 
simplified them
a bit too much.
---
 src/compositor.c | 6 ++
 src/compositor.h | 1 +
 2 files changed, 7 insertions(+)

diff --git a/src/compositor.c b/src/compositor.c
index 9ce44d4..b19cbaf 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -1365,6 +1365,7 @@ weston_surface_draw(struct weston_surface *es, struct 
weston_output *output,
   1, GL_FALSE, output->matrix.d);
glUniform4fv(es->shader->color_uniform, 1, es->color);
glUniform1f(es->shader->alpha_uniform, es->alpha);
+   glUniform4fv(es->shader->opaque_uniform, 1, es->opaque_rect);
 
if (es->transform.enabled || output->zoom.active)
filter = GL_LINEAR;
@@ -3247,9 +3248,13 @@ static const char texture_fragment_shader_rgba[] =
"varying vec2 v_texcoord;\n"
"uniform sampler2D tex;\n"
"uniform float alpha;\n"
+   "uniform vec4 opaque;\n"
"void main()\n"
"{\n"
"   gl_FragColor = alpha * texture2D(tex, v_texcoord)\n;"
+   "   if (opaque.x <= v_texcoord.x && v_texcoord.x < opaque.y &&\n"
+   "   opaque.z <= v_texcoord.y && v_texcoord.y < opaque.w)\n"
+   "   gl_FragColor.a = alpha;\n"
"}\n";
 
 static const char texture_fragment_shader_rgbx[] =
@@ -3375,6 +3380,7 @@ weston_shader_init(struct weston_shader *shader,
shader->tex_uniforms[2] = glGetUniformLocation(shader->program, "tex2");
shader->alpha_uniform = glGetUniformLocation(shader->program, "alpha");
shader->color_uniform = glGetUniformLocation(shader->program, "color");
+   shader->opaque_uniform = glGetUniformLocation(shader->program, 
"opaque");
 
return 0;
 }
diff --git a/src/compositor.h b/src/compositor.h
index 96a0477..13ee804 100644
--- a/src/compositor.h
+++ b/src/compositor.h
@@ -248,6 +248,7 @@ struct weston_shader {
GLint tex_uniforms[3];
GLint alpha_uniform;
GLint color_uniform;
+   GLint opaque_uniform;
 };
 
 enum {
-- 
1.7.11.4

___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel