chat panel cancel now closes the ime window if any

This commit is contained in:
Asad M. Zaman 2004-04-23 23:43:46 +00:00
parent 1fd8558e4d
commit d90a4405bb
5 changed files with 41 additions and 1 deletions

View File

@ -299,6 +299,17 @@ move_pointer(int, int, int) {
return false;
}
////////////////////////////////////////////////////////////////////
// Function: GraphicsWindow::close_ime
// Access: Published, Virtual
// Description: Forces the ime window to close if any
//
////////////////////////////////////////////////////////////////////
void GraphicsWindow::
close_ime() {
return;
}
////////////////////////////////////////////////////////////////////
// Function: GraphicsWindow::has_button_event
// Access: Public

View File

@ -65,6 +65,7 @@ PUBLISHED:
MouseData get_pointer(int device) const;
virtual bool move_pointer(int device, int x, int y);
virtual void close_ime();
public:
// No need to publish these.

View File

@ -471,7 +471,8 @@ candidate(const MouseWatcherParameter &param, bool background) {
_candidate_highlight_end = param.get_highlight_end();
_candidate_cursor_pos = param.get_cursor_pos();
_text_geom_stale = true;
type(param);
if (!_candidate_wtext.empty())
type(param);
}
}
PGItem::candidate(param, background);

View File

@ -112,6 +112,31 @@ move_pointer(int device, int x, int y) {
return true;
}
////////////////////////////////////////////////////////////////////
// Function: WinGraphicsWindow::close_ime
// Access: Published, Virtual
// Description: Forces the ime window to close, if any
//
////////////////////////////////////////////////////////////////////
void WinGraphicsWindow::
close_ime() {
// Check if the ime window is open
if (!_ime_open)
return;
HIMC hIMC = ImmGetContext(_hWnd);
if (hIMC != 0) {
if (!ImmSetOpenStatus(hIMC, false)) {
windisplay_cat.debug() << "ImmSetOpenStatus failed\n";
}
ImmReleaseContext(_hWnd, hIMC);
}
_ime_open = false;
_ime_active = false;
windisplay_cat.debug() << "success: closed ime window\n";
return;
}
////////////////////////////////////////////////////////////////////
// Function: WinGraphicsWindow::begin_flip
// Access: Public, Virtual

View File

@ -47,6 +47,8 @@ public:
virtual bool move_pointer(int device, int x, int y);
virtual void close_ime();
virtual void begin_flip();
virtual void process_events();