fix: handle system gestures for ToolHub panels

This commit is contained in:
7015725
2026-05-12 10:24:30 +08:00
parent 5c95d04fab
commit 7b7fbdf9cf
8 changed files with 124 additions and 140 deletions

View File

@@ -437,11 +437,15 @@ FloatBallAppWM.prototype.addPanel = function(panel, x, y, which) {
lp.x = x;
lp.y = y;
try { if (this.attachPanelSystemKeyHandler) this.attachPanelSystemKeyHandler(panel, which); } catch (eKeyAttach) { safeLog(this.L, 'e', "attach panel key fail which=" + String(which) + " err=" + String(eKeyAttach)); }
try { this.state.wm.addView(panel, lp); } catch (eAdd) { safeLog(this.L, 'e', "addPanel fail which=" + String(which) + " err=" + String(eAdd)); return; }
if (which === "main") { this.state.panel = panel; this.state.panelLp = lp; this.state.addedPanel = true; }
else if (which === "settings") { this.state.settingsPanel = panel; this.state.settingsPanelLp = lp; this.state.addedSettings = true; }
else { this.state.viewerPanel = panel; this.state.viewerPanelLp = lp; this.state.addedViewer = true; }
else { this.state.viewerPanel = panel; this.state.viewerPanelLp = lp; this.state.viewerPanelType = which; this.state.addedViewer = true; }
try { panel.requestFocus(); } catch (eReqFocus) {}
try {
if (this.config.ENABLE_ANIMATIONS) {