Re: [PATCH spice-gtk] gtk: add spice-widget GL scanout support

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

 



On Tue, 2016-02-16 at 07:19 -0500, Marc-André Lureau wrote:
> Hi
> 
> ----- Original Message -----
> > Hi,
> > 
> > with gtk2:
> > spice-widget-egl.c: In function ‘spice_egl_init’:
> > spice-widget-egl.c:203:9: error: implicit declaration of function
> > ‘GDK_IS_X11_DISPLAY’ [-Werror=implicit-function-declaration]
> >      if (GDK_IS_X11_DISPLAY(gdk_dpy)) {
> >          ^
> > spice-widget-egl.c:203:5: error: nested extern declaration of
> > ‘GDK_IS_X11_DISPLAY’ [-Werror=nested-externs]
> >      if (GDK_IS_X11_DISPLAY(gdk_dpy)) {
> >      ^
> > spice-widget-egl.c: In function ‘spice_widget_init_egl_win’:
> > spice-widget-egl.c:272:9: error: implicit declaration of function
> > ‘GDK_IS_X11_WINDOW’ [-Werror=implicit-function-declaration]
> >      if (GDK_IS_X11_WINDOW(win)) {
> >          ^
> > spice-widget-egl.c:272:5: error: nested extern declaration of
> > ‘GDK_IS_X11_WINDOW’ [-Werror=nested-externs]
> >      if (GDK_IS_X11_WINDOW(win)) {
> >      ^
> > spice-widget-egl.c:273:39: error: implicit declaration of function
> > ‘gdk_x11_window_get_xid’ [-Werror=implicit-function-declaration]
> >          native = (EGLNativeWindowType)gdk_x11_window_get_xid(win);
> >                                        ^
> > spice-widget-egl.c:273:9: error: nested extern declaration of
> > ‘gdk_x11_window_get_xid’ [-Werror=nested-externs]
> >          native = (EGLNativeWindowType)gdk_x11_window_get_xid(win);
> > 
> 
> That fixes it:

ack
Pavel
> 
> diff --git a/src/gtk-compat.h b/src/gtk-compat.h
> index be143b2..aac3b55 100644
> --- a/src/gtk-compat.h
> +++ b/src/gtk-compat.h
> @@ -25,6 +25,7 @@
>  #if !GTK_CHECK_VERSION (2, 91, 0)
>  #define GDK_IS_X11_DISPLAY(D) TRUE
>  #define gdk_window_get_display(W)
> gdk_drawable_get_display(GDK_DRAWABLE(W))
> +#define GDK_IS_X11_WINDOW(D) TRUE
>  #endif
>  
>  #if GTK_CHECK_VERSION (2, 91, 0)
> diff --git a/src/spice-widget-egl.c b/src/spice-widget-egl.c
> index d0f9381..4fa2818 100644
> --- a/src/spice-widget-egl.c
> +++ b/src/spice-widget-egl.c
> @@ -22,6 +22,7 @@
>  #define EGL_EGLEXT_PROTOTYPES
>  #define GL_GLEXT_PROTOTYPES
>  
> +#include "gtk-compat.h"
>  #include "spice-widget.h"
>  #include "spice-widget-priv.h"
>  #include "spice-gtk-session-priv.h"
> @@ -270,7 +271,7 @@ static gboolean
> spice_widget_init_egl_win(SpiceDisplay *display, GdkWindow *win,
>  
>  #ifdef GDK_WINDOWING_X11
>      if (GDK_IS_X11_WINDOW(win)) {
> -        native = (EGLNativeWindowType)gdk_x11_window_get_xid(win);
> +        native = (EGLNativeWindowType)GDK_WINDOW_XID(win);
>      }
>  #endif
> 
> > besides that I have done some tests and haven't noticed any issues.
> 
> cool
> 
> > For the future (when all bits are in) would be nice to have some
> > instruction
> > how to make it run in the SPICE manual.
> 
> Good idea. I have been more focused in getting things working with
> virt-install/virt-manager/boxes (I have patches ready, once qemu bits
> land)
> 
> > Pavel
> > 
> > Also copyright should be till 2016?
> 
> ok
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]