[1/3] weston: improve selection of compositor
diff mbox

Message ID 1381525213-14034-1-git-send-email-arnout@mind.be
State Changes Requested
Delegated to: Yann E. MORIN
Headers show

Commit Message

Arnout Vandecappelle Oct. 11, 2013, 9 p.m. UTC
The way the compositor was selected in Config.in was counter-intuitive,
because the fbdev backend is selected by default even if a different one
is available.

Instead, select the fbdev backend only if no other one was selected by
the user.

Also re-ordered the compositor options, putting fbdev last. This is more
natural when the user wants to select both backends: after selecting the
RPi backend, the fbdev is automatically unselected but the user can move
one line down to select it again.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
 package/weston/Config.in | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

Comments

Yann E. MORIN Oct. 11, 2013, 9:23 p.m. UTC | #1
Arnout, All,

On 2013-10-11 23:00 +0200, Arnout Vandecappelle (Essensium/Mind) spake thusly:
> The way the compositor was selected in Config.in was counter-intuitive,
> because the fbdev backend is selected by default even if a different one
> is available.
> 
> Instead, select the fbdev backend only if no other one was selected by
> the user.

Well, that was explictly what I wanted we I did the patch:
  - always have at least one compositor
  - have fbdev enabled by default, even if another one is selected.

But I agree this can be counter-intuitive to some, so I won't bar this
change.

> Also re-ordered the compositor options, putting fbdev last. This is more
> natural when the user wants to select both backends: after selecting the
> RPi backend, the fbdev is automatically unselected but the user can move
> one line down to select it again.

We usually put menu entries in alphabetical order. I understand what
you're trying to achieve here, but I'd prefer we be consistent in the
menu ordering.

> 
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> ---
>  package/weston/Config.in | 15 ++++++---------
>  1 file changed, 6 insertions(+), 9 deletions(-)
> 
> diff --git a/package/weston/Config.in b/package/weston/Config.in
> index 4532c28..fd48fb3 100644
> --- a/package/weston/Config.in
> +++ b/package/weston/Config.in
> @@ -14,6 +14,8 @@ config BR2_PACKAGE_WESTON
>  	depends on BR2_TOOLCHAIN_HAS_THREADS # wayland
>  	# Runtime dependency
>  	select BR2_PACKAGE_XKEYBOARD_CONFIG
> +	# Make sure at least one compositor is selected.
> +	select BR2_PACKAGE_WESTON_FBDEV if !BR2_PACKAGE_WESTON_HAS_COMPOSITOR

Indeed, BR2_PACKAGE_WESTON_NEEDS_ONE_COMPOSITOR is not needed, since we
can re-use BR2_PACKAGE_WESTON for the same purpose.

Except for the re-ordering, no problem for me.

Regards,
Yann E. MORIN.
Yann E. MORIN Oct. 11, 2013, 10:39 p.m. UTC | #2
Arnout, All,

I have more wayland/weston changes locally that I'll push over the
course of the WE.

So I'll take patches 1 (without the reordering) and 2 (with the quote
fix) in my branch.

Depending on further discussion on those three patches, I'll grab
whatever we end up settling on.

Thanks you!

Regards,
Yann E. MORIN.
Arnout Vandecappelle Oct. 12, 2013, 10:58 a.m. UTC | #3
On 12/10/13 00:39, Yann E. MORIN wrote:
> Arnout, All,
>
> I have more wayland/weston changes locally that I'll push over the
> course of the WE.
>
> So I'll take patches 1 (without the reordering) and 2 (with the quote
> fix) in my branch.

  OK thanks.

  Regards,
  Arnout

>
> Depending on further discussion on those three patches, I'll grab
> whatever we end up settling on.
>
> Thanks you!
>
> Regards,
> Yann E. MORIN.
>

Patch
diff mbox

diff --git a/package/weston/Config.in b/package/weston/Config.in
index 4532c28..fd48fb3 100644
--- a/package/weston/Config.in
+++ b/package/weston/Config.in
@@ -14,6 +14,8 @@  config BR2_PACKAGE_WESTON
 	depends on BR2_TOOLCHAIN_HAS_THREADS # wayland
 	# Runtime dependency
 	select BR2_PACKAGE_XKEYBOARD_CONFIG
+	# Make sure at least one compositor is selected.
+	select BR2_PACKAGE_WESTON_FBDEV if !BR2_PACKAGE_WESTON_HAS_COMPOSITOR
 	help
 	  Weston is the reference implementation of a Wayland
 	  compositor, and a useful compositor in its own right.
@@ -24,17 +26,9 @@  config BR2_PACKAGE_WESTON
 
 if BR2_PACKAGE_WESTON
 
-# These two options make sure at least one compositor is selected.
+# Helper to make sure at least one compositor is selected.
 config BR2_PACKAGE_WESTON_HAS_COMPOSITOR
 	bool
-config BR2_PACKAGE_WESTON_NEEDS_ONE_COMPOSITOR
-	def_bool y
-	depends on ! BR2_PACKAGE_WESTON_HAS_COMPOSITOR
-	select BR2_PACKAGE_WESTON_FBDEV
-
-config BR2_PACKAGE_WESTON_FBDEV
-	bool "fbdev compositor"
-	default y
 
 config BR2_PACKAGE_WESTON_RPI
 	bool "RPi compositor"
@@ -45,4 +39,7 @@  config BR2_PACKAGE_WESTON_RPI
 	select BR2_PACKAGE_RPI_USERLAND
 	select BR2_PACKAGE_WESTON_HAS_COMPOSITOR
 
+config BR2_PACKAGE_WESTON_FBDEV
+	bool "fbdev compositor"
+
 endif