[compiz] sticky windows and rotate focus

David Reveman davidr at novell.com
Tue Mar 6 04:26:57 PST 2007


On Tue, 2007-03-06 at 07:28 -0700, Steve Leung wrote:
> On Mon, Mar 05, 2007 at 04:36:38PM +0100, David Reveman wrote:
> 
> > I don't like to add special treatment to sticky windows because they are
> > often used in a specific way but I guess it's not too bad and I don't
> > have a better solution right now. Do you know what other WMs are doing
> > about this problem?
> 
> Hm... Other WMs seem to keep an idea of what was the most recently 
> focused window on each workspace.  Moving back to that workspace simply 
> refocuses that window, and sticky windows aren't treated specially.
> 
> That actually seems pretty simple, and I'm struggling to think of why 
> compiz can't do the same.  Sure, it uses viewports (which seem to be 
> harder to find on modern WMs) instead of workspaces, but surely it can't 
> be that hard?
> 
> If I understand it correctly, compiz keeps a simple per-screen linked 
> list of windows.  Would it be reasonable to also maintain this 
> per-workspace most recent window?
> 
> I guess the main problem that immediately sticks out is what to do with 
> a window that straddles two viewports.

You also have an almost infinite number of viewports as it doesn't
really have to be positioned at multiples of screen width/height.

I think the best is to just save the viewport coordinates along with the
activeNum each time a window gets activated. activeNum with viewport
coordinates matching the current viewport gets higher priority.

- David



More information about the compiz mailing list