···2121 key: address,
2222 height,
2323 width,
2424- // Using modal parameter so it hides on escape/blur
2525- //modal: true,
26242725 // Keep resident in the background
2826 keepLive: true,
···5351 detachedDevTools: true,
5452 };
55535656- // Use the modal window API to open the window
5757- windows.createWindow(address, params)
5454+ windows.openModalWindow(address, params)
5855 .then(result => {
5956 console.log('Command window opened:', result);
6057 })
+1-3
app/groups/index.js
···1919 const params = {
2020 key: address,
2121 height,
2222- width,
2323- // Not using modal so window stays open when clicking elsewhere
2424- modal: false
2222+ width
2523 };
26242725 // Use the window creation API
+1-3
app/index.js
···4040 key: settingsAddress,
4141 transparent: true,
4242 height,
4343- width,
4444- // Settings window should stay open when clicking elsewhere, so not modal
4545- modal: false
4343+ width
4644 };
47454846 console.log('Opening settings window with params:', params);
+1-5
app/peeks/index.js
···2626 persistState: item.persistState || false,
27272828 // Create a unique key for this peek using its address
2929- key: `peek:${item.address}`,
3030-3131- // Use modal behavior (closes on escape/blur)
3232- modal: true
2929+ key: `peek:${item.address}`
3330 };
34313535- // Use the modal window API for peeks
3632 windows.openModalWindow(item.address, params)
3733 .then(result => {
3834 console.log('Peek window opened:', result);
+1-3
app/scripts/index.js
···2727 script: str,
2828 domEvent: 'dom-ready',
2929 closeOnCompletion: true,
3030- },
3131- // Make script windows hidden and auto-close
3232- modal: false
3030+ }
3331 };
34323533 // For script windows, we use createWindow for more control
+1-4
app/slides/index.js
···133133 keepLive: item.keepLive || false,
134134 persistState: item.persistState || false,
135135136136- // Add modal parameter - this will make the window hide when unfocused or when escape is pressed
137137- modal: true,
138138-139136 x,
140137 y,
141138 };
142139143140 // Open the window
144144- api.window.open(item.address, params).then(result => {
141141+ windows.openModalWindow(item.address, params).then(result => {
145142 if (result.success) {
146143 console.log('Successfully opened slide with ID:', result.id);
147144 // Store the window ID for future reference
+4-1
app/windows.js
···1616 * @returns {Promise<Object>} - Promise resolving to the window API result
1717 */
1818const openModalWindow = (address, params = {}) => {
1919- // Set modal flag to true
1919+ // Modal closes on escape/blur but app keeps focus (see below)
2020 params.modal = true;
21212222+ // Panel returns focus to previously active app
2323+ params.type = 'panel';
2424+2225 //console.log('Opening modal window with params:', params);
23262427 // Always use the IPC API