Compare commits
5 Commits
pwood/fix-
...
wip/carlos
Author | SHA1 | Date | |
---|---|---|---|
![]() |
44029116fc | ||
![]() |
d0ef660ff6 | ||
![]() |
506e06589b | ||
![]() |
1d75d5aa2f | ||
![]() |
645d596f9d |
@@ -74,7 +74,7 @@ PangoFontMap *
|
||||
cogl_pango_font_map_new (void)
|
||||
{
|
||||
PangoFontMap *fm = pango_cairo_font_map_new ();
|
||||
CoglPangoFontMapPriv *priv = g_new0 (CoglPangoFontMapPriv, 1);
|
||||
g_autofree CoglPangoFontMapPriv *priv = g_new0 (CoglPangoFontMapPriv, 1);
|
||||
|
||||
_COGL_GET_CONTEXT (context, NULL);
|
||||
|
||||
@@ -85,7 +85,7 @@ cogl_pango_font_map_new (void)
|
||||
* for now. */
|
||||
g_object_set_qdata_full (G_OBJECT (fm),
|
||||
cogl_pango_font_map_get_priv_key (),
|
||||
priv,
|
||||
g_steal_pointer (&priv),
|
||||
free_priv);
|
||||
|
||||
return fm;
|
||||
|
@@ -93,10 +93,12 @@ _cogl_onscreen_init_from_template (CoglOnscreen *onscreen,
|
||||
CoglOnscreen *
|
||||
_cogl_onscreen_new (void)
|
||||
{
|
||||
CoglOnscreen *onscreen = g_new0 (CoglOnscreen, 1);
|
||||
g_autofree CoglOnscreen *onscreen_ptr = g_new0 (CoglOnscreen, 1);
|
||||
CoglOnscreen *onscreen;
|
||||
|
||||
_COGL_GET_CONTEXT (ctx, NULL);
|
||||
|
||||
onscreen = g_steal_pointer (&onscreen_ptr);
|
||||
_cogl_framebuffer_init (COGL_FRAMEBUFFER (onscreen),
|
||||
ctx,
|
||||
COGL_FRAMEBUFFER_TYPE_ONSCREEN,
|
||||
|
@@ -50,7 +50,7 @@ struct _CoglPipelineCache
|
||||
CoglPipelineCache *
|
||||
_cogl_pipeline_cache_new (void)
|
||||
{
|
||||
CoglPipelineCache *cache = g_new (CoglPipelineCache, 1);
|
||||
g_autofree CoglPipelineCache *cache = g_new (CoglPipelineCache, 1);
|
||||
unsigned long vertex_state;
|
||||
unsigned long layer_vertex_state;
|
||||
unsigned int fragment_state;
|
||||
@@ -80,7 +80,7 @@ _cogl_pipeline_cache_new (void)
|
||||
layer_vertex_state | layer_fragment_state,
|
||||
"programs");
|
||||
|
||||
return cache;
|
||||
return g_steal_pointer (&cache);
|
||||
}
|
||||
|
||||
void
|
||||
|
@@ -2179,6 +2179,7 @@ meta_input_settings_get_pad_button_action (MetaInputSettings *input_settings,
|
||||
|
||||
static gboolean
|
||||
cycle_logical_monitors (MetaInputSettings *settings,
|
||||
gboolean skip_all_monitors,
|
||||
MetaLogicalMonitor *current_logical_monitor,
|
||||
MetaLogicalMonitor **next_logical_monitor)
|
||||
{
|
||||
@@ -2188,7 +2189,8 @@ cycle_logical_monitors (MetaInputSettings *settings,
|
||||
GList *logical_monitors;
|
||||
|
||||
/* We cycle between:
|
||||
* - the span of all monitors (current_output = NULL)
|
||||
* - the span of all monitors (current_output = NULL), only for
|
||||
* non-integrated devices.
|
||||
* - each monitor individually.
|
||||
*/
|
||||
|
||||
@@ -2206,6 +2208,8 @@ cycle_logical_monitors (MetaInputSettings *settings,
|
||||
l = g_list_find (logical_monitors, current_logical_monitor);
|
||||
if (l->next)
|
||||
*next_logical_monitor = l->next->data;
|
||||
else if (skip_all_monitors)
|
||||
*next_logical_monitor = logical_monitors->data;
|
||||
else
|
||||
*next_logical_monitor = NULL;
|
||||
}
|
||||
@@ -2221,6 +2225,7 @@ meta_input_settings_cycle_tablet_output (MetaInputSettings *input_settings,
|
||||
DeviceMappingInfo *info;
|
||||
MetaLogicalMonitor *logical_monitor = NULL;
|
||||
const gchar *edid[4] = { 0 }, *pretty_name = NULL;
|
||||
gboolean is_integrated_device = FALSE;
|
||||
#ifdef HAVE_LIBWACOM
|
||||
WacomDevice *wacom_device;
|
||||
#endif
|
||||
@@ -2239,11 +2244,9 @@ meta_input_settings_cycle_tablet_output (MetaInputSettings *input_settings,
|
||||
|
||||
if (wacom_device)
|
||||
{
|
||||
/* Output rotation only makes sense on external tablets */
|
||||
if (libwacom_get_integration_flags (wacom_device) != WACOM_DEVICE_INTEGRATED_NONE)
|
||||
return;
|
||||
|
||||
pretty_name = libwacom_get_name (wacom_device);
|
||||
is_integrated_device =
|
||||
libwacom_get_integration_flags (wacom_device) != WACOM_DEVICE_INTEGRATED_NONE;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -2251,6 +2254,7 @@ meta_input_settings_cycle_tablet_output (MetaInputSettings *input_settings,
|
||||
NULL, &logical_monitor);
|
||||
|
||||
if (!cycle_logical_monitors (input_settings,
|
||||
is_integrated_device,
|
||||
logical_monitor,
|
||||
&logical_monitor))
|
||||
return;
|
||||
|
@@ -112,7 +112,7 @@ test_cogl_multitexture_main (int argc, char *argv[])
|
||||
GError *error = NULL;
|
||||
ClutterActor *stage;
|
||||
ClutterColor stage_color = { 0x61, 0x56, 0x56, 0xff };
|
||||
TestMultiLayerMaterialState *state = g_new0 (TestMultiLayerMaterialState, 1);
|
||||
g_autofree TestMultiLayerMaterialState *state = g_new0 (TestMultiLayerMaterialState, 1);
|
||||
gfloat stage_w, stage_h;
|
||||
gchar **files;
|
||||
gfloat tex_coords[] =
|
||||
|
@@ -427,7 +427,7 @@ test_client_new (const char *id,
|
||||
MetaWindowClientType type,
|
||||
GError **error)
|
||||
{
|
||||
TestClient *client = g_new0 (TestClient, 1);
|
||||
TestClient *client;
|
||||
GSubprocessLauncher *launcher;
|
||||
GSubprocess *subprocess;
|
||||
MetaWaylandCompositor *compositor;
|
||||
@@ -462,6 +462,7 @@ test_client_new (const char *id,
|
||||
if (!subprocess)
|
||||
return NULL;
|
||||
|
||||
client = g_new0 (TestClient, 1);
|
||||
client->type = type;
|
||||
client->id = g_strdup (id);
|
||||
client->cancellable = g_cancellable_new ();
|
||||
|
@@ -41,7 +41,7 @@ static MetaGroup*
|
||||
meta_group_new (MetaX11Display *x11_display,
|
||||
Window group_leader)
|
||||
{
|
||||
MetaGroup *group;
|
||||
g_autofree MetaGroup *group = NULL;
|
||||
#define N_INITIAL_PROPS 3
|
||||
Atom initial_props[N_INITIAL_PROPS];
|
||||
int i;
|
||||
@@ -91,7 +91,7 @@ meta_group_new (MetaX11Display *x11_display,
|
||||
"Created new group with leader 0x%lx\n",
|
||||
group->group_leader);
|
||||
|
||||
return group;
|
||||
return g_steal_pointer (&group);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Reference in New Issue
Block a user