Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Window's Snap Assist does not find my electron application

I am trying to figure out how to get Windows to Snap Assist my electron window (display thumbnails of open windows after snapping another window to one side).

For some reason, when I snap another program to half the screen, when it gives the option to select an app for the other half of the screen, my app is not available in the options.

Is there a feature or BrowserWindow configuration that needs to be turned on/set for this to work?

EDIT: I wanted to note that I know this can work, as it works in other apps like Slack and Discord.

EDIT: Adding the settings for my main browser window:

mainWindow = new BrowserWindow({
    title: app.getName(),
    width: wndSettings.size.width,
    height: wndSettings.size.height,
    resizable: wndSettings.resizable,
    frame: false,
    icon: windowIcon,
    alwaysOnTop: false,
    show: false,
    autoHideMenuBar: true
});

mainWindow.on('ready-to-show', function () {
    mainWindow.show();
});

Resizable is initially set to false during a login screen, but becomes true once logged in.

like image 594
codephobia Avatar asked Jan 09 '17 21:01

codephobia


People also ask

Why is snap assist not working?

Snap Layouts has to be enabled from Settings. It is also possible that due to a recent update or some bug, the feature has been disabled on your Windows 11 computer. Press Windows key+I to open Settings and go to System > Multitasking and enable the toggle for Snap windows.

Does windows 10 have snap assist?

Snap Assist appears after you've snapped a window but have a lot of available space on your screen. Any other open windows are displayed in that space as thumbnails. To use Snap Assist, click the thumbnail of the window you want to open in the empty space on your screen.


1 Answers

I know that this thread is fairly old. Although, had the same issue just recently. For me removing transparent : true when creating the BrowserWindow object fixed it.

like image 94
dben Avatar answered Sep 23 '22 19:09

dben