Clutter advertises itself on X11 as implementing the _NET_WM_PING protocol,
which is needed to be able to detect frozen applications; this allows us to
stop the destruction of the stage by blocking the CLUTTER_DELETE event and
wait for user feedback without the Window Manager thinking that the app has
gone unresponsive.
In order to implement the _NET_WM_PING protocol properly, though, we need
to add the _NET_WM_PID property on the Stage window, since the EWMH states:
[_NET_WM_PID] MAY be used by the Window Manager to kill windows which
do not respond to the _NET_WM_PING protocol.
Meaning that an unresponsive Clutter application might not be killable by
the window manager.
Fixes bug:
http://bugzilla.openedhand.com/show_bug.cgi?id=1748
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
* Do _not_ use CLUTTER_MAJORMINOR to define the installation path
for the headers; we must use CLUTTER_API_VERSION for that.
* Do not put the C compiler flags in the INCLUDES directive.
Bases on a patch by: Gary Ching-Pang Lin <glin@novell.com>
It is possible to unset the size of an actor specified with set_width()
and set_height() by using:
clutter_actor_set_size (actor, -1, -1);
Which works by unsetting the :min-*-set and the :natural-*-set properties.
Calling set_width(-1) and set_height(-1) separately, though, doesn't work
thus implicitly breaking the assumption that set_size() is nothing more
than set_width()+set_height(). This was obviously due to the face that
pre-1.0 set_width() and set_height() took an unsigned integer as an
argument.
ClutterActor parses positional and dimensional properties with a
custom deserializer. We need to:
- handle G_TYPE_INT64, the default integer type for JSON-GLib
- use G_TYPE_FLOAT for properties, since Actor switched to it
for the pixel-based ones
This makes ClutterScript work again.
The json-types.h header is found by the mere fact of it being
in the project; if we are compiling against the system JSON-GLib
this could be horribly out of date.
We need to use clutter-json.h, which will include the right
header for us.
JSON-GLib moved to a single include scheme, so we should only include
json-glib.h. If we use the internal copy it doesn't matter, since the
header does the right thing.
The clutter-script-parser.c does not have a copyright and license
notices; even though the LGPL is a per-project license and not a
per-file license, having those notices in every source file is a
good idea.
The OS X backend Makefile.am was missing a line concatenation, and
so the -xobjective-c directive was always ignored.
Instead of dumping everything into INCLUDES and LDADD we should follow
what the rest of the backends do, and use per-target CFLAGS and LDADD,
and reserve the INCLUDES to -D and -I directives.
Thanks to: Christian Hergert <chris@dronelabs.com>
Don't install inside the clutter-MAJOR_MINOR/ directory, but use
the API_VERSION (1.0).
Otherwise we'd have the Clutter headers for 1.x inside:
$includedir/clutter-1.0/clutter
And the JSON-related headers inside:
$includedir/clutter-1.<minor>/clutter
The fix for bug 1750 inside commit b190448e made Clutter-GTK spew
BadWindow errors. The reason for that is that we call XDestroyWindow()
without checking if the old Window is None; this happens if we call
clutter_x11_set_stage_foreign() on a new ClutterStage before it has
been realized.
Since Clutter-GTK does not need to realize the Stage it is going to
embed anymore (the only reason for that was to obtain a proper Visual
but now there's ClutterBackendX11 API for that), the set_stage_foreign()
call is effectively setting the StageX11 Window for the first time.
When we replace the stage Window using a foreign one we also need to
destroy the Window we created, if needed, to avoid leaking resources
all around.
Fixes bug:
http://bugzilla.openedhand.com/show_bug.cgi?id=1750
The "catch all" warning for a the mapped invariant violation is too
generic: it doesn't tell you why the invariant was broken in case
we are trying to map an unparented actor - e.g. through a Clone.
The right gcc define is __GNUC__ not __GNUC_. This typo had the side
effect that we were using the non gcc specific debug macros leading to
a less optmised CLUTTER_NOTE () than one could have dreamed of.
The vertex that should be used by the apply_relative_transform
is the one passed in as const, and the result should be placed
inside the non-const ClutterVertext. Currently, we are using
the latter, and thus the function is completely useless.
We should follow the convention for boxed types initializers of:
<type_name>_from_<another_type> (boxed, value)
For ClutterUnits as well; so:
clutter_units_pixels -> clutter_units_from_pixels
clutter_units_em -> clutter_units_from_em
...
We should still keep the short-hand version as a macro, though.
This makes clutter_stage_win32_show/hide be implementations of
ClutterStageWindowIface rather than overriding the methods in
ClutterActor. This reflects the changes in e4ff24bc for the X11
backend.
In case we are skipping too many frames, we should force the animation
instance to apply the final state of the animated interval inside the
::completed signal handler.
The Stage:offscreen property hasn't been tested for ages, and it
should really just use a FBO, not indirect rendering on a X Pixmap
only on X11. There are better ways anyway to get the current
contents of ClutterStage as a buffer anyway.
We might remove it at any later date, or actually make it work
properly.
When requesting a GLX visual from the X server we should explicitly
set the GL_DEPTH_SIZE and the GL_ALPHA_SIZE bits, otherwise some
functionality might just not work, or work unreliably.
Fixes bug:
http://bugzilla.openedhand.com/show_bug.cgi?id=1723
The GValue wrappers for ClutterShader types should always store
values using GL types (GLfloat, GLint) internally, but give and
take generic C types (float, int) to the Clutter side.
Fixes bug:
http://bugzilla.openedhand.com/show_bug.cgi?id=1359
The HLS to RGB conversion in case the S value is zero is:
R = G = B = luminance
ClutterColor uses a byte (0 to 255) for the R, G and B channels
encoding, while luminance is expressed using a floating point value
in the closed interval [0, 1]; thus the case above becomes:
R = G = B = (luminance * 255)
The clutter_color_from_hls() code is missing the final step of
de-normalizing the luminance value, and so it breaks the roundtrip
colorspace conversion between RGB and HLS.
Fixes bug:
http://bugzilla.openedhand.com/show_bug.cgi?id=1695