GNOME Bugzilla – Bug 705980
Update Win32 code so that GTK+ will build and run
Last modified: 2013-08-26 02:39:04 UTC
Hi, Due to the works to handle scaled cursor images, the commit b2113b73 (gdk: Add gdk_cursor_new_from_surface) changed get_cursor_for_pixbuf() of GdkDisplayClass to et_cursor_for_surface(), which required an update to the various backends of GDK, which, as a result, broke the build of the Win32 GDK backend and some Win32-specific code in GTK. I have did a bit of work to update the the code so that GTK/GDK will be able to be built and run on Windows, but probably would not yet cover the stuff needed for the scaled cursor images work, but it seems to me that the GTK test programs run at least as well as it did when before the work on handling scaled cursor images was committed. With blessings, thank you!
Created attachment 251605 [details] [review] Updates tp the Win32 GDK backend and the Win32-specific part of GTK This addresses the internal API changes in GDK due to "gdk: Add gdk_cursor_new_from_surface" in the Win32 GDK backend and Win32-specific code in GTK.
Created attachment 251606 [details] [review] Updates to gdk/win32/gdkdevice-virtual.c This also updates some prototypes and parameters of functions that were changed in gdk/win32/gdkdevice-virtual.c, and also addresses the GDK_IS_DEVICE critical message (bug 696756, courtesy of LE GARREC Vincent) issue when one uses GTK+-3.x on Windows. This file has a commit of its own as it has DOS/Windows line endings, which needs to be committed using "git am --ignore-whitespace "(or something like that). With blessings, thanks for the time.
Ping... Would like to see GTK+ still working on Windows. With blessings, thank you!
Review of attachment 251605 [details] [review]: ::: gdk/win32/gdkcursor-win32.c @@ +252,2 @@ GdkPixbuf * +gdk_win32_icon_to_pixbuf_libgtk_only (HICON hicon, gdouble *x_hot, gdouble *y_hot) coding style: the arguments should go on separate lines. @@ +457,3 @@ + gint height = cairo_image_surface_get_height (surface); + + pixbuf = gdk_pixbuf_get_from_surface (surface, 0, 0, width, height); these should really go below the argument checks. the GDK_IS_PIXBUF check should be replaced by a surface != NULL check; then, if gdk_pixbuf_get_from_surface() returns NULL, there should be a critical error and the function should return NULL. ::: gdk/win32/gdkwin32misc.h @@ +99,3 @@ /* For internal GTK use only */ GDK_AVAILABLE_IN_ALL +GdkPixbuf *gdk_win32_icon_to_pixbuf_libgtk_only (HICON hicon, gdouble *x_hot, gdouble *y_hot); coding style: the arguments should be on separate lines.
Review of attachment 251606 [details] [review]: looks okay to me.
Created attachment 252558 [details] [review] Updates tp the Win32 GDK backend and the Win32-specific part of GTK [take ii] Hi, Is this patch better? Please correct me if I'm wrong, but I am still using GDK_IS_PIXBUF after the gdk_pixbuf_get_from_surface() call as IMHO GDK_IS_PIXBUF also checks whether pixbuf is NULL. With blessings, thank you!
Review of attachment 251606 [details] [review]: Hi, Can this patch be committed, just to make sure? With blessings, thank you!
Review of attachment 252558 [details] [review]: looks good to me
Hi, I think I will go ahead to commit these patches as: -I don't see any objections for these so far, IMHO -The latest GTK+ 3.9.x needs these patches to build and run on Windows Please feel free to reopen if these patches should be an issue. I have pushed these patches on master as: -Attachment 251606 [details]: bd596144 -Attachment 252558 [details]: 0e01f9cc With blessings, thank you!