#if __MonoCS__
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using IBusDotNet;
using NDesk.DBus;

namespace Palaso.UI.WindowsForms.Keyboarding.Linux
{
	/// <summary>
	/// a global cache used only to reduce traffic with ibus via dbus.
	/// </summary>
	internal static class GlobalCachedInputContext
	{
		/// <summary>
		/// Caches the current InputContext.
		/// </summary>
		public static InputContext InputContext { get; set; }
		/// <summary>
		/// Cache the keyboard of the InputContext.
		/// </summary>
		public static IBusKeyboardDescription Keyboard { get; set; }

		/// <summary>
		/// Clear the cached InputContext details.
		/// </summary>
		public static void Clear()
		{
			Keyboard = null;
			InputContext = null;
		}
	}
}
#endif
#if __MonoCS__
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using IBusDotNet;
using NDesk.DBus;

namespace Palaso.UI.WindowsForms.Keyboarding.Linux
{
	/// <summary>
	/// a global cache used only to reduce traffic with ibus via dbus.
	/// </summary>
	internal static class GlobalCachedInputContext
	{
		/// <summary>
		/// Caches the current InputContext.
		/// </summary>
		public static InputContext InputContext { get; set; }
		/// <summary>
		/// Cache the keyboard of the InputContext.
		/// </summary>
		public static IBusKeyboardDescription Keyboard { get; set; }

		/// <summary>
		/// Clear the cached InputContext details.
		/// </summary>
		public static void Clear()
		{
			InputContext = null;
		}
	}
}
#endif
Fix bug when deactivating ibus keyboards Setting the Keyboard to null in GlobalInputContext.Clear prevented the IbusKeyboardAdaptor.SetIMEKeyboard method from disabling the keyboard.
Fix bug when deactivating ibus keyboards
Setting the Keyboard to null in GlobalInputContext.Clear prevented
the IbusKeyboardAdaptor.SetIMEKeyboard method from disabling the
keyboard.

Change-Id: I738e73741852d368a028d6d7c5abd759cad8e32d
---
 PalasoUIWindowsForms/Keyboarding/Linux/GlobalCachedInputContext.cs | 1 -
 1 file changed, 1 deletion(-)
