Author: korli Date: 2011-08-03 22:48:23 +0200 (Wed, 03 Aug 2011) New Revision: 42557 Changeset: https://dev.haiku-os.org/changeset/42557 Ticket: https://dev.haiku-os.org/ticket/7408 Modified: haiku/trunk/src/kits/interface/Window.cpp Log: Patch from X512 (#7408): only send input method aware messages for active windows Modified: haiku/trunk/src/kits/interface/Window.cpp =================================================================== --- haiku/trunk/src/kits/interface/Window.cpp 2011-08-03 20:46:26 UTC (rev 42556) +++ haiku/trunk/src/kits/interface/Window.cpp 2011-08-03 20:48:23 UTC (rev 42557) @@ -1082,11 +1082,13 @@ // we notify the input server if we are gaining or losing focus // from a view which has the B_INPUT_METHOD_AWARE on a window - // (de)activation + // activation + if (!active) + break; bool inputMethodAware = false; if (fFocus) inputMethodAware = fFocus->Flags() & B_INPUT_METHOD_AWARE; - BMessage msg(active && inputMethodAware ? IS_FOCUS_IM_AWARE_VIEW : IS_UNFOCUS_IM_AWARE_VIEW); + BMessage msg(inputMethodAware ? IS_FOCUS_IM_AWARE_VIEW : IS_UNFOCUS_IM_AWARE_VIEW); BMessenger messenger(fFocus); BMessage reply; if (fFocus)