tarkah / grout

Simple tiling window manager for Windows
MIT License
205 stars 8 forks source link

Can't resize maximized applications #29

Closed DiXN closed 4 years ago

DiXN commented 4 years ago

Some maximized applications can't be resized.

I could observe this problem mainly with Electron-based applications: VS Code, GitKraken, Postman etc. Other notable applications, that exhibit the same problem are Opera and Spotify. "Native" applications work fine, when maximized. For example Windows Explorer, Task Manager, Photos app.

All of the mentioned applications work as intended, if they are not maximized.

tarkah commented 4 years ago

Thanks for the bug report! I just tried this with vscode maximized and faced the same problem.

I'm thinking I need to use this function with SW_RESTORE before I resize the window, to get it out of it's maximized state.

https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-showwindow

DiXN commented 4 years ago

Good idea!

Using ShowWindow with SW_RESTORE seems to work great.

tarkah commented 4 years ago

Glad to see it was that easy of a fix! I'll test tomorrow morning and merge. Thanks for the PR!