1
0
Fork 0
Commit graph

305 commits

Author SHA1 Message Date
Jasper St. Pierre
770b58b367 wayland: Move "public" Wayland API to another header file 2014-02-28 10:24:06 -05:00
Jasper St. Pierre
eb75306f8a Revert "window-actor: Complete the removal of update_shape"
This reverts commit 640102c03b.
2014-02-26 20:52:44 -05:00
Jasper St. Pierre
98c4b82907 Revert "window: Update the shape, input, and opaque regions immediately"
This reverts commit c0d791cd6e.
2014-02-26 20:45:38 -05:00
Jasper St. Pierre
640102c03b window-actor: Complete the removal of update_shape
I accidentally stashed the rest of the stuff and forgot to
commit it... oops.
2014-02-26 20:04:19 -05:00
Jasper St. Pierre
c0d791cd6e window: Update the shape, input, and opaque regions immediately
... and individually. It turns out that updating the opaque region
was causing the shape region to be updated, which was causing a new
shape mask to be generated and uploaded to the GPU. Considering
GTK+ regenerates the opaque region on pretty much any focus change,
this is not good.
2014-02-26 20:03:16 -05:00
Jasper St. Pierre
41d5e69de5 window-actor: Kill off another use of MetaFrameBorders 2014-02-26 20:02:13 -05:00
Jasper St. Pierre
2dc7371944 window-actor: Don't pass around client_area
To solve a performance regression, the three update_*_region
calls are going to be split up, so just call get_client_area_rect
in the methods itself.
2014-02-26 20:02:11 -05:00
Jasper St. Pierre
ec2c3e1438 window: Add meta_window_get_client_area_rect 2014-02-26 19:54:41 -05:00
Adel Gadllah
d85845426c window-actor: Fix culling
At some point meta_window_actor_cull_out stopped calling
meta_cullable_cull_out_children which caused the unobscured region
to never be set for the stex.

https://bugzilla.gnome.org/show_bug.cgi?id=725216
2014-02-26 15:01:07 +01:00
Giovanni Campagna
9f5087e97d Fix input and bounding shapes
For decorated windows, we don't want to apply any input
shape, because the frame is always rectangular and eats
all the input.
The real check is in meta-window-actor, where we consider
if we need to apply the bounding shape and the input shape
(or the intersection of the two) to the surface-actor,
but as an optimization we avoid querying the server in
meta-window.
Additionally, for undecorated windows, the "has input shape"
check is wrong if the window has a bounding shape but not an
input shape.
2014-02-25 01:27:32 +01:00
Giovanni Campagna
45624f2edf MetaWindowActor: survive having no MetaSurfaceActor
We need a MetaWaylandSurface to build a MetaSurfaceActor, but
we don't have one until we get the set_window_xid() call from
XWayland. On the other hand, plugins expect to see the window
actor right from when the window is created, so we need this
empty state.

Based on a patch by Jasper St. Pierre.
2014-02-25 01:22:56 +01:00
Giovanni Campagna
153f843ea6 MetaSurfaceActor: move freeze accounting to MetaWindowActor
Turns out we only ever need to freeze/thaw whole windows, not
surfaces or subsurfaces.
This will allow removing the surface actor without losing
the count.
2014-02-25 01:20:22 +01:00
Jasper St. Pierre
f0cd9b0687 wayland-surface: Rework construction / destruction yet again
This time, to make way for MetaSurfaceActorEmpty. This also fixes
destroy effects as a side effect. It still has issues if we try
to re-assign an actor that's already toplevel (e.g. somebody
re-popping up a menu that's already being destroyed), but this
will be fixed soon.

The idea here is that MetaWindowActor will do the unparenting of
the surface actor when it itself is destroyed. To prevent bad issues
with picking, we only make the surface actor reactive when it's
toplevel.
2014-02-24 14:46:19 -05:00
Adel Gadllah
14841475b5 meta-window-actor: Fix paint_volume
We cannot intersect the the complete volume with the unobscured bounds
because it does not include the shadows. So just intersect it with the
windows's shape bounds and union it with the shadow bounds.

This also matches what the comment in the code says:
"We could compute an full clip region as we do for the window texture,
but the shadow is relatively cheap to draw, and a little more complex to clip,
so we just catch the case where the shadow is completely obscured
and doesn't need to be drawn at all."
2014-02-21 20:39:25 +01:00
Jasper St. Pierre
020cfa7283 surface-actor-x11: Recreate damage when the toplevel X window changes 2014-02-20 14:50:48 -05:00
Jasper St. Pierre
83aca0b53d window-actor: Split into two subclasses of MetaSurfaceActor
The rendering logic before was somewhat complex. We had three independent
cases to take into account when doing rendering:

  * X11 compositor. In this case, we're a traditional X11 compositor,
    not a Wayland compositor. We use XCompositeNameWindowPixmap to get
    the backing pixmap for the window, and deal with the COMPOSITE
    extension messiness.

    In this case, meta_is_wayland_compositor() is FALSE.

  * Wayland clients. In this case, we're a Wayland compositor managing
    Wayland surfaces. The rendering for this is fairly straightforward,
    as Cogl handles most of the complexity with EGL and SHM buffers...
    Wayland clients give us the input and opaque regions through
    wl_surface.

    In this case, meta_is_wayland_compositor() is TRUE and
    priv->window->client_type == META_WINDOW_CLIENT_TYPE_WAYLAND.

  * XWayland clients. In this case, we're a Wayland compositor, like
    above, and XWayland hands us Wayland surfaces. XWayland handles
    the COMPOSITE extension messiness for us, and hands us a buffer
    like any other Wayland client. We have to fetch the input and
    opaque regions from the X11 window ourselves.

    In this case, meta_is_wayland_compositor() is TRUE and
    priv->window->client_type == META_WINDOW_CLIENT_TYPE_X11.

We now split the rendering logic into two subclasses, which are:

  * MetaSurfaceActorX11, which handles the X11 compositor case, in that
    it uses XCompositeNameWindowPixmap to get the backing pixmap, and
    deal with all the COMPOSITE extension messiness.

  * MetaSurfaceActorWayland, which handles the Wayland compositor case
    for both native Wayland clients and XWayland clients. XWayland handles
    COMPOSITE for us, and handles pushing a surface over through the
    xf86-video-wayland DDX.

Frame sync is still in MetaWindowActor, as it needs to work for both the
X11 compositor and XWayland client cases. When Wayland's video display
protocol lands, this will need to be significantly overhauled, as it would
have to work for any wl_surface, including subsurfaces, so we would need
surface-level discretion.

https://bugzilla.gnome.org/show_bug.cgi?id=720631
2014-02-20 14:44:31 -05:00
Jasper St. Pierre
0b055fae2e window-actor: Kill off needs_pixmap
It's mostly equivalent to the case where we've already detached
the pixmap, *except* for the x11_size_changed case. We can simply
detach the pixmap at the time the window changes size, though.

https://bugzilla.gnome.org/show_bug.cgi?id=720631
2014-02-20 11:51:52 -05:00
Jasper St. Pierre
bc79259398 window-actor: Don't queue a redraw when queueing a new pixmap
We guarantee ourselves that a valid pixmap will appear any time
that the window is painted. The window actor will be scheduled
for a repaint if it's added / removed from the scene graph, like
during construction, if the size changes, or if we receive damage,
which are the existing use cases where this function is called.

So, I can't see any reason that we queue a redraw in here.

With the split into surface actors, we don't have an easy place
we can use to queue a redraw, and since it's unnecessary, we can
just drop it on the floor.

https://bugzilla.gnome.org/show_bug.cgi?id=720631
2014-02-20 11:35:01 -05:00
Jasper St. Pierre
c964ef4e01 window-actor: Fix build
I'm bad.
2014-02-19 01:11:42 -05:00
Jasper St. Pierre
0dccc440b6 window-actor: Kill off a nonsensical edge case
We can never have a window actor that represents either the X root
window or the stage window, so it doesn't make sense to bail out
early in case we do.

I'd imagine that this came from a much earlier version of the code
where the compositor was much separate and had its own MapNotify
handling.
2014-02-18 23:36:46 -05:00
Jasper St. Pierre
c251eb8ec0 window-group: Don't special-case the unredirected window
Since the unredirected window MetaWindowActor is stacked on top, it
will naturally get culled out of the process, so we can remove the
special casing here. Unfortunately, with the way that the code is
currently structured, it's too difficult to actually prevent setting
the clip / visible regions if the window is redirected, so just let
those be set for unredirected windows for now.
2014-02-18 21:29:50 -05:00
Jasper St. Pierre
1e6b3faa83 Fix the input region not working properly
The input region was set on the shaped texture, but the shaped texture
was never picked properly, as it was never set to be reactive. Move the
pick implementation and reactivity to the MetaSurfaceActor, and update
the code everywhere else to expect a MetaSurfaceActor.
2014-02-18 21:29:23 -05:00
Jasper St. Pierre
a0ef7c7142 Move position-changed / size-changed signals to the MetaWindow
They fit more appropriately over here...

https://bugzilla.gnome.org/show_bug.cgi?id=720631
2014-02-14 23:44:39 -05:00
Jasper St. Pierre
aec3edb1cc Always map the client and frame windows
Traditionally, WMs unmap windows when minimizing them, and map them
when restoring them or wanting to show them for other reasons, like
upon creation.

However, as metacity morphed into mutter, we optionally chose to keep
windows mapped for the lifetime of the window under the user option
"live-window-previews", which makes the code keep windows mapped so it
can show window preview for minimized windows in other places, like
Alt-Tab and Expose.

I removed this preference two years ago mechanically, by removing all
the if statements, but never went through and cleaned up the code so
that windows are simply mapped for the lifetime of the window -- the
"architecture" of the old code that maps and unmaps on show/hide was
still there.

Remove this now.

The one case we still need to be careful of is shaded windows, in which
we do still unmap the client window. In the future, we might want to
show previews of shaded windows in the overview and Alt-Tab. In that
we'd also keep shaded windows mapped, and could remove all unmap logic,
but we'd need a more complex method of showing the shaded titlebar, such
as using a different actor.

At the same time, simplify the compositor interface by removing
meta_compositor_window_[un]mapped API, and instead adding/removing the
window on-demand.

https://bugzilla.gnome.org/show_bug.cgi?id=720631
2014-02-14 23:19:41 -05:00
Jasper St. Pierre
f6db756326 shaped-texture: Move unobscured_region processing here
We want to remove a bunch of auxilliary duties from the MetaWindowActor
and MetaSurfaceActor, including some details of how culling is done.
Move the unobscured region culling code to the MetaShapedTexture, which
helps the actor become "more independent".

https://bugzilla.gnome.org/show_bug.cgi?id=720631
2014-02-05 14:42:38 -05:00
Jasper St. Pierre
27ab516f41 cullable: Reset the culling state instead of skipping the traversal
When we traversed down to reset the culling state, previously we
would just skip any actors that wanted culling. In order to properly
reset the unobscured_region before painting, we need to traverse down
to these places as well. Do this by calling cull_out with NULL regions
for both arguments, and adapt existing cull_out implementations to
match.

https://bugzilla.gnome.org/show_bug.cgi?id=720631
2014-02-05 14:24:08 -05:00
Jasper St. Pierre
9542b464bf window-actor: Clean up whitespace 2014-02-05 14:14:41 -05:00
Adel Gadllah
6bf1a66b7c window_actor: Remove the frame_messages timeout in destroy
Otherwise it might fire off later and cause a crash.

https://bugzilla.gnome.org/show_bug.cgi?id=723468
2014-02-02 15:15:20 +01:00
Jasper St. Pierre
b9755ea725 window-actor: Remove old unused APIs
https://bugzilla.gnome.org/show_bug.cgi?id=720631
2014-01-31 17:19:27 -05:00
Jasper St. Pierre
39fee9f5a2 window-actor: Flip set_redirected around
I know it's confusing with the triple negative, but unredirected is how
we track it elsewhere: we have an 'unredirected' flag, and 'should_unredirect'.

https://bugzilla.gnome.org/show_bug.cgi?id=720631
2014-01-31 17:19:26 -05:00
Jasper St. Pierre
60d9bee3bf window-actor: Simplify the unredirected check in cull_out
https://bugzilla.gnome.org/show_bug.cgi?id=720631
2014-01-31 17:19:26 -05:00
Adel Gadllah
45cb151443 window-actor: Fix unobscured_region handling when computing paint volume
We currently ignore the unobscured region when we have mapped clones in
meta_window_actor_process_damage and meta_window_actor_damage_all but
use it unconditionally when computing the paint volume.

This is wrong. We should ignore it there as well or we will end up with
empty clones if the cloned window is completly obscured
(like the tray icons in gnome-shell).

https://bugzilla.gnome.org/show_bug.cgi?id=721596
2014-01-31 15:16:48 +01:00
Jasper St. Pierre
20545941fa Revert unintentional merge from wip/surface-content to wayland
This reverts a lot of commits.
2014-01-22 09:18:13 -05:00
Jasper St. Pierre
ba484be754 window-actor: Don't use TFP under XWayland
Simply have a NULL surface actor until the set_window_id arrives...
2014-01-21 19:01:34 -05:00
Jasper St. Pierre
a318198ab4 xwayland: Update the surface actor for the window on set_window_id
We need to do this for XWayland windows, since we only get the event
telling us they're an XWayland window after the compositor knows about
the window.
2014-01-21 19:01:34 -05:00
Jasper St. Pierre
e6391c2896 surface content 2014-01-21 19:01:34 -05:00
Jasper St. Pierre
7ea537fad7 Move position-changed / size-changed signals to the MetaWindow
They fit more appropriately over here...

https://bugzilla.gnome.org/show_bug.cgi?id=720631
2014-01-21 19:01:34 -05:00
Jasper St. Pierre
03146c2967 window-actor: Remove old unused APIs
https://bugzilla.gnome.org/show_bug.cgi?id=720631
2014-01-21 19:01:34 -05:00
Jasper St. Pierre
0a81314337 window-actor: Flip set_redirected around
I know it's confusing with the triple negative, but unredirected is how
we track it elsewhere: we have an 'unredirected' flag, and 'should_unredirect'.

https://bugzilla.gnome.org/show_bug.cgi?id=720631
2014-01-21 19:01:34 -05:00
Jasper St. Pierre
e3b64912b6 window-actor: Simplify the unredirected check in cull_out
https://bugzilla.gnome.org/show_bug.cgi?id=720631
2014-01-21 19:01:34 -05:00
Jasper St. Pierre
a0fe392665 surface-actor: Move unobscured_region processing here
https://bugzilla.gnome.org/show_bug.cgi?id=720631
2014-01-21 19:01:34 -05:00
Jasper St. Pierre
bfc906cbc4 compositor: Remove meta_compositor_window_[un]mapped
We no longer unmap the toplevel windows during normal operation. The
toplevel state is tied to the window's lifetime.

Call meta_compositor_add_window / meta_compositor_remove_window instead...
2014-01-21 19:01:34 -05:00
Jasper St. Pierre
8e6f8087e8 Always map the client and frame windows
Traditionally, WMs unmap windows when minimizing them, and map them
when restoring them or wanting to show them for other reasons, like
upon creation.

However, as metacity morphed into mutter, we optionally chose to keep
windows mapped for the lifetime of the window under the user option
"live-window-previews", which makes the code keep windows mapped so it
can show window preview for minimized windows in other places, like
Alt-Tab and Expose.

I removed this preference two years ago mechanically, by removing all
the if statements, but never went through and cleaned up the code so
that windows are simply mapped for the lifetime of the window -- the
"architecture" of the old code that maps and unmaps on show/hide was
still there.

Remove this now.

The one case we still need to be careful of is shaded windows, in which
we do still unmap the client window. Theoretically, we might want to
show previews of shaded windows in the overview and Alt-Tab, so we remove
the complex unmap tracking for this later.
2014-01-21 19:01:18 -05:00
Jasper St. Pierre
56207ddb6a window-actor: Never unredirect when under Wayland
https://bugzilla.gnome.org/show_bug.cgi?id=720631
2014-01-20 16:14:56 -05:00
Jasper St. Pierre
7155d7e043 Properly set the number of components on the CoglTextureRectangle
We need to set the number of components on the CoglTextureRectangle to
prevent wasting too much GPU memory. As we need to do this before we call
cogl_texture_set_region, just remove the meta_texture_rectangle_new wrapper,
and make callers call cogl_texture_rectangle_new_with_size directly.
2014-01-13 13:28:38 -05:00
Jasper St. Pierre
419dfd333a Update for Cogl API breaks 2014-01-13 13:08:17 -05:00
Jasper St. Pierre
ef2b6e7d00 window-actor: Fix optimization in get_paint_volume
We need to clip the paint volume to the unobscured region, not the
other way around...

https://bugzilla.gnome.org/show_bug.cgi?id=720630
2013-12-18 18:43:39 -05:00
Jasper St. Pierre
8131f34eb6 Move _NET_WM_WINDOW_OPACITY handling to the standard window-props interface 2013-12-09 15:53:23 -05:00
Jasper St. Pierre
66af41f4a9 window-actor: Remove outdated code path
The shadow is added in the paint step, not as a separate actor,
so the raise is a no-op. It also gets rid of an annoying misspelling
that's driving me crazy.
2013-12-09 14:10:44 -05:00
Jasper St. Pierre
e30be380dd window-actor: Move signal handler connections to the meta-window setter 2013-12-09 14:08:01 -05:00
Jasper St. Pierre
65f2e29375 window-actor: Make the meta-window property construct-only
We don't deal with setting this property at all, and it's unlikely
to come up in future settings, so just don't allow setting it at all.

https://bugzilla.gnome.org/show_bug.cgi?id=678989
2013-12-09 14:08:01 -05:00
Jasper St. Pierre
98dbba1e17 window-actor: Remove meta-screen property
This can be inferred from the window. Don't allow anybody to set it.

https://bugzilla.gnome.org/show_bug.cgi?id=678989
2013-12-09 14:05:18 -05:00
Jasper St. Pierre
422648e2eb window-actor: Remove (private) xwindow property
This should make it easier to construct a MetaWindowActor from bindings.

https://bugzilla.gnome.org/show_bug.cgi?id=678989
2013-12-09 14:05:18 -05:00
Jasper St. Pierre
f0fa4d831a window: Add a simple meta_window_get_toplevel_xwindow utility
To replace all the places where we do:

  window->frame ? window->frame->xwindow : window->xwindow

or similar...
2013-12-09 14:05:18 -05:00
Jasper St. Pierre
1b600f5867 window-actor: Use g_signal_connect_object
To make our signal connections a bit more manageable...
2013-12-09 13:57:33 -05:00
Jasper St. Pierre
622c7a021b window-actor: Update shape at construction time
When we attach an existing surface actor, the allocation may not
change, so we need to ensure that the shape region and geometry is
valid...
2013-12-04 10:26:06 -05:00
Jasper St. Pierre
5089a63d76 wayland-surface: Create the surface actor ourselves
Otherwise, we can't rely on a surface_actor being around to add
ourselves to...
2013-11-25 18:29:58 -05:00
Jasper St. Pierre
304005e04f wayland-surface: Replace MetaWindowActor with MetaSurfaceActor
Since subsurfaces won't have toplevel MetaWindowActors, we need to
use MetaSurfaceActor instead. These are embedded in the MetaWindowActor,
just like MetaShapedTexture was (in fact, MetaSurfaceActor now contains
a MetaShapedTexture)
2013-11-25 17:25:55 -05:00
Jasper St. Pierre
025ab35af7 surface-actor: Add setters for set_input_region / set_opaque_region
Subsurfaces won't have a MetaWindow or MetaWindowActor to fetch these from,
so they need to be tied directly to the MetaSurfaceActor.
2013-11-25 17:25:47 -05:00
Jasper St. Pierre
a27744503b shaped-texture: Make Cullable
Make MetaWindowActor chain up to the generic default MetaCullable
implementation, and remove the helper methods for MetaSurfaceActor
and MetaShapedTexture.
2013-11-25 17:25:47 -05:00
Jasper St. Pierre
d3bc7570d0 window-actor: Update the shape region when the surface actor changes size 2013-11-25 17:18:22 -05:00
Jasper St. Pierre
74e43a4702 cullable: Turn cull_out / reset_culling into a separate interface
Instead of hardcoded knowledge of certain classes in MetaWindowGroup,
create a generic interface that all actors can implement to get parts of
their regions culled out during redraw, without needing any special
knowledge of how to handle a specific actor.

The names now are a bit suspect. MetaBackgroundGroup is a simple
MetaCullable that knows how to cull children, and MetaWindowGroup is the
"toplevel" cullable that computes the initial two regions. A future
cleanup here could be to merge MetaWindowGroup / MetaBackgroundGroup so
that we only have a generic MetaSimpleCullable, and move the "toplevel"
cullability to be a MetaCullableToplevel.

https://bugzilla.gnome.org/show_bug.cgi?id=714706
2013-11-25 15:21:36 -05:00
Jasper St. Pierre
0764b2058a window-actor: Move the operations we need to do when we cull out here
Soon, we'll move this into a generic MetaCullable interface, but for
now, just put hardcoded knowledge in MetaWindowGroup.

https://bugzilla.gnome.org/show_bug.cgi?id=714706
2013-11-25 15:19:08 -05:00
Jasper St. Pierre
0be57b621b window-actor: Fix a copy/paste typo 2013-11-21 17:35:52 -05:00
Jasper St. Pierre
2952d3671d window-actor: Set as unreactive when hiding
This means that we should never pick the actor when it's being destroyed.
2013-11-19 19:35:34 -05:00
Jasper St. Pierre
1b5ace8256 window-actor: Don't set ourselves as reactive twice 2013-11-19 19:35:34 -05:00
Owen W. Taylor
b9da43b753 Rename meta_window_get_outer_rect() to meta_window_get_frame_rect()
For clarity, rename meta_window_get_outer_rect() to match terminology
we use elsewhere. The old function is left as a deprecated
compatibility wrapper.
2013-11-19 14:04:16 -05:00
Jonas Ådahl
7c45d6594c MetaWindowActor: Use allocation changes signals for size changed signals
When a Wayland compositor, simply rely on the clutter actor allocation
changed signal to sync geometry and emit window actor size changed
signals.

Attaching a wl_buffer to a MetaShapedTexture will signal allocation
changed on the corresponding MetaSurfaceActor, which the MetaWindowActor
is listening to.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=705502
2013-11-18 21:19:01 -05:00
Jonas Ådahl
ea916b6c49 Introduce MetaSurfaceActor for drawing MetaWindowActor content
Instead of having MetaWindowActor only have one single MetaShapedTexture
as actor drawing its content, introduce a new abstract MetaSurfaceActor
that takes care of drawing.

This is one step in the direction to decouple MetaWaylandSurface with a
MetaWindow and MetaWindowActor (except for shell/xdg surfaces) in order
to finally support subsurfaces like features, or any feature where
window is not drawn using a single texture.

The first step, implemented in this patch, is to not have
MetaWindowActor work directly with a shaped texture. There are still
some cases where it simply gets the texture and goes on as before, but
this should be changed by either removing the need of going via
MetaWindowActor or by adding some generic interface to MetaSurfaceActor
that doesn't limit its functionality to one shaped texture.

There should be no visible difference nor after this patch, but
meta_window_actor_get_texture() and meta_surface_actor_get_texture()
should be deprecated when equivalent functionality has been introduced.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=705502
2013-11-18 21:19:00 -05:00
Jasper St. Pierre
a02d734243 window-actor: Move all buffer management and damage correction here
We want ShapedTexture to be a dumb actor that knows how to
pick/paint fairly easily, without any "platform knowledge", so to say...
2013-11-18 21:19:00 -05:00
Jasper St. Pierre
1f569bef76 Fix dragging on move/resize grabs
We need to use the grab_window for incoming events if we have an active grab.
2013-11-18 18:38:24 -05:00
Jasper St. Pierre
662c9729bc trivial: window-actor: Fix formatting 2013-11-17 19:16:30 -05:00
Adel Gadllah
c24d9bf142 meta-window-actor: Fix offset calculation in queue_send_frame_messages_timeout
The current time offset calculation is wrong. It is supposed to calculate
the offset between the current time and the
"time where it message should be sent" (last_time + interval).

Fix the math to actually do that.

https://bugzilla.gnome.org/show_bug.cgi?id=709340
2013-10-07 20:22:53 +02:00
Giovanni Campagna
e965cf32d4 MetaWindowActor: fix updates with multiple size changes in one frame
We must set x11_size_changed even if we are frozen, as every window
size change makes the X server drop the pixmap, and we might lose
the information at the next thaw() if the window changes size
twice in one frame (so we would keep drawing with the old pixmap
until something else causes another resize)
2013-09-25 19:23:58 +02:00
Adel Gadllah
2d67b01c3a window-actor: Use more conservative paint volume
We know which part of the window is not obscured, so take advantaged of that
to limit the size of the paint volume that we report.
2013-09-04 20:08:24 +02:00
Giovanni Campagna
b53bf0e8c2 Fix distcheck
Missing translation files, missing dists and some -Werrors.
2013-09-03 17:00:18 +02:00
Jasper St. Pierre
1987cbb764 window-actor: Fix build 2013-08-29 17:16:15 -04:00
Jasper St. Pierre
1a7984be43 window-actor: Use g_clear_pointer 2013-08-29 17:05:41 -04:00
Adel Gadllah
3b1b611634 meta-window-actor: Throttle obscured frame synced apps
We must send frame_drawn and frame_timing messages to even when
we don't actually queue a redraw on screen to comply with the
WM sync spec.

So throttle such apps to down to a ~100ms interval.

https://bugzilla.gnome.org/show_bug.cgi?id=703332
2013-08-29 17:04:36 -04:00
Adel Gadllah
f08921bd0c meta-shaped-texture: Don't queue redraws for obscured regions
When we get a damage event we update the window by calling
meta_shaped_texture_update_area which queues a redraw on the actor.
We can avoid that for obscured regions by comparing the damage area to
our visible area.

This patch causes _NET_WM_FRAME_DRAWN messages to be not sent in some cases
where they should be sent; they will be added back in a later commit.

https://bugzilla.gnome.org/show_bug.cgi?id=703332
2013-08-29 17:03:48 -04:00
Jasper St. Pierre
0089b5769c shaped-texture: Turn blending off when drawing entirely opaque regions
When drawing entirely opaque regions, we traditionally kept blending on
simply because it made the code more convenient and obvious to handle.
However, this can cause lots of performance issues on GPUs that aren't
too powerful, as they have to readback the buffer underneath.

Keep track of the opaque region set by windows (through _NET_WM_OPAQUE_REGION,
Wayland opaque_region hints, standard RGB32 frame masks or similar), and draw
those rectangles separately through a different path with blending turned off.

https://bugzilla.gnome.org/show_bug.cgi?id=707019
2013-08-29 15:31:53 -04:00
Jasper St. Pierre
2d35e07fae wayland: Add support for set_opaque_region / set_input_region
https://bugzilla.gnome.org/show_bug.cgi?id=707019
2013-08-29 15:31:52 -04:00
Jasper St. Pierre
95e2d26d03 window-actor: Mark all Wayland clients as argb32
https://bugzilla.gnome.org/show_bug.cgi?id=707019
2013-08-29 15:26:49 -04:00
Giovanni Campagna
bd3d5df9ce Remove HAVE_WAYLAND ifdefs
Wayland support is always enabled now.

https://bugzilla.gnome.org/show_bug.cgi?id=705497
2013-08-26 15:00:29 +02:00
Giovanni Campagna
1617323dca MetaShapedTexture: don't include private headers in public ones
Private headers are not installed, so they can't be referenced
from public ones.

https://bugzilla.gnome.org/show_bug.cgi?id=705497
2013-08-26 15:00:29 +02:00
Giovanni Campagna
bfc87d13cb MetaWindowActor: fix reference counting issue
We need to use g_signal_connect_object(), rather than g_signal_connect(),
because the window actor can be destroyed before the window emits
the final notify::appears-focused inside unmanage, if the plugin
decides that it doesn't want to animate the destruction (which
happens with dialogs and the default plugin)

https://bugzilla.gnome.org/show_bug.cgi?id=706207
2013-08-18 00:22:07 +02:00
Giovanni Campagna
152d896f75 MetaWindowActor/wayland: make sure the mapped bit is correctly set
Otherwise it stays FALSE for OR windows, causing the shape region
to be empty and the actor culled from drawing.

https://bugzilla.gnome.org/show_bug.cgi?id=706078
2013-08-15 17:41:34 +02:00
Giovanni Campagna
9a5f243f73 wayland: refactor window destruction and focus
The previous code was leaving focus fields dirty in MetaWaylandPointer
and MetaWaylandKeyboard at time (which could crash the X server
because of invalid object IDs)
The new code is more tighly integrated in the normal X11 code
for handling keyboard focus (meaning that the core idea of input
focus is also correct now), so that meta_window_unmanage() can
do the right thing. As a side benefit, clicking on wayland clients
now unfocus X11 clients.
For the mouse focus, we need to clear the surface pointer when
the metawindowactor is destroyed (even if the actual actor is
kept alive for effects), so that a repick finds a different pointer
focus.

https://bugzilla.gnome.org/show_bug.cgi?id=705859
2013-08-13 09:42:55 +02:00
Giovanni Campagna
03f55b9485 wayland: fix a #warning
Remove window_surfaces, as the FIXME asks for. We don't need it
because we can obtain the surface from the MetaWindow, and
follow the wayland compositor path for both types of clients.

https://bugzilla.gnome.org/show_bug.cgi?id=705818
2013-08-13 09:42:55 +02:00
Neil Roberts
268ebb1b18 wayland: Add basic input support
This copies the basic input support from the Clayland demo compositor.
It adds a basic wl_seat implementation which can convert Clutter mouse
events to Wayland events. For this to work all of the wayland surface
actors need to be made reactive.

The wayland keyboard input focus surface is updated whenever Mutter
sees a FocusIn event so that it will stay in synch with whatever
surface Mutter wants as the focus. Wayland surfaces don't get this
event so for now it will just give them focus whenever they are
clicked as a hack to test the code.

Authored-by: Neil Roberts <neil@linux.intel.com>
Authored-by: Giovanni Campagna <gcampagna@src.gnome.org>
2013-08-10 19:13:49 -04:00
Robert Bragg
f9a11b3b18 wayland: Adds basic hybrid X + Wayland support
This adds support for running mutter as a hybrid X and Wayland
compositor. It runs a headless XWayland server for X applications
that presents wayland surfaces back to mutter which mutter can then
composite.

This aims to not break Mutter's existing support for the traditional X
compositing model which means a single build of Mutter can be
distributed supporting the traditional model and the new Wayland based
compositing model.

TODO: although building with --disable-wayland has at least been tested,
I still haven't actually verified that running as a traditional
compositor isn't broken currently.

Note: At this point no input is supported

Note: multiple authors have contributed to this patch:
Authored-by: Robert Bragg <robert@linux.intel.com>
Authored-by: Neil Roberts <neil@linux.intel.com>
Authored-by: Rico Tzschichholz.
Authored-by: Giovanni Campagna <gcampagna@src.gnome.org>
2013-08-10 19:13:48 -04:00
Robert Bragg
531be6c413 Track the X Shape input region and use it for picking
We now track whether a window has an input shape specified via the X
Shape extension. Intersecting that with the bounding shape (as required
by the X Shape extension) we use the resulting rectangles to paint
window silhouettes when picking. As well as improving the correctness of
picking this should also be much more efficient because typically when
only picking solid rectangles then the need to actually render and issue
a read_pixels request can be optimized away and instead the picking is
done on the cpu.
2013-08-10 19:13:48 -04:00
Adel Gadllah
4862872c78 window-actor: Fix doc comment
https://bugzilla.gnome.org/show_bug.cgi?id=703332
2013-08-05 16:29:37 +02:00
Jasper St. Pierre
73dbb4b9a5 window-actor: Remove another unused field 2013-07-15 12:20:26 -04:00
Jasper St. Pierre
51acc3ee31 window-actor: Remove unused description
The desc field would never get filled in, as we can't have a window
actor without a MetaWindow, also, so remove the storage for the field.
2013-07-15 12:20:26 -04:00
Jasper St. Pierre
a6f206f07c window-actor: Remove a field we don't use 2013-07-15 12:20:13 -04:00
Stef Walter
dfa4c7d670 compositor: Fix regression of shaded windows
Fix issues drawing shaded window shadows.

https://bugzilla.gnome.org/show_bug.cgi?id=693714
2013-05-15 16:52:28 +02:00
Simon McVittie
c2a9ccb7e2 Let the UI layer (via the core) construct the frame mask
This essentially just moves install_corners() from the compositor, through
the core, into the UI layer where it arguably should have been anyway,
leaving behind stub functions which call through the various layers. This
removes the compositor's special knowledge of how rounded corners work,
replacing it with "ask the UI for an alpha mask".

The computation of border widths and heights changes a bit, because the
width and height used in install_corners() are the
meta_window_get_outer_rect() (which includes the visible borders but not
the invisible ones), whereas the more readily-available rectangle is the
MetaFrame.rect (which includes both). Computing the same width and height
as meta_window_get_outer_rect() involves compensating for the invisible
borders, but the UI layer is the authority on those anyway, so it seems
clearer to have it do the calculations from scratch.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=697758
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
2013-04-17 13:35:06 +01:00
Tomeu Vizoso
2efed44257 Add a meaningful name and description to all sections/files in the API docs
https://bugzilla.gnome.org/show_bug.cgi?id=695641
2013-03-14 18:11:04 -04:00
Tomeu Vizoso
e0b698d365 Fix gobs of gtk-doc warnings
https://bugzilla.gnome.org/show_bug.cgi?id=676856
2013-03-14 18:02:43 -04:00
Owen W. Taylor
6e02fb80c4 Always send _NET_WM_FRAME_DRAWN for newly created windows
Send a _NET_WM_FRAME_DRAWN for each newly created window, as required
by the specification. This avoids a race where a window might be created
frozen but already unfrozen by the time we first see fetch the
counter value.

Remove a duplicate call to meta_compositor_set_updates_frozen() which
was called before the MetaWindowActor is created and hence did nothing.

https://bugzilla.gnome.org/show_bug.cgi?id=694771
2013-03-04 15:36:13 -05:00
Pavel Vasin
4d437e32e0 window-actor: Fix leaked frame list
https://bugzilla.gnome.org/show_bug.cgi?id=695135
2013-03-04 19:07:23 +01:00
Pavel Vasin
7db236b2a4 window-actor: Fix leaked opaque_region
https://bugzilla.gnome.org/show_bug.cgi?id=695135
2013-03-04 19:07:23 +01:00
Jasper St. Pierre
d395d75e26 Fix up for latest Clutter deprecations
https://bugzilla.gnome.org/show_bug.cgi?id=678917
2013-03-03 16:23:32 -05:00
Jasper St. Pierre
7f6a77232f compositor: Don't use deprecated Cogl-1.0 API
https://bugzilla.gnome.org/show_bug.cgi?id=694224
2013-02-19 20:05:33 -05:00
Jasper St. Pierre
491c5b622e window-actor: Set every window actor to be reactive
Now that the background actor is reactive, this means that
clicks on the window group part of the stage, even when they're
on an X window, will be registered as the background actor, as
all of the other children of the group aren't reactive. This can
happen when a plugin takes a modal grab, for instance.

https://bugzilla.gnome.org/show_bug.cgi?id=681540
2013-02-17 15:43:38 -05:00
Adel Gadllah
034ab77c30 window-actor: Use meta_window_is_monitor_sized
Use meta_window_is_monitor_sized in should_unredirect instead of doing
the checks directly.
2013-02-17 21:42:14 +01:00
Owen W. Taylor
d900d83522 MetaWindowActor: Go back to freezing affecting actor geometry
We do, in fact, need freezing to affect window geometry, so that
move-resize operations (such as an interactive resize from the
left, or a resize of a popup centered by the application) occur
atomically.

So to make map effects work properly, only exclude the initial
placement of a window from freezing. (In the future, we may want
to consider whether pure moves of a window being done in response
to a user drag should also be excluded from freezing.)

Rename meta_window_sync_actor_position() to
meta_window_sync_actor_geometry() for clarity.

https://bugzilla.gnome.org/show_bug.cgi?id=693922
2013-02-15 21:48:25 -05:00
Owen W. Taylor
3d337a98d9 MetaWindowActor: Freeze shouldn't affect actor position
If a window is frozen because it is repainting, that shouldn't kee[p
us from updating its position: we don't want a slow-to-update window
to move around the screen chunkily when dragged. (This does reduce
the efficiency of begin/end frames for replacing double-buffering,
but that never works very well in the case where there was an overlapping
window or the entire screen needed redrawing for whatever reason.)

This fixes a bug where a window that was mapped frozen would not get
positioned properly until after the map effect finished, and would
jump from 0,0 at that point. Since effects *do* need to prevent
actor repositioning by Mutter, we must position the actor before any
effect starts.

Because we now are queuing invalidates on frozen windows, fix the
logic for that so that we properly update everything when the window
unfreezes.

https://bugzilla.gnome.org/show_bug.cgi?id=693922
2013-02-15 16:07:47 -05:00
Owen W. Taylor
5876f2e3e5 Fix corner cases where _NET_WM_FRAME_DRAWN might be missed
The WM spec requires _NET_WM_FRAME_DRAWN to *always* be sent when
there is an appropriate update to the sync counter value. We were
potentially missing _NET_WM_FRAME_DRAWN when an application did a
spontaneous update during an interactive resize and during effects.
Refactor the code to always send _NET_WM_FRAME_DRAWN, even when
a window is frozen.

https://bugzilla.gnome.org/show_bug.cgi?id=693833
2013-02-14 16:21:26 -05:00
Gayan Perera
6b5cf2eb61 compositor: Add a new window group for override-redirect windows
Put override redirect windows such as menus into a separate window group
stacked above everything else. This will allow us to visually put these
above other compositior chrome.

Based on a patch from Muffin.

https://bugzilla.gnome.org/show_bug.cgi?id=633620
2013-02-14 01:25:17 -05:00
Owen W. Taylor
87fe9685b5 Distinguish "no delay" frames from spontaneous drawing
When a client is drawing as hard as possible (without sleeping
between frames) we need to draw as soon possible, since sleeping
will decrease the effective frame rate shown to the user, and
can also result in the system never kicking out of power-saving
mode because it doesn't look fully utilized.

Use the amount the client increments the counter value by when
ending the frame to distinguish these cases:

 - Increment by 1: a no-delay frame
 - Increment by more than 1: a non-urgent frame, handle normally

https://bugzilla.gnome.org/show_bug.cgi?id=685463
2013-02-13 09:48:27 -05:00
Owen W. Taylor
2d9b8bb2d0 Send _NET_WM_FRAME_TIMINGS messages
We previously had timestamp information stubbed out in
_NET_WM_FRAME_DRAWN. Instead of this, add a high-resolution timestamp
in _NET_WM_FRAME_DRAWN then send a _NET_WM_FRAME_TIMINGS message
after when we have complete frame timing information, representing
the "presentation time" of the frame as an offset from the timestamp
in _NET_WM_FRAME_DRAWN.

To provide maximum space in the messages,_NET_WM_FRAME_DRAWN and
_NET_WM_FRAME_TIMINGS are not done as WM_PROTOCOLS messages but
have their own message types.

https://bugzilla.gnome.org/show_bug.cgi?id=685463
2013-02-13 09:48:27 -05:00
Owen W. Taylor
b07aea467e Enable CLUTTER / COGL_ENABLE_EXPERIMENTAL_API globally
Instead of defining CLUTTER_ENABLE_EXPERIMENTAL_API and
COGL_ENABLE_EXPERIMENTAL_API in individual source files, enable
them on the command line. We weren't tracking exactly what pieces of
experimental API we were using and we were using the experimental
API in most source files that used Clutter and Cogl, so the
local #defines were annoying rather than useful.

https://bugzilla.gnome.org/show_bug.cgi?id=685463
2013-02-13 09:48:26 -05:00
Owen W. Taylor
04ef448927 Handle _NET_WM_SYNC_REQUEST_COUNTER updates without redraw
It's possible that a client might update the (extended)
_NET_WM_SYNC_REQUEST_COUNTER counter twice without actually drawing
anything. In that case, we still should send a _NET_WM_FRAME_DRAWN
message since it's hard for a client to know every case in which
no damage is generated. For now, do it the easy way by forcing a
stage repaint.

https://bugzilla.gnome.org/show_bug.cgi?id=685463
2013-02-13 09:48:26 -05:00
Owen W. Taylor
fbfab93c63 Send _NET_WM_FRAME_DRAWN messages
When the application provides the extended second counter for
_NET_WM_SYNC_REQUEST, send a client message with completion
information after the next redraw after each counter update
by the application.

https://bugzilla.gnome.org/show_bug.cgi?id=685463
2013-02-13 09:48:26 -05:00
Owen W. Taylor
c9343e3ee3 Implement freezing of updates during resize
Replace the unused meta_compositor_set_updates() with
a reversed-meaning meta_compositor_set_updates_frozen(), and use
it to implement freezing application window updates during
interactive resizing. This avoids drawing new areas of the window
with blank content before the application has a chance to repaint.

https://bugzilla.gnome.org/show_bug.cgi?id=685463
2013-02-13 09:40:07 -05:00
Adel Gadllah
1c680be11a meta-window-actor: Make sure that the shape_region is always set
Start off with an empty region to make sure that the shape_region is
always set even for unredirected and frozen windows.

https://bugzilla.gnome.org/show_bug.cgi?id=693482
2013-02-09 20:56:03 +01:00
Adel Gadllah
5298d1c8d0 meta-window-actor: Don't do check_needs_reshape when not mapped
This can cause us ending up with a wrong mask because we don't yet
have a pixmap to use in build_and_scan_frame_mask().

https://bugzilla.gnome.org/show_bug.cgi?id=679901
2013-02-06 18:11:36 +01:00
Rico Tzschichholz
493f619adc meta-window-actor: Fix uninitialized variable
Fallout of 90f2a3ae4c
2013-02-06 08:19:20 +01:00
Jasper St. Pierre
a613a55658 Support _NET_WM_OPAQUE_REGION
This new hint allows compositors to know what portions of a window
will be obscured, as a region above them is opaque. For an RGB window,
possible to glean this information from the bounding shape region of
a client window, but not for an ARGB32 window. This new hint allows
clients that use ARGB32 windows to say which part of the window is
opaque, allowing this sort of optimization.

https://bugzilla.gnome.org/show_bug.cgi?id=679901
2013-02-06 00:08:04 -05:00
Jasper St. Pierre
3fe5a676c2 window-actor: Remove the bounding region
With the shape region always set, it turns out the bounding region
is only used in one place, that's easily replaced with a variable
we already have available to us.

https://bugzilla.gnome.org/show_bug.cgi?id=679901
2013-02-06 00:05:23 -05:00
Jasper St. Pierre
19420f147f window-actor: Remove conditional checks for the shape region
With recent changes in the way the window mask texture is constructed,
the shape_region is always set, which means that we can remove
conditionals checking if the shape region is set.

https://bugzilla.gnome.org/show_bug.cgi?id=679901
2013-02-06 00:05:23 -05:00
Jasper St. Pierre
d48df249c9 Revert "window-actor: Ensure we always have a valid shape_region"
This reverts commit 07273a075d.
2013-02-06 00:02:03 -05:00
Jasper St. Pierre
e48c3dac87 Revert "window-actor: Remove conditional checks for the shape region"
This reverts commit 84930f1d78.
2013-02-06 00:02:02 -05:00
Jasper St. Pierre
3516902fae Revert "window-actor: Remove the bounding region"
This reverts commit 66185a468c.
2013-02-06 00:02:00 -05:00
Jasper St. Pierre
66185a468c window-actor: Remove the bounding region
With the shape region always set, it turns out the bounding region
is only used in one place, that's easily replaced with a variable
we already have available to us.

https://bugzilla.gnome.org/show_bug.cgi?id=679901
2013-02-05 23:59:20 -05:00
Jasper St. Pierre
84930f1d78 window-actor: Remove conditional checks for the shape region
With recent changes in the way the window mask texture is constructed,
the shape_region is always set, which means that we can remove
conditionals checking if the shape region is set.

https://bugzilla.gnome.org/show_bug.cgi?id=679901
2013-02-05 23:54:13 -05:00
Jasper St. Pierre
07273a075d window-actor: Ensure we always have a valid shape_region
Force a reshape at startup to ensure that shape_region is always
constructed and valid, even if the window is unredirected or frozen.

https://bugzilla.gnome.org/show_bug.cgi?id=679901
2013-02-05 23:54:13 -05:00
Adel Gadllah
90f2a3ae4c mutter-window-actor: Improve unredirect heuristic
Currently we only unredirect monitor sized override redirect windows.
This was supposed to catch fullscreen opengl games and improve
their performance.

Newer games like fullscreen webgl games and SDL2 using games (like L4D) as well as wine based games do not use override redirect windows so we need a better
heuristic to catch them.

GLX windows always damage the whole window when calling glxSwapBuffers and
never damage sub regions. So we can use that to detect them.

The new heuristic unredirects windows fullscreen windows that have damaged the
whole window more then 100 times in a row.

https://bugzilla.gnome.org/show_bug.cgi?id=683786
2013-02-05 21:13:27 +01:00
Adel Gadllah
2ecc50af53 meta-window-actor: Correctly create a new pixmap when redirecting a window again
We should call meta_window_actor_detach not
meta_window_actor_queue_create_pixmap to create a new pixmap when we redirect a
previously unredirected window again.

https://bugzilla.gnome.org/show_bug.cgi?id=693042
2013-02-02 11:02:49 +01:00
Jasper St. Pierre
e28a36affd window-actor: Merge two simple methods
With some recent changes to how mask textures are constructed from
shapes, a helper method we made was only called in one place, allowing
us to drop a reference/destroy, and remove a double clear.

https://bugzilla.gnome.org/show_bug.cgi?id=679901
2013-01-18 00:28:54 -05:00
Jasper St. Pierre
53534b4ded window-actor: Remove custom region destruction methods with g_clear_pointer
https://bugzilla.gnome.org/show_bug.cgi?id=679901
2013-01-18 00:28:54 -05:00
Jasper St. Pierre
079dd60e3d window-actor: Clean up finalization code with simple uses of g_clear_pointer
While not a massive change by itself, adding new code to use g_clear_pointer
without porting existing usage looks strange.

https://bugzilla.gnome.org/show_bug.cgi?id=679901
2013-01-18 00:28:54 -05:00
Jasper St. Pierre
5d12f00b3b window-actor: Speed up mask creation
Due to a conditional error, meta_region_builder_add_rectangle was called
on every single blank pixel, rather than at the end of spans. With the new
rename, it's fairly clear to see the error. Fix the check to ensure that
we no longer make extraneous calls to meta_region_builder_add_rectangle.

https://bugzilla.gnome.org/show_bug.cgi?id=691874
2013-01-17 16:33:54 -05:00
Jasper St. Pierre
95f3bb3b81 window-actor: Rename variable in scanning function
"w" usually stands for "width", but here it stands for the end X bound,
so we'll rename it to the more traditional "x2".

https://bugzilla.gnome.org/show_bug.cgi?id=691874
2013-01-17 16:33:53 -05:00
Adel Gadllah
3876a1a192 Support bypass compositor hints
Add support for _NET_WM_BYPASS_COMPOSITOR and _NET_WM_DONT_BYPASS_COMPOSITOR
as proposed here: https://mail.gnome.org/archives/wm-spec-list/2012-February/msg00010.html

https://bugzilla.gnome.org/show_bug.cgi?id=683020
2012-12-18 19:02:34 +01:00
Jasper St. Pierre
7938458eb8 window-actor: Don't create a mask texture unnecessarily
Mask texture resources may be expensive. Don't create one
if we don't need to, like on an unshaped window without
a frame.

https://bugzilla.gnome.org/show_bug.cgi?id=681676
2012-09-26 13:53:14 -03:00
Jasper St. Pierre
d8bc7f7aa1 window-actor: Fix a memory leak
We need to free the frame_paint_region here.

https://bugzilla.gnome.org/show_bug.cgi?id=682648
2012-08-25 05:51:01 -03:00
Jasper St. Pierre
a2f2e07e9b meta-window-actor: Fix a potential crash in the window shaping code
There was a potential case where we were trying to use uninitialized memory,
in the case where the X server threw an error during XShapeGetRectangles.
In this case, we need to use the implicit shape for the window, which means
we need to rearrange code flow to make it work.

https://bugzilla.gnome.org/show_bug.cgi?id=677977
2012-06-25 14:07:35 -04:00
Jasper St. Pierre
66eac7824a meta-window-actor: Don't unredirect shaped windows
If a window has its BoundingRegion shaped, we shouldn't unredirect it,
as it expects the rest of the windows from being shown under it. This
prevents applications like the Skype screen recorder or gtkRecordMyDesktop
which want to show a "border" around the recorded area from being
unredirected, giving the appearance of making the desktop freeze.

https://bugzilla.gnome.org/show_bug.cgi?id=677657
2012-06-08 16:48:43 -04:00
Jasper St. Pierre
4041f96ed3 meta-window-actor: Refactor should_unredirect a bit more
"Flat is better than nested"

https://bugzilla.gnome.org/show_bug.cgi?id=677657
2012-06-08 16:48:42 -04:00
Jasper St. Pierre
30bc8bc6ce window-actor: Add a debugging tool to write a region to a PNG
Just a helper function that I keep rewriting all over the place.

https://bugzilla.gnome.org/show_bug.cgi?id=676052
2012-05-25 17:31:06 -04:00
Jasper St. Pierre
ac18f41ed1 window-actor: Use MetaRegionBuilder when scanning the visible region
This gives a pretty solid performance improvement when resizing windows.
2012-05-25 17:31:06 -04:00
Jasper St. Pierre
60c05a0dac window-actor: Add back antialiased window corners
This simply adds fancy arcs to the mask texture. It's still not painted
with GTK+ yet.

https://bugzilla.gnome.org/show_bug.cgi?id=676052
2012-05-25 17:31:05 -04:00
Jasper St. Pierre
c47de98c88 window-actor: Paint the shape region with cairo
https://bugzilla.gnome.org/show_bug.cgi?id=676052
2012-05-21 16:12:30 -04:00
Jasper St. Pierre
f1aada0fae window-actor: Punt mask generation to MetaWindowActor
This effectively makes MetaShapedTexture not a MetaShapedTexture, but a simple
and dumb MetaMaskedTexture, with an optimization for clipped regions.

We're doing this as the mask may need to be more complicated than made of
a cairo path -- we eventually want GTK+ to draw the entire frame background,
which we'll then scan.

https://bugzilla.gnome.org/show_bug.cgi?id=676052
2012-05-21 16:12:30 -04:00
Jasper St. Pierre
4de492eb20 shaped-texture: Remove the cairo overlay (and rounded corners)
As we want GTK+ to paint the mask on an A8, we can't simply use a cairo
path. A later commit will make this into a simple masked texture, and
meta-window-actor will be in control of the mask.

https://bugzilla.gnome.org/show_bug.cgi?id=676052
2012-05-21 16:12:30 -04:00
Jasper St. Pierre
9ca00d5cce window-actor: Remove an unnecessary frame check
meta_frame_calc_borders will zero out the borders if we don't have a frame.

https://bugzilla.gnome.org/show_bug.cgi?id=676052
2012-05-21 16:12:30 -04:00
Jasper St. Pierre
878b1012b4 window-actor: Another simple clang warning fix
If we explicitly check for a NULL pointer, clang will assume
that the pointer may be NULL at some point. We clearly rely
on the pointer being non-NULL earlier, so fix this guy up.

https://bugzilla.gnome.org/show_bug.cgi?id=674876
2012-05-01 18:25:33 -04:00