[Spice-devel] [PATCH 1/2] fix harmless typo in InputsChannel::handle_modifiers
Alon Levy
alevy at redhat.com
Tue Aug 16 23:31:56 PDT 2011
On Tue, Aug 16, 2011 at 02:53:47PM +0200, Christophe Fergeau wrote:
I can't comment about the second patch except it looks great to drop
15 lines for 2, so
ACK both.
> InputsChannel::handle_modifiers converts _modifiers which is a
> bitflag of SPICE_KEYBOARD_MODIFIER_FLAGS_* to a Platform::*_MODIFIER
> bitflag, which is what Platform::set_keyboard_lock_modifiers expects.
> However, it's called with _modifiers, and the bitflag that this
> function computes is never used. Pass the computed bitflag to
> ::set_keyboard_lock_modifiers since _modifiers format is meaningless
> for ::set_keyboard_lock_modifiers.
> This bug was harmless because the two different set of modifier
> flags actually use the same values, so _modifiers and modifiers could
> be used interchangeably. However it's more future-proof to use the
> right format here.
> ---
> client/inputs_channel.cpp | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/client/inputs_channel.cpp b/client/inputs_channel.cpp
> index 4d1232a..9e940d9 100644
> --- a/client/inputs_channel.cpp
> +++ b/client/inputs_channel.cpp
> @@ -402,7 +402,7 @@ void InputsChannel::set_local_modifiers()
> modifiers |= Platform::CAPS_LOCK_MODIFIER;
> }
>
> - Platform::set_keyboard_lock_modifiers(_modifiers);
> + Platform::set_keyboard_lock_modifiers(modifiers);
> }
>
> void InputsChannel::on_focus_in()
> --
> 1.7.6
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
More information about the Spice-devel
mailing list