Skip to content

Commit 187beaf

Browse files
committed
fixed weird bug for undetectability from nuke guy
1 parent 828cbb0 commit 187beaf

4 files changed

Lines changed: 11 additions & 26 deletions

File tree

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22

33
An invisible desktop application that will help you pass your technical interviews.
44

5-
65
https://github.com/user-attachments/assets/0615b110-2670-4b0e-bc69-3c32a2d8a996
76

8-
97
## Invisibility Compatibility
108

119
The application is invisible to:

electron/main.ts

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -375,12 +375,13 @@ function hideMainWindow(): void {
375375
state.windowPosition = { x: bounds.x, y: bounds.y }
376376
state.windowSize = { width: bounds.width, height: bounds.height }
377377
state.mainWindow.setIgnoreMouseEvents(true, { forward: true })
378-
state.mainWindow.setFocusable(false)
378+
state.mainWindow.setAlwaysOnTop(true, "floating", 1)
379+
state.mainWindow.setVisibleOnAllWorkspaces(true, {
380+
visibleOnFullScreen: true
381+
})
379382
state.mainWindow.setOpacity(0)
380383
state.mainWindow.hide()
381384
state.isWindowVisible = false
382-
// Ensure we don't steal focus when hiding
383-
app.hide()
384385
}
385386
}
386387

@@ -393,15 +394,15 @@ function showMainWindow(): void {
393394
})
394395
}
395396
state.mainWindow.setIgnoreMouseEvents(false)
396-
state.mainWindow.setFocusable(true)
397+
state.mainWindow.setAlwaysOnTop(true, "floating", 1)
398+
state.mainWindow.setVisibleOnAllWorkspaces(true, {
399+
visibleOnFullScreen: true
400+
})
401+
state.mainWindow.setContentProtection(true)
397402
state.mainWindow.setOpacity(0)
398-
state.mainWindow.show()
399-
state.mainWindow.setOpacity(1)
400-
// Use showInactive to prevent stealing focus
401403
state.mainWindow.showInactive()
404+
state.mainWindow.setOpacity(1)
402405
state.isWindowVisible = true
403-
// Ensure we don't activate the app
404-
app.hide()
405406
}
406407
}
407408

electron/shortcuts.ts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -77,20 +77,6 @@ export class ShortcutsHelper {
7777

7878
globalShortcut.register("CommandOrControl+B", () => {
7979
this.deps.toggleMainWindow()
80-
// If window exists and we're showing it, bring it to front
81-
const mainWindow = this.deps.getMainWindow()
82-
if (mainWindow && !this.deps.isVisible()) {
83-
// Force the window to the front on macOS
84-
if (process.platform === "darwin") {
85-
mainWindow.setAlwaysOnTop(true, "normal")
86-
// Reset alwaysOnTop after a brief delay
87-
setTimeout(() => {
88-
if (mainWindow && !mainWindow.isDestroyed()) {
89-
mainWindow.setAlwaysOnTop(true, "floating")
90-
}
91-
}, 100)
92-
}
93-
}
9480
})
9581

9682
// Unregister shortcuts when quitting

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "interview-coder-v1",
3-
"version": "1.0.9",
3+
"version": "1.0.10",
44
"main": "dist-electron/main.js",
55
"scripts": {
66
"clean": "rimraf dist dist-electron",

0 commit comments

Comments
 (0)