fix(launcher): M6.26 播放页三键命中(push哨兵)+媒体卡片体FOCUS(点击开播放页) — 推卡

This commit is contained in:
AskaEth committed 2026-09-03 14:54:41 +08:00
1 parent 76eb2f4d1c
commit 4827cc8d92
3 files changed
+29 -7

No files matched your search

+24 -6
View File
@@ -946,7 +946,8 @@ static void ncp_draw_media_card(const meow_ui_theme_t *th)
}
}
/* 卡片命中:按钮/进度(含 seek)。返回 1=已处理(内部已下发 PLAYCTL);0=未命中。 */
/* 卡片命中:按钮/进度(含 seek)/卡片体。返回 2=卡片体命中已发 FOCUS(7)(调用方收起面板露出
* 播放页);1=按钮/进度已处理(内部已下发 PLAYCTL,面板保持开启);0=未命中。 */
static int ncp_media_card_tap(int tx, int ty)
{
const meow_media_session_t *s = meow_media_current();
@@ -972,7 +973,14 @@ static int ncp_media_card_tap(int tx, int ty)
cmd = 5;
}
}
if (!cmd) return 0;
if (!cmd) {
/* 卡片体命中(非按钮/进度):向活动媒体源下发 FOCUS(7)(=NCM_CTL_FOCUS,见 ncm
* ipc_media.c case 7 → g_req_focus_player=1 → UI 线程 push ACT_PLAYER),请求打开
* App 播放页,并消费该次点击——返回 2 让调用方收起面板露出播放页。 */
meow_media_playctl(7, 0);
logmsg("notif-card: media tap card body -> FOCUS(7) open player");
return 2;
}
int rc = meow_media_playctl(cmd, seek);
logmsg("notif-card: media tap cmd=%u seek=%lld rc=%d", cmd, (long long)seek, rc);
return 1;
@@ -1596,11 +1604,21 @@ void run_notif_center(struct app *apps, int napps, notif_click_t *click,
ncp_list_view());
hit = 1; need_paint = 1;
}
/* 阶段D附录B:顶部媒体卡片按钮/进度(含 seek)→ 下发 PLAYCTL。
/* 阶段D附录B:顶部媒体卡片按钮/进度(含 seek)→ 下发 PLAYCTL;
* 卡片体 → 下发 FOCUS(7) 请求打开 App 播放页 + 收起面板(返回 2)。
* 卡片命中固定于列表上方,先于列表行命中处理。 */
if (!hit && meow_media_has_source() && ncp_media_card_tap(tx, ty)) {
hit = 1; need_paint = 1;
} else if (!hit && ty >= ncp_list_top() && ty < NCP_LIST_BOT) {
if (!hit && meow_media_has_source()) {
int mh = ncp_media_card_tap(tx, ty);
if (mh) {
hit = 1;
if (mh == 2) { /* 卡片体 FOCUS → 收起面板露出播放页 */
if (anim_ok) anim_target = 0; else closed = 1;
break;
}
need_paint = 1; /* 按钮/进度:仅重绘卡片(面板保持开启) */
}
}
if (!hit && ty >= ncp_list_top() && ty < NCP_LIST_BOT) {
if (ncp_row_tap(tx, ty, list_scroll, click)) {
hit = 1;
if (anim_ok) anim_target = 0; /* 点击通知:dismiss + 记录启动 → 滑出收回 */
+4
View File
@@ -299,6 +299,10 @@ void run_now_playing(struct app *apps, int napps)
uint32_t last_state = 0xFFFFFFFFu;
char last_app[MEOW_APP_ID_MAX] = "";
meow_ui_activity_push(NP_SENTINEL_ACT); /* M7.0b:进入 push 哨兵(与函数尾 449 行 pop 配对)。
* 控件 owner 一直钉哨兵,命中要走 meow_widget_hit 的
* owner==active 闸门——漏 push 则 active()!=0x51,
* 三钮 meow_widget_hit 恒 false(「播放页三键无效」根因)。 */
np_draw_page(1);
meow_dirty_full();
meow_ui_flush();