Re: [PATCH 1/6] rdp: allow to compile against FreeRDP 2.0

2016-05-19 Thread Bryce Harrington
On Mon, May 16, 2016 at 11:50:14AM +0200, Quentin Glidic wrote:
> On 01/05/2016 23:32, David Fort wrote:
> >FreeRDP 2.0 is about to be released, this allows to compile against this 
> >version.
> >The detection is adjusted to prefer FreeRDP 2 against version 1.x.
> >
> >Signed-off-by: David Fort 
> 
> Reviewed-by: Quentin Glidic 
> 
> If think you can retain Rb from Bryce too, as you only changed the
> Autotools chunk.

Thanks, pushed this one:
   0887956..58b63ab  master -> master
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: [PATCH 1/6] rdp: allow to compile against FreeRDP 2.0

2016-05-16 Thread Quentin Glidic

On 01/05/2016 23:32, David Fort wrote:

FreeRDP 2.0 is about to be released, this allows to compile against this 
version.
The detection is adjusted to prefer FreeRDP 2 against version 1.x.

Signed-off-by: David Fort 


Reviewed-by: Quentin Glidic 

If think you can retain Rb from Bryce too, as you only changed the 
Autotools chunk.


Thanks :-)

--

Quentin “Sardem FF7” Glidic
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: [PATCH 1/6] rdp: allow to compile against FreeRDP 2.0

2016-05-01 Thread Hardening
Le 01/05/2016 23:32, David Fort a écrit :
> FreeRDP 2.0 is about to be released, this allows to compile against this 
> version.
> The detection is adjusted to prefer FreeRDP 2 against version 1.x.
> 
> Signed-off-by: David Fort 
> ---
>  configure.ac |  5 -
>  src/compositor-rdp.c | 23 ---
>  2 files changed, 20 insertions(+), 8 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 4199616..6ab9c99 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -238,7 +238,10 @@ AM_CONDITIONAL([ENABLE_RDP_COMPOSITOR],
> [test x$enable_rdp_compositor = xyes])
>  if test x$enable_rdp_compositor = xyes; then
>AC_DEFINE([BUILD_RDP_COMPOSITOR], [1], [Build the RDP compositor])
> -  PKG_CHECK_MODULES(RDP_COMPOSITOR, [freerdp >= 1.1.0])
> +  PKG_CHECK_MODULES(RDP_COMPOSITOR, [freerdp2 >= 2.0.0],
> +[],
> +[PKG_CHECK_MODULES(RDP_COMPOSITOR, [freerdp >= 1.1.0],[])]
> +  )

So this way it should not bug Quentin Glidic ;)

>  
>SAVED_CPPFLAGS="$CPPFLAGS"
>CPPFLAGS="$CPPFLAGS $RDP_COMPOSITOR_CFLAGS"
> diff --git a/src/compositor-rdp.c b/src/compositor-rdp.c
> index 2860556..f6778b6 100644
> --- a/src/compositor-rdp.c
> +++ b/src/compositor-rdp.c
> @@ -42,15 +42,24 @@
>  #define FREERDP_VERSION_NUMBER ((FREERDP_VERSION_MAJOR * 0x1) + \
>   (FREERDP_VERSION_MINOR * 0x100) + FREERDP_VERSION_REVISION)
>  
> +
>  #if FREERDP_VERSION_NUMBER >= 0x10201
>  #define HAVE_SKIP_COMPRESSION
>  #endif
>  
>  #if FREERDP_VERSION_NUMBER < 0x10202
> -#define FREERDP_CB_RET_TYPE void
> -#define FREERDP_CB_RETURN(V) return
> +#define FREERDP_CB_RET_TYPE void
> +#define FREERDP_CB_RETURN(V) return
> +#define NSC_RESET(C, W, H)
> +#define RFX_RESET(C, W, H) do { rfx_context_reset(C); C->width = W; 
> C->height = H; } while(0)
> +#else
> +#if FREERDP_VERSION_MAJOR >= 2
> +#define NSC_RESET(C, W, H) nsc_context_reset(C, W, H)
> +#define RFX_RESET(C, W, H) rfx_context_reset(C, W, H)
>  #else
> -#define HAVE_NSC_RESET
> +#define NSC_RESET(C, W, H) do { nsc_context_reset(C); C->width = W; 
> C->height = H; } while(0)
> +#define RFX_RESET(C, W, H) do { rfx_context_reset(C); C->width = W; 
> C->height = H; } while(0)
> +#endif
>  #define FREERDP_CB_RET_TYPE BOOL
>  #define FREERDP_CB_RETURN(V) return TRUE
>  #endif
> @@ -795,6 +804,7 @@ xf_peer_activate(freerdp_peer* client)
>   struct xkb_context *xkbContext;
>   struct xkb_rule_names xkbRuleNames;
>   struct xkb_keymap *keymap;
> + struct weston_output *weston_output;
>   int i;
>   pixman_box32_t box;
>   pixman_region32_t damage;
> @@ -843,10 +853,9 @@ xf_peer_activate(freerdp_peer* client)
>   }
>   }
>  
> - rfx_context_reset(peerCtx->rfx_context);
> -#ifdef HAVE_NSC_RESET
> - nsc_context_reset(peerCtx->nsc_context);
> -#endif
> + weston_output = &output->base;
> + RFX_RESET(peerCtx->rfx_context, weston_output->width, 
> weston_output->height);
> + NSC_RESET(peerCtx->nsc_context, weston_output->width, 
> weston_output->height);
>  
>   if (peersItem->flags & RDP_PEER_ACTIVATED)
>   return TRUE;
> 


-- 
David FORT
website: http://www.hardening-consulting.com/

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


[PATCH 1/6] rdp: allow to compile against FreeRDP 2.0

2016-05-01 Thread David Fort
FreeRDP 2.0 is about to be released, this allows to compile against this 
version.
The detection is adjusted to prefer FreeRDP 2 against version 1.x.

Signed-off-by: David Fort 
---
 configure.ac |  5 -
 src/compositor-rdp.c | 23 ---
 2 files changed, 20 insertions(+), 8 deletions(-)

diff --git a/configure.ac b/configure.ac
index 4199616..6ab9c99 100644
--- a/configure.ac
+++ b/configure.ac
@@ -238,7 +238,10 @@ AM_CONDITIONAL([ENABLE_RDP_COMPOSITOR],
[test x$enable_rdp_compositor = xyes])
 if test x$enable_rdp_compositor = xyes; then
   AC_DEFINE([BUILD_RDP_COMPOSITOR], [1], [Build the RDP compositor])
-  PKG_CHECK_MODULES(RDP_COMPOSITOR, [freerdp >= 1.1.0])
+  PKG_CHECK_MODULES(RDP_COMPOSITOR, [freerdp2 >= 2.0.0],
+[],
+[PKG_CHECK_MODULES(RDP_COMPOSITOR, [freerdp >= 1.1.0],[])]
+  )
 
   SAVED_CPPFLAGS="$CPPFLAGS"
   CPPFLAGS="$CPPFLAGS $RDP_COMPOSITOR_CFLAGS"
diff --git a/src/compositor-rdp.c b/src/compositor-rdp.c
index 2860556..f6778b6 100644
--- a/src/compositor-rdp.c
+++ b/src/compositor-rdp.c
@@ -42,15 +42,24 @@
 #define FREERDP_VERSION_NUMBER ((FREERDP_VERSION_MAJOR * 0x1) + \
(FREERDP_VERSION_MINOR * 0x100) + FREERDP_VERSION_REVISION)
 
+
 #if FREERDP_VERSION_NUMBER >= 0x10201
 #define HAVE_SKIP_COMPRESSION
 #endif
 
 #if FREERDP_VERSION_NUMBER < 0x10202
-#define FREERDP_CB_RET_TYPE void
-#define FREERDP_CB_RETURN(V) return
+#  define FREERDP_CB_RET_TYPE void
+#  define FREERDP_CB_RETURN(V) return
+#  define NSC_RESET(C, W, H)
+#  define RFX_RESET(C, W, H) do { rfx_context_reset(C); C->width = W; 
C->height = H; } while(0)
+#else
+#if FREERDP_VERSION_MAJOR >= 2
+#  define NSC_RESET(C, W, H) nsc_context_reset(C, W, H)
+#  define RFX_RESET(C, W, H) rfx_context_reset(C, W, H)
 #else
-#define HAVE_NSC_RESET
+#  define NSC_RESET(C, W, H) do { nsc_context_reset(C); C->width = W; 
C->height = H; } while(0)
+#  define RFX_RESET(C, W, H) do { rfx_context_reset(C); C->width = W; 
C->height = H; } while(0)
+#endif
 #define FREERDP_CB_RET_TYPE BOOL
 #define FREERDP_CB_RETURN(V) return TRUE
 #endif
@@ -795,6 +804,7 @@ xf_peer_activate(freerdp_peer* client)
struct xkb_context *xkbContext;
struct xkb_rule_names xkbRuleNames;
struct xkb_keymap *keymap;
+   struct weston_output *weston_output;
int i;
pixman_box32_t box;
pixman_region32_t damage;
@@ -843,10 +853,9 @@ xf_peer_activate(freerdp_peer* client)
}
}
 
-   rfx_context_reset(peerCtx->rfx_context);
-#ifdef HAVE_NSC_RESET
-   nsc_context_reset(peerCtx->nsc_context);
-#endif
+   weston_output = &output->base;
+   RFX_RESET(peerCtx->rfx_context, weston_output->width, 
weston_output->height);
+   NSC_RESET(peerCtx->nsc_context, weston_output->width, 
weston_output->height);
 
if (peersItem->flags & RDP_PEER_ACTIVATED)
return TRUE;
-- 
1.9.1

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


Re: [PATCH 1/6] rdp: allow to compile against FreeRDP 2.0

2016-04-30 Thread Quentin Glidic

On 30/04/2016 02:29, Bryce Harrington wrote:

On Tue, Apr 26, 2016 at 11:34:03PM +0200, David Fort wrote:

FreeRDP 2.0 is about to be released, this allows to compile against this 
version.
The detection is adjusted to prefer FreeRDP 2 against version 1.x.

Signed-off-by: David Fort 


Is this just to handle when an old and a new version are installed, or
does weston fail to build entirely against the newer library?  I'm
having trouble visualizing what the failure is that this fixes.  But
technically it looks ok, at least to the limits of my mediocre
autoconfu, so:

Reviewed-by: Bryce Harrington 


---
 configure.ac |  8 +++-
 src/compositor-rdp.c | 23 ---
 2 files changed, 23 insertions(+), 8 deletions(-)

diff --git a/configure.ac b/configure.ac
index 4199616..c6c4dbb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -238,12 +238,18 @@ AM_CONDITIONAL([ENABLE_RDP_COMPOSITOR],
[test x$enable_rdp_compositor = xyes])
 if test x$enable_rdp_compositor = xyes; then
   AC_DEFINE([BUILD_RDP_COMPOSITOR], [1], [Build the RDP compositor])
-  PKG_CHECK_MODULES(RDP_COMPOSITOR, [freerdp >= 1.1.0])
+  PKG_CHECK_MODULES(FreeRDP2, [freerdp2 >= 2.0.0],
+[RDP_COMPOSITOR_CFLAGS=$FreeRDP2_CFLAGS; 
RDP_COMPOSITOR_LIBS=$FreeRDP2_LIBS;],
+[PKG_CHECK_MODULES(FreeRDP, [freerdp >= 
1.1.0],[RDP_COMPOSITOR_CFLAGS=$FreeRDP_CFLAGS; 
RDP_COMPOSITOR_LIBS=$FreeRDP_LIBS;])]
+  )

   SAVED_CPPFLAGS="$CPPFLAGS"
   CPPFLAGS="$CPPFLAGS $RDP_COMPOSITOR_CFLAGS"
   AC_CHECK_HEADERS([freerdp/version.h])
   CPPFLAGS="$SAVED_CPPFLAGS"
+
+  AC_SUBST(RDP_COMPOSITOR_CFLAGS)
+  AC_SUBST(RDP_COMPOSITOR_LIBS)
 fi


I still don’t like having a variable game here.
If you *really* don’t want to have “Checking for RDP_COMPOSITOR” twice 
(and I cannot remember anyone that was confused by something similar), 
maybe can you just PKG_CHECK_EXISTS first?


Probably just a cosmetic concern, but still, it bugs me.

--

Quentin “Sardem FF7” Glidic
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: [PATCH 1/6] rdp: allow to compile against FreeRDP 2.0

2016-04-29 Thread Bryce Harrington
On Tue, Apr 26, 2016 at 11:34:03PM +0200, David Fort wrote:
> FreeRDP 2.0 is about to be released, this allows to compile against this 
> version.
> The detection is adjusted to prefer FreeRDP 2 against version 1.x.
> 
> Signed-off-by: David Fort 

Is this just to handle when an old and a new version are installed, or
does weston fail to build entirely against the newer library?  I'm
having trouble visualizing what the failure is that this fixes.  But
technically it looks ok, at least to the limits of my mediocre
autoconfu, so:

Reviewed-by: Bryce Harrington 

> ---
>  configure.ac |  8 +++-
>  src/compositor-rdp.c | 23 ---
>  2 files changed, 23 insertions(+), 8 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 4199616..c6c4dbb 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -238,12 +238,18 @@ AM_CONDITIONAL([ENABLE_RDP_COMPOSITOR],
> [test x$enable_rdp_compositor = xyes])
>  if test x$enable_rdp_compositor = xyes; then
>AC_DEFINE([BUILD_RDP_COMPOSITOR], [1], [Build the RDP compositor])
> -  PKG_CHECK_MODULES(RDP_COMPOSITOR, [freerdp >= 1.1.0])
> +  PKG_CHECK_MODULES(FreeRDP2, [freerdp2 >= 2.0.0],
> +[RDP_COMPOSITOR_CFLAGS=$FreeRDP2_CFLAGS; 
> RDP_COMPOSITOR_LIBS=$FreeRDP2_LIBS;],
> +[PKG_CHECK_MODULES(FreeRDP, [freerdp >= 
> 1.1.0],[RDP_COMPOSITOR_CFLAGS=$FreeRDP_CFLAGS; 
> RDP_COMPOSITOR_LIBS=$FreeRDP_LIBS;])]
> +  )
>  
>SAVED_CPPFLAGS="$CPPFLAGS"
>CPPFLAGS="$CPPFLAGS $RDP_COMPOSITOR_CFLAGS"
>AC_CHECK_HEADERS([freerdp/version.h])
>CPPFLAGS="$SAVED_CPPFLAGS"
> +
> +  AC_SUBST(RDP_COMPOSITOR_CFLAGS)
> +  AC_SUBST(RDP_COMPOSITOR_LIBS)
>  fi
>  
>  AC_ARG_ENABLE([screen-sharing], [  --enable-screen-sharing],,
> diff --git a/src/compositor-rdp.c b/src/compositor-rdp.c
> index 2860556..f6778b6 100644
> --- a/src/compositor-rdp.c
> +++ b/src/compositor-rdp.c
> @@ -42,15 +42,24 @@
>  #define FREERDP_VERSION_NUMBER ((FREERDP_VERSION_MAJOR * 0x1) + \
>   (FREERDP_VERSION_MINOR * 0x100) + FREERDP_VERSION_REVISION)
>  
> +
>  #if FREERDP_VERSION_NUMBER >= 0x10201
>  #define HAVE_SKIP_COMPRESSION
>  #endif
>  
>  #if FREERDP_VERSION_NUMBER < 0x10202
> -#define FREERDP_CB_RET_TYPE void
> -#define FREERDP_CB_RETURN(V) return
> +#define FREERDP_CB_RET_TYPE void
> +#define FREERDP_CB_RETURN(V) return
> +#define NSC_RESET(C, W, H)
> +#define RFX_RESET(C, W, H) do { rfx_context_reset(C); C->width = W; 
> C->height = H; } while(0)
> +#else
> +#if FREERDP_VERSION_MAJOR >= 2
> +#define NSC_RESET(C, W, H) nsc_context_reset(C, W, H)
> +#define RFX_RESET(C, W, H) rfx_context_reset(C, W, H)
>  #else
> -#define HAVE_NSC_RESET
> +#define NSC_RESET(C, W, H) do { nsc_context_reset(C); C->width = W; 
> C->height = H; } while(0)
> +#define RFX_RESET(C, W, H) do { rfx_context_reset(C); C->width = W; 
> C->height = H; } while(0)
> +#endif
>  #define FREERDP_CB_RET_TYPE BOOL
>  #define FREERDP_CB_RETURN(V) return TRUE
>  #endif
> @@ -795,6 +804,7 @@ xf_peer_activate(freerdp_peer* client)
>   struct xkb_context *xkbContext;
>   struct xkb_rule_names xkbRuleNames;
>   struct xkb_keymap *keymap;
> + struct weston_output *weston_output;
>   int i;
>   pixman_box32_t box;
>   pixman_region32_t damage;
> @@ -843,10 +853,9 @@ xf_peer_activate(freerdp_peer* client)
>   }
>   }
>  
> - rfx_context_reset(peerCtx->rfx_context);
> -#ifdef HAVE_NSC_RESET
> - nsc_context_reset(peerCtx->nsc_context);
> -#endif
> + weston_output = &output->base;
> + RFX_RESET(peerCtx->rfx_context, weston_output->width, 
> weston_output->height);
> + NSC_RESET(peerCtx->nsc_context, weston_output->width, 
> weston_output->height);
>  
>   if (peersItem->flags & RDP_PEER_ACTIVATED)
>   return TRUE;
> -- 
> 1.9.1
> 
> ___
> wayland-devel mailing list
> wayland-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/wayland-devel
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


[PATCH 1/6] rdp: allow to compile against FreeRDP 2.0

2016-04-26 Thread David Fort
FreeRDP 2.0 is about to be released, this allows to compile against this 
version.
The detection is adjusted to prefer FreeRDP 2 against version 1.x.

Signed-off-by: David Fort 
---
 configure.ac |  8 +++-
 src/compositor-rdp.c | 23 ---
 2 files changed, 23 insertions(+), 8 deletions(-)

diff --git a/configure.ac b/configure.ac
index 4199616..c6c4dbb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -238,12 +238,18 @@ AM_CONDITIONAL([ENABLE_RDP_COMPOSITOR],
[test x$enable_rdp_compositor = xyes])
 if test x$enable_rdp_compositor = xyes; then
   AC_DEFINE([BUILD_RDP_COMPOSITOR], [1], [Build the RDP compositor])
-  PKG_CHECK_MODULES(RDP_COMPOSITOR, [freerdp >= 1.1.0])
+  PKG_CHECK_MODULES(FreeRDP2, [freerdp2 >= 2.0.0],
+[RDP_COMPOSITOR_CFLAGS=$FreeRDP2_CFLAGS; 
RDP_COMPOSITOR_LIBS=$FreeRDP2_LIBS;],
+[PKG_CHECK_MODULES(FreeRDP, [freerdp >= 
1.1.0],[RDP_COMPOSITOR_CFLAGS=$FreeRDP_CFLAGS; 
RDP_COMPOSITOR_LIBS=$FreeRDP_LIBS;])]
+  )
 
   SAVED_CPPFLAGS="$CPPFLAGS"
   CPPFLAGS="$CPPFLAGS $RDP_COMPOSITOR_CFLAGS"
   AC_CHECK_HEADERS([freerdp/version.h])
   CPPFLAGS="$SAVED_CPPFLAGS"
+
+  AC_SUBST(RDP_COMPOSITOR_CFLAGS)
+  AC_SUBST(RDP_COMPOSITOR_LIBS)
 fi
 
 AC_ARG_ENABLE([screen-sharing], [  --enable-screen-sharing],,
diff --git a/src/compositor-rdp.c b/src/compositor-rdp.c
index 2860556..f6778b6 100644
--- a/src/compositor-rdp.c
+++ b/src/compositor-rdp.c
@@ -42,15 +42,24 @@
 #define FREERDP_VERSION_NUMBER ((FREERDP_VERSION_MAJOR * 0x1) + \
(FREERDP_VERSION_MINOR * 0x100) + FREERDP_VERSION_REVISION)
 
+
 #if FREERDP_VERSION_NUMBER >= 0x10201
 #define HAVE_SKIP_COMPRESSION
 #endif
 
 #if FREERDP_VERSION_NUMBER < 0x10202
-#define FREERDP_CB_RET_TYPE void
-#define FREERDP_CB_RETURN(V) return
+#  define FREERDP_CB_RET_TYPE void
+#  define FREERDP_CB_RETURN(V) return
+#  define NSC_RESET(C, W, H)
+#  define RFX_RESET(C, W, H) do { rfx_context_reset(C); C->width = W; 
C->height = H; } while(0)
+#else
+#if FREERDP_VERSION_MAJOR >= 2
+#  define NSC_RESET(C, W, H) nsc_context_reset(C, W, H)
+#  define RFX_RESET(C, W, H) rfx_context_reset(C, W, H)
 #else
-#define HAVE_NSC_RESET
+#  define NSC_RESET(C, W, H) do { nsc_context_reset(C); C->width = W; 
C->height = H; } while(0)
+#  define RFX_RESET(C, W, H) do { rfx_context_reset(C); C->width = W; 
C->height = H; } while(0)
+#endif
 #define FREERDP_CB_RET_TYPE BOOL
 #define FREERDP_CB_RETURN(V) return TRUE
 #endif
@@ -795,6 +804,7 @@ xf_peer_activate(freerdp_peer* client)
struct xkb_context *xkbContext;
struct xkb_rule_names xkbRuleNames;
struct xkb_keymap *keymap;
+   struct weston_output *weston_output;
int i;
pixman_box32_t box;
pixman_region32_t damage;
@@ -843,10 +853,9 @@ xf_peer_activate(freerdp_peer* client)
}
}
 
-   rfx_context_reset(peerCtx->rfx_context);
-#ifdef HAVE_NSC_RESET
-   nsc_context_reset(peerCtx->nsc_context);
-#endif
+   weston_output = &output->base;
+   RFX_RESET(peerCtx->rfx_context, weston_output->width, 
weston_output->height);
+   NSC_RESET(peerCtx->nsc_context, weston_output->width, 
weston_output->height);
 
if (peersItem->flags & RDP_PEER_ACTIVATED)
return TRUE;
-- 
1.9.1

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