Comment 9 for bug 1116538

Revision history for this message
MC Return (mc-return) wrote :

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 :))