Merge lp:~unity-team/unity/unity.minimized_windows_switcher into lp:unity

Proposed by Sam Spilsbury
Status: Merged
Approved by: Neil J. Patel
Approved revision: no longer in the source branch.
Merged at revision: 1434
Proposed branch: lp:~unity-team/unity/unity.minimized_windows_switcher
Merge into: lp:unity
To merge this branch: bzr merge lp:~unity-team/unity/unity.minimized_windows_switcher
Reviewer Review Type Date Requested Status
Neil J. Patel (community) Approve
Jason Smith (community) Needs Fixing
Tim Penhey (community) Needs Information
Review via email: mp+72591@code.launchpad.net

Description of the change

Adds minimized window thumbnails

The CompizMinimizedWindowHandler class will handle all of this, it just plugs straight into an existing plugin. I'd rather have this in compiz itself but it's too late to be breaking API's there.

Note: You WILL need the latest compiz-animation-plugin for this to work. There was a bug there that causes problems with this branch. Either that or the last oneiric compiz-plugins-main

bzr branch lp:~compiz-team/compiz-animation-plugin/oneiric animation
cd animation
mkdir build && cd build
cmake ..
make install

Stuff that's added:

X11TransientForReader: reads transient for properties, helper class to get transients, ancestors of windows
CompTransientForReader: same thing, but uses the compiz API to do it much faster in process
MinimizedWindowHandler: out-of-process helper class to handle the fake minimization of windows
CompizMinimizedWindowHandler: in-process class, uses templates so that we could drop it in
InputRemover: helper class to remove input on a window

There's also some tests:

tests/test-input-remover/test-input-remover will check to see if XShape works correctly on your system by default. If you specify a frame window id on the command line (you can get one using xwininfo -tree and subtracting one in hexadecimal from the "parent window id") on the command line and a number afterwards as timeout in seconds you can test the effect of the input remover on any window

tests/test-get-transients/test-get-transients will check to see if handling the transient window situation works by default, and when a window is passed to it on the command line it will print out the affected transients for that window

tests/test-minimize-window-handler/test-minimize-window-handler is basically an out-of-process simulation of what we're doing. Run it by default and it will test the window-with-transients case being fake minimized and unminimzied, run it with a window id and it will do the same thing on that window. Note that the window will still be visibile here, but you won't be able to interact with it. That's normal.

How to test this:

Make sure that:
1) You can minimize windows
2) You can unminimize windows
3) At no point do you lose input in any window that is visible
4) Focus changes appropriately when you minimize a window
5) When you minimize and unminimize a window, its transient windows (eg dialogs, toolboxes etc) go with it
6) No other weird behaviour (misc)

To post a comment you must log in.
Revision history for this message
Tim Penhey (thumper) wrote :

Are you planning to move this into the compiz source?

If you are, you should add a comment explaining this. It would make sense to put this near the compiz namespace, as that would help fix the confusion there.

If you are not going to merge it into the compiz source then you have some other formatting issues to fix.

review: Needs Information
Revision history for this message
Sam Spilsbury (smspillaz) wrote :

Yes, that is the plan

Revision history for this message
Jason Smith (jassmith) wrote :

Windows are click through after restore from minimize with this branch

review: Needs Fixing
Revision history for this message
Sam Spilsbury (smspillaz) wrote :

Have you got the option in workarounds enabled? Disable it if you do.

Also, you'll need a patch to the animation plugin to stop it from doing
stupid things. I forgot to mention that.

That should come in the next compiz main plugins update. Or if you grab
compiz-animation-plugin from bzr.
On Aug 24, 2011 11:33 AM, "Jason Smith" <email address hidden> wrote:
> Review: Needs Fixing
> Windows are click through after restore from minimize with this branch
> --
>
https://code.launchpad.net/~unity-team/unity/unity.minimized_windows_switcher/+merge/72591
> Your team DX Unity Bugs is subscribed to branch lp:unity.

Revision history for this message
Neil J. Patel (njpatel) :
review: Approve