[MM-59252] Fix resizing app when welcome screen is open on macOS, force button to always appear on welcome screen (#3112)
This commit is contained in:
parent
e68d97e578
commit
b2cd2dc60d
|
@ -93,6 +93,7 @@ import {
|
|||
OPEN_WINDOWS_CAMERA_PREFERENCES,
|
||||
OPEN_WINDOWS_MICROPHONE_PREFERENCES,
|
||||
GET_MEDIA_ACCESS_STATUS,
|
||||
VIEW_FINISHED_RESIZING,
|
||||
} from 'common/communication';
|
||||
|
||||
console.log('Preload initialized');
|
||||
|
@ -178,6 +179,7 @@ contextBridge.exposeInMainWorld('desktop', {
|
|||
openWindowsCameraPreferences: () => ipcRenderer.send(OPEN_WINDOWS_CAMERA_PREFERENCES),
|
||||
openWindowsMicrophonePreferences: () => ipcRenderer.send(OPEN_WINDOWS_MICROPHONE_PREFERENCES),
|
||||
getMediaAccessStatus: (mediaType) => ipcRenderer.invoke(GET_MEDIA_ACCESS_STATUS, mediaType),
|
||||
viewFinishedResizing: () => ipcRenderer.send(VIEW_FINISHED_RESIZING),
|
||||
|
||||
downloadsDropdown: {
|
||||
toggleDownloadsDropdownMenu: (payload) => ipcRenderer.send(TOGGLE_DOWNLOADS_DROPDOWN_MENU, payload),
|
||||
|
|
|
@ -36,6 +36,12 @@ function WelcomeScreen({
|
|||
|
||||
useEffect(() => {
|
||||
setShowContent(true);
|
||||
|
||||
// Let the main process know when the window has finished resizing
|
||||
// This is to reduce the amount of white box that happens when expand the BrowserView
|
||||
window.addEventListener('resize', () => {
|
||||
window.desktop.viewFinishedResizing();
|
||||
});
|
||||
}, []);
|
||||
|
||||
const slides = useMemo(() => [
|
||||
|
|
|
@ -9,7 +9,7 @@ body {
|
|||
--stipple-opacity: 0.08;
|
||||
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
|
|
|
@ -97,6 +97,7 @@ declare global {
|
|||
openWindowsCameraPreferences: () => void;
|
||||
openWindowsMicrophonePreferences: () => void;
|
||||
getMediaAccessStatus: (mediaType: 'microphone' | 'camera' | 'screen') => Promise<'not-determined' | 'granted' | 'denied' | 'restricted' | 'unknown'>;
|
||||
viewFinishedResizing: () => void;
|
||||
|
||||
modals: {
|
||||
cancelModal: <T>(data?: T) => void;
|
||||
|
|
Loading…
Reference in a new issue