mirror of https://github.com/mpv-player/mpv
osx: move code to unset input context to the right place
Setting the input context is always called, both in cplayer and libmpv,
and under HAVE_COCOA. Unsetting the input context was done only the
cplayer uninit call. Also it was under HAVE_COCOA_APPLICATION, so it was
not unset in libmpv (dangling pointer).
(cherry picked from commit c59a4f12db
)
This commit is contained in:
parent
94123474a4
commit
4387919753
|
@ -164,6 +164,10 @@ void mp_destroy(struct MPContext *mpctx)
|
||||||
|
|
||||||
osd_free(mpctx->osd);
|
osd_free(mpctx->osd);
|
||||||
|
|
||||||
|
#if HAVE_COCOA
|
||||||
|
cocoa_set_input_context(NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (cas_terminal_owner(mpctx, mpctx)) {
|
if (cas_terminal_owner(mpctx, mpctx)) {
|
||||||
terminal_uninit();
|
terminal_uninit();
|
||||||
cas_terminal_owner(mpctx, NULL);
|
cas_terminal_owner(mpctx, NULL);
|
||||||
|
@ -183,10 +187,6 @@ void mp_destroy(struct MPContext *mpctx)
|
||||||
|
|
||||||
static int prepare_exit_cplayer(struct MPContext *mpctx, enum exit_reason how)
|
static int prepare_exit_cplayer(struct MPContext *mpctx, enum exit_reason how)
|
||||||
{
|
{
|
||||||
#if HAVE_COCOA_APPLICATION
|
|
||||||
cocoa_set_input_context(NULL);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
const char *reason = NULL;
|
const char *reason = NULL;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue