дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-08 19:02:17 +02:00
fix(window): keep merged project tabs from moving the frame or menu bar (#1697)
Merged project tabs are separate native windows. Switching tabs copied the selected frame with Tauri's position and size setters, which only queue the change, while macOS orders the shown window front at once, so the old rectangle appeared and then slid into place; two maximized windows could also share the maximized flag with different rectangles, so the copy was skipped. On macOS the AppKit frame is now written synchronously and the window is shown in the same turn, with frame constraining suspended for that write; elsewhere a differing outer rectangle is always assigned. A source window in native fullscreen still hands fullscreen over as before. Focusing another project window re-pushed the shared menu config and replaced the macOS menu bar even when nothing changed; an identical config no longer rebuilds the menu. Co-authored-by: youngledo <[email protected]>
Цей коміт міститься в:
1 джерело
a268b2c488
коміт
fca9d1e08f
6 files changed
+321
-63
No files matched your search
@@ -897,7 +897,11 @@ export const commands = {
|
||||
appQuit: () => __TAURI_INVOKE<void>("app_quit"),
|
||||
/** A window vetoed the quit (user cancelled its unsaved-changes prompt). */
|
||||
appCancelQuit: () => __TAURI_INVOKE<void>("app_cancel_quit"),
|
||||
/** Sets the menu's labels / shortcut text (on locale or keymap change) and rebuilds it. */
|
||||
/**
|
||||
* Sets the menu's labels / shortcut text and rebuilds it when they changed.
|
||||
* Focusing another project window re-pushes the same shared menu; an identical
|
||||
* config must not call `set_menu`, which redraws the macOS menu bar.
|
||||
*/
|
||||
menuConfigure: (config: MenuConfig) => __TAURI_INVOKE<void>("menu_configure", { config }),
|
||||
/** Rebuilds the menu (e.g. after the recent-projects list changed). */
|
||||
menuRefresh: () => __TAURI_INVOKE<void>("menu_refresh"),
|
||||
|
||||
@@ -147,7 +147,8 @@ export function installMenuBridge(): () => void {
|
||||
push();
|
||||
pushEnablement(true);
|
||||
};
|
||||
// The native menu bar is shared: a focused window re-pushes its own window-scoped labels.
|
||||
// The menu bar is shared. A focused window re-pushes labels that can differ per window.
|
||||
// An identical config does not replace the menu, so switching project tabs does not redraw it.
|
||||
window.addEventListener("focus", onFocus);
|
||||
const unsubs = [
|
||||
useI18n.subscribe((s, prev) => {
|
||||
|
||||
Reference in new issue
Заблокувати користувача