mir: return whether a foreign connection has been set or not
This commit is contained in:
parent
e06a0b3d10
commit
8e6997db44
@ -49,10 +49,12 @@ COGL_BEGIN_DECLS
|
||||
* to work with instead of leaving Cogl to automatically connect to a
|
||||
* mir server.
|
||||
*
|
||||
* Returns: whether @connection has been marked as been set as connection or not.
|
||||
*
|
||||
* Since: 1.8
|
||||
* Stability: unstable
|
||||
*/
|
||||
void
|
||||
CoglBool
|
||||
cogl_mir_renderer_set_foreign_connection (CoglRenderer *renderer,
|
||||
MirConnection *connection);
|
||||
|
||||
|
@ -626,17 +626,18 @@ _cogl_winsys_onscreen_set_visibility (CoglOnscreen *onscreen,
|
||||
mir_surface_set_state (mir_onscreen->mir_surface, new_state);
|
||||
}
|
||||
|
||||
void
|
||||
CoglBool
|
||||
cogl_mir_renderer_set_foreign_connection (CoglRenderer *renderer,
|
||||
MirConnection *connection)
|
||||
MirConnection *connection)
|
||||
{
|
||||
_COGL_RETURN_IF_FAIL (cogl_is_renderer (renderer));
|
||||
_COGL_RETURN_IF_FAIL (mir_connection_is_valid (connection));
|
||||
_COGL_RETURN_VAL_IF_FAIL (cogl_is_renderer (renderer), FALSE);
|
||||
_COGL_RETURN_VAL_IF_FAIL (mir_connection_is_valid (connection), FALSE);
|
||||
|
||||
/* NB: Renderers are considered immutable once connected */
|
||||
_COGL_RETURN_IF_FAIL (!renderer->connected);
|
||||
_COGL_RETURN_VAL_IF_FAIL (!renderer->connected, FALSE);
|
||||
|
||||
renderer->foreign_mir_connection = connection;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
MirConnection *
|
||||
|
Loading…
Reference in New Issue
Block a user