[compiz] [PATCH] Grab state & Last state remembering

Danny Baumann dannybaumann at web.de
Mon Mar 5 08:07:36 PST 2007


Hi,

while porting "Group with tabs" to Compiz
(http://forum.go-compiz.org/viewtopic.php?t=649), I noticed some things
which are available in Beryl, but not in Compiz and which I believe
Compiz should have, too:

- Remembering of the last window state inside the state change notify
This is useful for properly tracking down the window state changes (e.g.
has the window been maximized in that state change?). In Beryl, we added
a variable lastState into CompWindow, which is updated inside core's
stateChangeNotify. The attached last-window-state.patch brings that
behaviour to Compiz.

- Remembering the grabbing state
Previously, only one window could be grabbed at a certain time. However,
when using group, a number of windows can be grabbed at a certain time,
so I think it's useful to provide this information to all plugins
without requiring them to wrap into the grab / ungrab notifies.

- Resize diff information
I sent this patch to the list before, may I ask if it could be
commited? ;-)

Additionally, some more things are needed for group (and probably other
plugins), which I currently solved locally (inside group), but believe
that it would make sense to put them inside core:

- A function screenGrabExists
This function, as the name implies, checks if a certain plugin has a
screen grab. It's pretty similar to otherScreenGrabExists and could
share a lot of code with it. We need this kind of functionality in group
to distinguish between user initiated / non user initiated window
moves / resizes; but I can imagine that this kind of function could come
in handy to other plugins as well.

- A fixed byte ordering image loading
In group, we have some hard-coded textures (for glow) inside a header
file which - obviously - have a fixed byte ordering. If those textures,
generated on an Intel CPU, are displayed on a PC using a PPC CPU, the
byte ordering is reversed by the function imageToTexture causing the
texture being displayed incorrectly. In my opinion, it would make sense
to add a parameter to the function imageBufferToTexture which
enables/disables this byte swapping inside imageToTexture.

If you agree with me, I can provide patches for the latter points.

Regards,

Danny
-------------- next part --------------
A non-text attachment was scrubbed...
Name: last-window-state.patch
Type: text/x-patch
Size: 915 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/compiz/attachments/20070305/9f26de81/last-window-state.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: window-grabbed.patch
Type: text/x-patch
Size: 814 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/compiz/attachments/20070305/9f26de81/window-grabbed.bin


More information about the compiz mailing list