MCPcopy
hub / github.com/qishibo/AnotherRedisDesktopManager / getWinState

Function getWinState

pack/electron/win-state.js:75–91  ·  view source on GitHub ↗
(win)

Source from the content-addressed store, hash-verified

73 },
74
75 getWinState(win) {
76 try {
77 const winBounds = win.getBounds();
78
79 const state = {
80 x: winBounds.x,
81 y: winBounds.y,
82 width: winBounds.width,
83 height: winBounds.height,
84 maximized: win.isMaximized(),
85 };
86
87 return state;
88 } catch (err) {
89 return false;
90 }
91 },
92
93 saveStateToStorage(winState) {
94 fs.writeFile(this.getStateFile(), JSON.stringify(winState), (err) => {});

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected