1
0
Fork 0
Commit graph

24718 commits

Author SHA1 Message Date
Rafael Fontenelle
8e52f8c61e Updated Brazilian Portuguese translation 2015-09-20 14:05:56 +00:00
Anders Jonsson
f5f2b2ee7a Updated Swedish translation 2015-09-20 12:49:21 +00:00
Ask Hjorth Larsen
5cf6c80c9b Updated Danish translation 2015-09-19 16:24:08 +00:00
Rūdolfs Mazurs
53372f69fd Updated Latvian translation 2015-09-18 22:23:06 +03:00
Murray Cumming
85e0b08459 CoglBufferError: Remove trailing comma from enum.
This is helpful for C++ with g++'s -pedantic warnings complain
about it.
2015-09-17 17:11:57 +02:00
Stas Solovey
2e554db8cf Updated Russian translation 2015-09-17 11:26:45 +00:00
Jonas Ådahl
b7aca07844 Revert "launcher: simplify getting session dbus proxy"
Signals are sent to a specific ID, so we can't use "self" here. After
this revert, VT switching works again.

This reverts commit 8e22bf5bc9.

https://bugzilla.gnome.org/show_bug.cgi?id=753434
2015-09-17 12:17:45 +08:00
Florian Müllner
dc780d2c44 launcher: Don't pass variable as format string
We know the variable only contains one or another string literal,
but keep compilers happy as well.
2015-09-16 17:38:10 +02:00
Florian Müllner
c49b284643 Bump version to 3.17.92
Update NEWS.
2015-09-16 17:19:56 +02:00
Emmanuele Bassi
909faa33a4 Post-release version bump to 1.22.1 2015-09-16 15:16:51 +01:00
Emmanuele Bassi
7d208a234a Release Cogl 1.22.0 2015-09-16 15:12:59 +01:00
Emmanuele Bassi
5fecf2b293 Post-release version bump to 1.24.1 2015-09-15 13:12:09 +01:00
Emmanuele Bassi
d490477f4e Release Clutter 1.24.0 2015-09-15 12:46:44 +01:00
Lionel Landwerlin
0e7b18832a cogl: reset pending swaps counter on unrealize
When removing the frame callback on the CoglOnscreen, we loose the ability
to get notified of swap events. This could leave us with a counter != 0
which leads to a deadlock situation after the next realize/draw cycle.

https://bugzilla.gnome.org/show_bug.cgi?id=755014
2015-09-15 12:29:05 +01:00
Lionel Landwerlin
ff1a5aae7a x11: stage window: reset framebuffer on foreign window unrealize
Similarly to 13dbb74c81, we need to reset the
framebuffer in the x11 for foreign windows.

https://bugzilla.gnome.org/show_bug.cgi?id=755014
2015-09-15 12:29:04 +01:00
Lionel Landwerlin
6c7f624f69 master-clock-default: prevent deadlock with GLX_INTEL_swap_event
If we call _clutter_stage_do_update() on a ClutterStage that isn't
mapped/visible, no GL command will be queued, and the Mesa/DRI2
implementation of SwapBuffers will do nothing. This causes
GLX_INTEL_swap_event to not be emitted by the X server because no swapping
has been requested through DRI2 and it eventually leads to a deadlock
situation in ClutterStageCogl because we're waiting for an event before we
start the next draw cycle.

This patch removes the non mapped stages from the list of stages to process.
This is consistent with a previous patch for the ClutterMasterClockGdk [1].

[1] : 5733ad58e5

https://bugzilla.gnome.org/show_bug.cgi?id=755014
2015-09-15 12:23:08 +01:00
Lionel Landwerlin
ee98a5bbe8 gdk: x11: notify Cogl immediately of a foreign window resize
We want to avoid waiting for the acknowledgement event from the X
server as we might redraw the stage before that happens.

This patch reimplements a bit of logic already in clutter-gtk [1].

[1] : https://git.gnome.org/browse/clutter-gtk/tree/clutter-gtk/gtk-clutter-embed.c#n723

https://bugzilla.gnome.org/show_bug.cgi?id=754993
2015-09-14 13:49:08 +01:00
Lionel Landwerlin
aeb19f2f4d gdk: move sync_to_vblank setup from master clock to backend
Setting up the sync_to_vblank in the MasterClock is a bit too late as
the MasterClock can be created after a StageWindow has been created
and realized (and therefore all of its Cogl/GL state setup already).
So move the setup to the backend, prior to any StageWindow creation.

https://bugzilla.gnome.org/show_bug.cgi?id=754938
2015-09-14 13:46:31 +01:00
Marek Černocký
9f1db3f1b8 Updated Czech translation 2015-09-14 13:24:00 +02:00
Jonas Ådahl
0373b854c1 MetaCursorRenderer: Rely on update_cursor for redrawing
Calling queue_redraw() in _force_update() is not needed because
update_cursor() will do this when needed, i.e. when switching between
hardware cursor and texture cursor, or when drawing with texture cursor.

There is also no need to force _native_force_update() because
update_cursor() will cover this as well when needed. When not changing
cursor but only the gbm_bo, the "dirty" boolean on the gbm_bo will
trigger a redraw.

https://bugzilla.gnome.org/show_bug.cgi?id=744932
2015-09-13 21:26:22 +08:00
Jonas Ådahl
5d837a5c85 wayland: Support sending wl_surface.enter/leave to cursor surfaces
Support notifying clients about what outputs their cursor surfaces are
on so that they can attach appropriately scaled buffers to them.

https://bugzilla.gnome.org/show_bug.cgi?id=744932
2015-09-13 21:26:22 +08:00
Jonas Ådahl
79c86ae890 Support scaling of cursor sprites given what output they are on
This commits refactors cursor handling code and plugs in logic so that
cursor sprites changes appearance as it moves across the screen.
Renderers are adapted to handle the necessary functionality.

The logic for changing the cursor sprite appearance is done outside of
MetaCursorSprite, and actually where depends on what type of cursor it
is. In mutter we now have two types of cursors that may have their
appearance changed:

 - Themed cursors (aka root cursors)
 - wl_surface cursors

Themed cursors are created by MetaScreen and when created, when
applicable(*), it will extend the cursor via connecting to a signal
which is emitted everytime the cursor is moved. The signal handler will
calculate the expected scale given the monitor it is on and reload the
theme in a correct size when needed.

wl_surface cursors are created when a wl_surface is assigned the
"cursor" role, i.e. when a client calls wl_pointer.set_cursor. A
cursor role object is created which is connected to the cursor object
by the position signal, and will set a correct texture scale given what
monitor the cursor is on and what scale the wl_surface's active buffer
is in. It will also push new buffers to the same to the cursor object
when new ones are committed to the surface.

This commit also makes texture loading lazy, since the renderer doesn't
calculate a rectangle when the cursor position changes.

The native backend is refactored to be triple-buffered; see the comment
in meta-cursor-renderer-native.c for further explanations.

* when we are running as a Wayland compositor

https://bugzilla.gnome.org/show_bug.cgi?id=744932
2015-09-13 21:26:22 +08:00
Jonas Ådahl
7c7cf91c32 wayland: Move cursor surface role to meta-wayland-pointer.c
The wl_pointer assigns a role to a wl_surface, so it makes sense to put
the related logic there.

https://bugzilla.gnome.org/show_bug.cgi?id=744932
2015-09-13 21:26:22 +08:00
Jonas Ådahl
e407f5bbae MetaCursorSprite: Squash MetaCurorImage into MetaCursorSprite
It fills little purpose on separating into a MetaCursorImage struct, so
lets squash in the three fields into the MetaCursorSprite object.

https://bugzilla.gnome.org/show_bug.cgi?id=744932
2015-09-13 21:26:22 +08:00
Jonas Ådahl
8900bd2f5c backends/x11: Draw our own cursor sprite when running nested
Use a specialized cursor renderer when running as a nested Wayand
compositor. This new renderer sets an empty X11 cursor and draws the
cursor as part of the stage using the generic cursor renderer drawing
path.

https://bugzilla.gnome.org/show_bug.cgi?id=744932
2015-09-13 21:26:22 +08:00
Jonas Ådahl
83c17134f1 wayland: GObject:ify surface roles
Make a surface roles into objects with vfuncs for things where there
before was a big switch statement. The declaration and definition
boilerplate is hidden behind C macros.

https://bugzilla.gnome.org/show_bug.cgi?id=744932
2015-09-13 21:24:58 +08:00
Jonas Ådahl
8e5fb03611 MetaWaylandSurface: Don't respond to frame callback when role unassigned
If a surface doesn't have a role, the compositor will not know how, if
or when it will be painted. By adding it to the compositor frame
callback list, the compositor will respond to the client that the
surface has been drawn already which might not be true.

Instead, queue the frame callback in a list that is then processed when
the surface gets a role assigned. The compositor may then, given the
role the surface got, queue the frame callback accordingly.

https://bugzilla.gnome.org/show_bug.cgi?id=744932
2015-09-13 21:24:58 +08:00
Jonas Ådahl
dece49b53d wayland: Introduce XWayland surface role
Being a "XWayland window" should be considered equivalent to a role,
even though it is not part of any protocol anywhere. The commit doesn't
have any functional difference, but just makes it clear that an
wl_surface managed by XWayland have the same type of special casing as
surface roles as defined by the Wayland protocol.

As the semantics are more explicit given the role is defined, a comment
explaining why the semantics need to be how they are was added.

https://bugzilla.gnome.org/show_bug.cgi?id=744932
2015-09-13 21:24:58 +08:00
Bernd Homuth
53bbd4801f Updated German translation 2015-09-13 05:27:22 +00:00
Lionel Landwerlin
13dbb74c81 gdk: stage window: reset framebuffer on foreign window unrealize
Clutter still uses part of the deprecated stateful API of Cogl (in
particulart cogl_set_framebuffer). It means Cogl can keep an internal
reference to the onscreen object we rendered to. In the case of
foreign window, we want to avoid this, as we don't know what's going
to happen to that window.

This change sets the current Cogl framebuffer to a dummy 1x1
framebuffer if the current Cogl framebuffer is the one we're
unrealizing.

https://bugzilla.gnome.org/show_bug.cgi?id=754890
2015-09-12 00:39:43 +02:00
Lionel Landwerlin
cb4e88884b gdk: master clock: hook ourselves to the paint signal
We're currently hooked to the "update" signal of the FrameClock. When
embedding Clutter inside GTK+ we want to have the layout phase of GTK+
to notify us the size of our stage.

This patch change to FrameClock signal we're listening to, to the
"paint" signal to make sure we've received the layout information from
GTK+, before painting. Otherwise we paint with a delay of one frame.

https://bugzilla.gnome.org/show_bug.cgi?id=754889
2015-09-12 00:39:43 +02:00
Lionel Landwerlin
00ea695ce2 winsys: glx: fix crash when inspecting onscreens
An unallocated onscreen might have a NULL winsys field.

https://bugzilla.gnome.org/show_bug.cgi?id=754888
2015-09-11 17:34:39 +02:00
Jonas Ådahl
5d83260b19 actor: Fix transforming stage point when scale is less than 1
The commit 6cd24faaa5 (actor: Clean up
transform_stage_point()) changed the validation of the transformation
matrix to ignore the fraction part of the determinant. This caused
clutter_actor_transform_stage_point() to fail and return FALSE for
actors which scale was less than 1.

Previously the validation was ('det' being a float):
	det = (RQ[0][0] * ST[0][0])
	    + (RQ[0][1] * ST[0][1])
	    + (RQ[0][2] * ST[0][2]);
	if (!det)
		return FALSE;

Semantically, the if statement expression '!det' is equivalent to
'det == 0', i.e. 'det == 0.0f'. Post cleanup patches, 'det' was turned
into a double, and the if statement was changed to:

	if (CLUTTER_NEARBYINT (det) == 0)
		return FALSE;

which, different from before, rounds the determinant to the nearest
integer value, meaning determinant in the range (-0.5, 0.5) would be
considered invalid.

This patch reverts this part to the old behavior, while, because of the
inexact nature of floating point arithmetics, allowing a bit more liberal
meaning of "equals to 0" than '== 0.0'.

https://bugzilla.gnome.org/show_bug.cgi?id=754766
2015-09-11 10:36:52 +08:00
Dušan Kazik
63813ad398 Updated Slovak translation 2015-09-10 17:28:07 +00:00
Olivier Fourdan
443d579d40 wayland: do not crash if the surface is gone
If a queued event is being processed after the surface is
destroyed, trying to access the window associated with the surface
will lead to a segmentation fault.

This patch avoids the crash by first checking if the surface is not null.

https://bugzilla.gnome.org/show_bug.cgi?id=754715
2015-09-09 09:30:14 +02:00
Matej Urbančič
763a04e4dd Updated Slovenian translation 2015-09-08 23:13:13 +02:00
Ting-Wei Lan
5066eaf691 build: Fix non-wayland build
This fixes build error caused by commit 614d6bd. We can simply remove
the usage of meta-wayland.c functions in non-wayland build because
META_BACKEND_X11_MODE_NESTED is only used in wayland.

https://bugzilla.gnome.org/show_bug.cgi?id=753948
2015-09-08 01:50:03 +08:00
Lionel Landwerlin
9432e67ee8 gdk: stage: create subsurface when dealing with foreign windows on wayland
It is safer to create our own wayland surface when rendering into
someone else GdkWindow, otherwise we might draw somewhere we didn't
intend to.

https://bugzilla.gnome.org/show_bug.cgi?id=754697
2015-09-07 18:17:10 +01:00
Lionel Landwerlin
3771ef2f08 gdk: stage: report geometry of the underlying surface for foreign windows
When running on wayland, we might have our own subsurface
desynchronized from the foreign GdkWindow. It is important that we
report the size of the actually surface we're rendering to, otherwise
the logic in ClutterStage might discard resize operation that
resynchronize the subsurface with the stage's size.

https://bugzilla.gnome.org/show_bug.cgi?id=754697
2015-09-07 18:17:10 +01:00
Lionel Landwerlin
55dce70440 gdk: stage: do not ensure native windows are created with foreign windows
For foreign windows this should be dealt with by the embedding
framework. In particular on Wayland with foreign windows, we might
want to create a subsurface and use the foreign window only for events
and frame clock synchronization.

https://bugzilla.gnome.org/show_bug.cgi?id=754697
2015-09-07 18:17:10 +01:00
Lionel Landwerlin
a9b38fefdc gdk: stage: disable some operations for foreign windows
Some operations like :
     * resize
     * show/hide
     * set_title
     * set_user_resizable

should be handled by the embedding framework, so disable them for
foreign windows.

https://bugzilla.gnome.org/show_bug.cgi?id=754671
2015-09-07 18:17:10 +01:00
Lionel Landwerlin
5733ad58e5 gdk: master clock: only process mapped & realized stages
When using Clutter embed inside a Gtk application, a stage might end
up realized but not visible. In this case we might discard doing any
kind of animation processing.

https://bugzilla.gnome.org/show_bug.cgi?id=754671
2015-09-07 18:17:09 +01:00
Lionel Landwerlin
6183eb3632 gdk: master-clock: disable vsync throttling
When running with a master clock based on the GdkFrameClock, we get
synchronized with the compositor, so no need for throttling rendering.

In particular when dealing with foreign windows, we run into deadlocks
in Mesa because of the way the Mesa wayland backend is implemented [1].

[1] : http://cgit.freedesktop.org/mesa/mesa/tree/src/egl/drivers/dri2/platform_wayland.c#n330

https://bugzilla.gnome.org/show_bug.cgi?id=754671
2015-09-07 18:17:09 +01:00
Lionel Landwerlin
4cb750928e winsys: wayland: destroy eglsurface when destroying associated native window
On Wayland deinit() of an onscreen buffer is going to destroy the
associated native window of an EGLSurface. So we should destroy the
EGLSurface as well otherwise we might end up confusing the GL driver.

We also currently guard against setting a EGL_NO_SURFACE as current
EGLSurface, but this shouldn't be a problem if we have a surfaceless
context. So we allow surface destruction under that condition.

https://bugzilla.gnome.org/show_bug.cgi?id=754667
2015-09-07 17:27:50 +01:00
Javier Jardón
6ea7fa9973 xwayland: Add missing include
https://bugzilla.gnome.org/show_bug.cgi?id=754621
2015-09-07 14:13:48 +01:00
Marek Chalupa
79f755bf0f launcher: find the right drm device
Instead of hard-coding /dev/dri/card0, find the device
that has boot_vga flag set or has been explicitly
assigned a seat id other than seat0

https://bugzilla.gnome.org/show_bug.cgi?id=753434
2015-09-07 08:42:21 -04:00
Marek Chalupa
1845bfe1b6 launcher: refactor handling errors in meta_launcher_new
Fill in missing error checks and use g_error, since any
error in this phase would lead to crash later anyway.
This way we'll at least know what went wrong.

Although it was not the patch's original intention, it fixes
https://bugzilla.gnome.org/show_bug.cgi?id=754520

https://bugzilla.gnome.org/show_bug.cgi?id=753434
2015-09-07 08:40:49 -04:00
Marek Chalupa
8e22bf5bc9 launcher: simplify getting session dbus proxy
Use path "/org/freedesktop/login1/session/self" instead of
getting session id and building the path manually

https://bugzilla.gnome.org/show_bug.cgi?id=753434
2015-09-07 08:40:20 -04:00
Marek Chalupa
c13ddafdb8 native: remove obsolete comment
There's not weston-launch anymore

https://bugzilla.gnome.org/show_bug.cgi?id=753434
2015-09-07 08:39:38 -04:00
Jonas Ådahl
94513726de wayland: Clean up surface role assignment
Use a better name, use GNOME conventions for error handling, open code the
client error reporting and send the error to the correct resource.
wl_subcompositor doesn't have a role error yet, so continue use some
other error. The only effect of this is error received in the client will
be a bit confusing, it will still be disconnected.

https://bugzilla.gnome.org/show_bug.cgi?id=754215
2015-09-07 17:41:14 +08:00