Bug 119670 - webkit_web_view_set_transparent does not work
Summary: webkit_web_view_set_transparent does not work
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other Linux
: P1 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on:
Blocks:
 
Reported: 2013-08-11 23:04 PDT by BS_Chauhan
Modified: 2017-03-11 10:46 PST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description BS_Chauhan 2013-08-11 23:04:19 PDT
Hi,

I have ported webkitgtk 1.10.2 on embedded system with backend has directFB using Buildroot, I wanted to make the white background which is the default background window color on webkitgtk to make it as transparent, such that only the widgets on the transparent window are visible. The problem here is I am able to set the Gtk window as transparent using cairo with the following code spinet below.

static gboolean expose(GtkWidget *widget, GdkEventExpose *event, gpointer userdata)
{
   
   cairo_t *cr = gdk_cairo_create(widget->window);

    /*if (supports_alpha)*/
        cairo_set_source_rgba (cr, 1.0, 1.0, 1.0, 0.2); /* transparent */
    /*else
        cairo_set_source_rgb (cr, 1.0, 1.0, 1.0);  opaque white */

    /* draw the background */
    cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
    cairo_paint (cr);

    cairo_destroy(cr);

    return FALSE;
}    

with the above code I am only able to set the transparency to the Gtk window, I failed to set the transparency to the webview which is created upon  the gtk window, I wanted the webview also to be transparent. To achieve this I used webkit_web_view_set_transparent, but this does not work for me I tried to check using webkit_web_view_get_transparent I get TRUE as the return value, But still no effect on the webview it remains with no change that is white background.

Is there is a way I can set the webview as transparent?? 


Thanks.
Comment 1 Martin Robinson 2013-09-09 11:13:37 PDT
(In reply to comment #0)

> Is there is a way I can set the webview as transparent?? 

Ensure that the page you are showing does not have an opaque background.