Fixed lack of reaction for keyboard events after showing stage on osx.

Trick with hiding view while showing the stage affects on responder
chain. The main view ceases to be first responder and we should
manually set first responder.
This commit is contained in:
Roman Kudiyarov 2010-07-23 11:25:40 +07:00 committed by Robert Bragg
parent e4c4ef6792
commit 49b2b62311

View File

@ -333,7 +333,7 @@ clutter_stage_osx_show (ClutterStageWindow *stage_window,
clutter_actor_map (CLUTTER_ACTOR (self->wrapper));
clutter_stage_osx_set_frame (self);
/* draw view should be avoided and it is the reason why
/* Draw view should be avoided and it is the reason why
we should hide OpenGL view while we showing the stage.
*/
BOOL isViewHidden = [self->view isHidden];
@ -343,8 +343,10 @@ clutter_stage_osx_show (ClutterStageWindow *stage_window,
}
[self->window makeKeyAndOrderFront: nil];
[self->view setHidden:isViewHidden];
[self->window makeKeyAndOrderFront: nil];
/*
* After hiding we cease to be first responder.
*/
[self->window makeFirstResponder: self->view];
CLUTTER_OSX_POOL_RELEASE();
}