summaryrefslogtreecommitdiff
path: root/src/util.c
AgeCommit message (Collapse)AuthorFilesLines
2012-03-22Modify bindings for axis event detection.Scott Moreau1-5/+7
2012-03-05compositor: Swallow binding key for bindings that don't set up a grabKristian Høgsberg1-1/+49
This prevents passing the key press and release to the keyboard focus client.
2012-02-29zoom: Don't damage_all hereKristian Høgsberg1-2/+1
Setting geometry.dirty = 1 is enough.
2012-01-27compositor: move weston_surface::width,height into geometryPekka Paalanen1-2/+4
weston_surface::transform.boundingbox depends on width and height, and therefore geometry.dirty flag, so move width and height into geometry. Fix all users and check that the dirty flag is set. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-01-27compositor: fix zoom originPekka Paalanen1-5/+3
Now that we can insert a transformation before the surface position translation, we can drop geometry.x,y from the zoom transformation. That was just undoing and redoing the position translation. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-01-27compositor: move weston_surface::x,y into geometryPekka Paalanen1-4/+4
weston_surface::transform.position depends on x,y, and therefore the dirty flag, so move x and y into geometry. Also add the missing dirty flags. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-01-27compositor: restructure weston_surface::transformPekka Paalanen1-3/+4
Separate mutable data and cached immutable data in struct weston_surface. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-01-27compositor: drop inverse matrix from weston_transformPekka Paalanen1-3/+0
Remove the inverse matrix member from struct weston_transform. It is easier (and probably faster, too) to create and store only forward transformation matrices in a list, multiply them once, and then invert the final matrix, rather than creating both forward and inverse matrices, and multiplying both. Add a stub for the 4x4 matrix inversion function. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-01-27compositor: move matrix code to separate filesPekka Paalanen1-74/+0
Move matrix code to separate files to allow writing unit tests for it. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-01-27util: document matricesPekka Paalanen1-0/+10
Add comments explaining the matrix storage and multiplication, so that no-one else needs to decipher them again. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-01-27compositor: implement a stack of surface transformationsPekka Paalanen1-3/+6
Having at most one transformation object attached to a surface is not enough anymore. If we have a surface that needs to be scaled to fullscreen, and then we have the zoom animation, we already need two transformations combined. Implement support for multiple transformations by adding a transformation list. The final transformation is the ordered composite of those in the list. To avoid traversing the list every single time, add a dirty flag, and cache the final transformation. The existing transformation users (only zoom) are converted. Note: surface drawing should honour all kinds of transformations, but not damage region code nor input event translating code take transformations into account, AFAICT. Therefore anything but translation will probably behave badly until they are fixed. Cc: Juan Zhao <juan.j.zhao@linux.intel.com> Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-01-03Merge remote-tracking branch 'pq/compositor-dtors-v1'Kristian Høgsberg1-4/+15
This collided with the big weston rename, but git did a good job of fixing most cases. Conflicts: compositor/compositor.h src/compositor-x11.c src/compositor.c src/screenshooter.c src/util.c
2012-01-03Rename wayland-compositor to westonKristian Høgsberg1-0/+301
This rename addresses a few problems around the split between core Wayland and the wayland-demos repository. 1) Initially, we had one big repository with protocol code, sample compositor and sample clients. We split that repository to make it possible to implement the protocol without pulling in the sample/demo code. At this point, the compositor is more than just a "demo" and wayland-demos doesn't send the right message. The sample compositor is a useful, self-contained project in it's own right, and we want to move away from the "demos" label. 2) Another problem is that the wayland-demos compositor is often called "the wayland compsitor", but it's really just one possible compositor. Existing X11 compositors are expected to add Wayland support and then gradually phase out/modularize the X11 support, for example. Conversely, it's hard to talk about the wayland-demos compositor specifically as opposed to, eg, the wayland protocol or a wayland compositor in general. We are also renaming the repo to weston, and the compositor subdirectory to src/, to emphasize that the main "output" is the compositor.