implemented input_server notification of IM aware focus changes, not tested
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16690 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -22,8 +22,10 @@
|
|||||||
#include <String.h>
|
#include <String.h>
|
||||||
#include <Window.h>
|
#include <Window.h>
|
||||||
|
|
||||||
|
#include <input_globals.h>
|
||||||
#include <AppMisc.h>
|
#include <AppMisc.h>
|
||||||
#include <ApplicationPrivate.h>
|
#include <ApplicationPrivate.h>
|
||||||
|
#include <InputServerTypes.h>
|
||||||
#include <MessagePrivate.h>
|
#include <MessagePrivate.h>
|
||||||
#include <PortLink.h>
|
#include <PortLink.h>
|
||||||
#include <ServerProtocol.h>
|
#include <ServerProtocol.h>
|
||||||
@@ -2576,13 +2578,24 @@ BWindow::_SetFocus(BView *focusView, bool notifyInputServer)
|
|||||||
if (focusView)
|
if (focusView)
|
||||||
focusView->MakeFocus(true);
|
focusView->MakeFocus(true);
|
||||||
|
|
||||||
// TODO: Notify the input server if we are passing focus
|
// we notify the input server if we are passing focus
|
||||||
// from a view which has the B_INPUT_METHOD_AWARE to a one
|
// from a view which has the B_INPUT_METHOD_AWARE to a one
|
||||||
// which does not, or vice-versa
|
// which does not, or vice-versa
|
||||||
if (notifyInputServer) {
|
if (notifyInputServer) {
|
||||||
// TODO: Send a message to input server using
|
bool oldIMAware = false, newIMAware = false;
|
||||||
// control_input_server()
|
if (focusView)
|
||||||
|
newIMAware = focusView->Flags() & B_INPUT_METHOD_AWARE;
|
||||||
|
if (fFocus)
|
||||||
|
oldIMAware = fFocus->Flags() & B_INPUT_METHOD_AWARE;
|
||||||
|
if (newIMAware ^ oldIMAware) {
|
||||||
|
BMessage msg(newIMAware ? IS_FOCUS_IM_AWARE_VIEW : IS_UNFOCUS_IM_AWARE_VIEW);
|
||||||
|
BMessage reply;
|
||||||
|
_control_input_server_(&msg, &reply);
|
||||||
|
// do we care return code ?
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fFocus = focusView;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user