[webkit-gtk] Win32 program for webkit-gtk cannot start on Windows XP

SCU Rock scurock at gmail.com
Fri Apr 9 17:05:59 PDT 2010


Hi,

    Using cross-compiled webkit win32 library on
http://sourceforge.net/projects/gnucash/files/gnucash%20%28unstable%29/Win32%20Build%20Dependencies/webkit-1.1.90-win32.zip/download,
I made a simple testing program on Windows :

--------------------------------------------------------
#include <gtk/gtk.h>
#include <webkit/webkit.h>

static void destroy_cb(GtkWidget* widget, gpointer data) {
  gtk_main_quit();
}

int main(int argc, char** argv) {

    GtkWidget* window;
    gtk_init(&argc, &argv);

    // Create a Window, set colormap to RGBA
    window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
    GdkScreen *screen = gtk_widget_get_screen(window);
    GdkColormap *rgba = gdk_screen_get_rgba_colormap (screen);

    if (rgba && gdk_screen_is_composited (screen)) {
        gtk_widget_set_default_colormap(rgba);
        gtk_widget_set_colormap(GTK_WIDGET(window), rgba);
    }

    gtk_window_set_default_size(GTK_WINDOW(window), 800, 600);
    g_signal_connect(window, "destroy", G_CALLBACK(destroy_cb), NULL);

    // Optional: for dashboard style borderless windows
    gtk_window_set_decorated(GTK_WINDOW(window), FALSE);
    printf ("I am here\n");
    // Create a WebView, set it transparent, add it to the window
    WebKitWebView* web_view = WEBKIT_WEB_VIEW(webkit_web_view_new());
    printf ("I am here 2\n");
    //  webkit_web_view_set_transparent(web_view, TRUE);
    gtk_container_add (GTK_CONTAINER(window), GTK_WIDGET(web_view));

    // Load a default page
    webkit_web_view_open(web_view, "http://www.google.com");

    // Show it and continue running until the window closes
    gtk_widget_grab_focus(GTK_WIDGET(web_view));
    gtk_widget_show_all(window);
    gtk_main();
    return 0;
}

It works well on Vista. The program has a bunch of DLL dependencies and I
have put them on the same directory of the program. But on Window XP, it
hangs at WEBKIT_WEB_VIEW(webkit_web_view_new()). There is no message, no CPU
hike, just silent stuck. Does anyone know why the program cannot run on XP?

I know the library is not stable (being downloaded from "gnucash unstable").
But working on XP is very basic and should work, right?

Thanks,
Eugene
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-gtk/attachments/20100409/36e1944a/attachment.html>


More information about the webkit-gtk mailing list