Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
parity
fether
Commits
8ecc5fc2
Commit
8ecc5fc2
authored
Feb 23, 2019
by
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
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
packages/fether-electron/src/main/app/methods/loadTray.js
View file @
8ecc5fc2
...
...
@@ -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
'
);
...
...
packages/fether-electron/src/main/app/methods/setupWin32Listeners.js
View file @
8ecc5fc2
...
...
@@ -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
)
{
...
...
packages/fether-electron/src/main/app/methods/showWindow.js
View file @
8ecc5fc2
...
...
@@ -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
);
...
...
packages/fether-electron/src/main/app/options/config/index.js
View file @
8ecc5fc2
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment