Commit 8ecc5fc2 authored by Luke Schoen's avatar Luke Schoen
Browse files

fix: Always moveWindowUp on showWindow. Never use frame. showTrayBalloon only on initial load

parent 61560230
Pipeline #31491 passed with stage
in 1 minute and 46 seconds
......@@ -30,10 +30,7 @@ function loadTray (fetherApp) {
tray.on('double-click', () => onTrayClick(fetherApp));
// Right click event handler does not work on Windows as intended
tray.on('right-click', () => {
if (process.platform === 'win32') {
pino.info('Detected right click on Windows');
showTrayBalloon(fetherApp);
}
pino.info('Detected right click on Windows');
});
tray.setToolTip(options.tooltip);
tray.setHighlightMode('never');
......
......@@ -8,12 +8,7 @@ import Pino from '../utils/pino';
const pino = Pino();
function setupWin32Listeners (fetherApp) {
const {
onWindowClose,
processSaveWinPosition,
showTrayBalloon,
win
} = fetherApp;
const { onWindowClose, processSaveWinPosition, win } = fetherApp;
if (process.platform === 'win32') {
/**
......@@ -51,7 +46,6 @@ function setupWin32Listeners (fetherApp) {
} else if (wParam.readUInt32LE(0) === 0xf030) {
// SC_MAXIMIZE
eventName = 'maximize';
showTrayBalloon(fetherApp);
} else if (wParam.readUInt32LE(0) === 0xf020) {
// SC_MINIMIZE
eventName = 'minimize';
......@@ -59,7 +53,6 @@ function setupWin32Listeners (fetherApp) {
} else if (wParam.readUInt32LE(0) === 0xf120) {
// SC_RESTORE
eventName = 'restored';
showTrayBalloon(fetherApp);
}
if (eventName !== null) {
......
......@@ -17,7 +17,6 @@ function showWindow (fetherApp, trayPos) {
createWindow,
fixWinPosition,
moveWindowUp,
options,
processSaveWinPosition,
setupWinListeners,
setupWin32Listeners,
......@@ -87,14 +86,10 @@ function showWindow (fetherApp, trayPos) {
fetherApp.hasSetupWinListeners = true;
}
// Only use `moveWindowUp` when Fether window is 'frameless'
// otherwise it shrinks each time it is dragged to the screen bottom
if (!options.frame) {
moveWindowUp(fetherApp);
setTimeout(() => {
moveWindowUp(fetherApp);
setTimeout(() => {
moveWindowUp(fetherApp);
}, 5000);
}
}, 5000);
processSaveWinPosition(fetherApp);
......
......@@ -40,8 +40,6 @@ if (process.platform === 'win32') {
);
}
const shouldUseFrame = process.platform === 'win32';
const windowPosition =
process.platform === 'win32' ? 'trayBottomCenter' : 'trayCenter';
......@@ -69,7 +67,7 @@ const DEFAULT_OPTIONS = {
};
const TASKBAR_OPTIONS = {
frame: shouldUseFrame,
frame: false, // Do not use frame. It causes window height to shrink upon show/hide
height: 464,
// On Linux the user must click the tray icon and then click the tooltip
// to toggle the Fether window open/close
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment