To fully solve the problem we first additionally need to:
1. Use the same shortcut for unmaximize_or_minimize_window_key and put_restore_key
2. In the bool GridScreen::restoreWindow (...) method we would need something like this:
/* if the same shortcut is set and grid is running */
If (unmaximize_or_minimize_window_key==put_restore_key)
{
/* We want to use the same functionality like the unmaximize_or_minimize_window
* shortcut normally provides, so if our window has not been touched by grid, we
* will do the same with that window that core would normally do
* (see src/actions.cpp, unmaximizeOrMinimizeWin)
* Core will take over again, if grid gets disabled
*/
if (cw && !gw->isGridResized && !gw->isGridHorzMaximized && !gw->isGridVertMaximized)
{
if (cw->state () & MAXIMIZE_STATE)
cw->maximize (0);
else if (cw->actions () & CompWindowActionMinimizeMask)
cw->minimize ();
}
}
I will propose the fix, once the other branch is merged to not confuse the reviewers even more...
(got it working and running here locally already :))
To fully solve the problem we first additionally need to:
1. Use the same shortcut for unmaximize_ or_minimize_ window_ key and put_restore_key
2. In the bool GridScreen: :restoreWindow (...) method we would need something like this:
/* if the same shortcut is set and grid is running */ or_minimize_ window_ key==put_ restore_ key) or_minimize_ window imizeWin) Maximized && !gw->isGridVert Maximized)
If (unmaximize_
{
/* We want to use the same functionality like the unmaximize_
* shortcut normally provides, so if our window has not been touched by grid, we
* will do the same with that window that core would normally do
* (see src/actions.cpp, unmaximizeOrMin
* Core will take over again, if grid gets disabled
*/
if (cw && !gw->isGridResized && !gw->isGridHorz
{
if (cw->state () & MAXIMIZE_STATE)
cw->maximize (0);
else if (cw->actions () & CompWindowActio nMinimizeMask)
cw->minimize ();
}
}
I will propose the fix, once the other branch is merged to not confuse the reviewers even more...
(got it working and running here locally already :))