Merge branch 'matthiasc/for-master' into 'master'

Matthiasc/for master

See merge request GNOME/gtk!2805
This commit is contained in:
Matthias Clasen 2020-11-10 16:59:47 +00:00
commit 3cc0870084
6 changed files with 16 additions and 14 deletions

View File

@ -1270,6 +1270,7 @@ configure_surface_geometry (GdkSurface *surface)
monitor = g_list_model_get_item (gdk_display_get_monitors (display), 0);
gdk_monitor_get_geometry (monitor, &monitor_geometry);
g_object_unref (monitor);
bounds_width = monitor_geometry.width;
bounds_height = monitor_geometry.height;

View File

@ -1982,6 +1982,7 @@ calculate_aerosnap_regions (GdkW32DragMoveResizeContext *context)
GdkMonitor *monitor;
monitor = g_list_model_get_item (monitors, monitor_idx);
g_object_unref (monitor);
gdk_win32_monitor_get_workarea (monitor, &wa);
gdk_monitor_get_geometry (monitor, &geometry);

View File

@ -613,10 +613,8 @@ init_randr15 (GdkX11Screen *x11_screen)
notify_surface_monitor_change (x11_display, GDK_MONITOR (monitor));
if (monitor->remove)
{
g_object_ref (monitor);
g_list_store_remove (x11_display->monitors, i);
gdk_monitor_invalidate (GDK_MONITOR (monitor));
g_object_unref (monitor);
}
g_object_unref (monitor);
}
@ -764,11 +762,10 @@ init_randr13 (GdkX11Screen *x11_screen)
notify_surface_monitor_change (x11_display, GDK_MONITOR (monitor));
if (monitor->remove)
{
g_object_ref (monitor);
g_list_store_remove (x11_display->monitors, i);
gdk_monitor_invalidate (GDK_MONITOR (monitor));
g_object_unref (monitor);
}
g_object_unref (monitor);
}
x11_display->primary_monitor = 0;
@ -852,10 +849,8 @@ init_no_multihead (GdkX11Screen *x11_screen)
notify_surface_monitor_change (x11_display, GDK_MONITOR (monitor));
if (monitor->remove)
{
g_object_ref (monitor);
g_list_store_remove (x11_display->monitors, i);
gdk_monitor_invalidate (GDK_MONITOR (monitor));
g_object_unref (monitor);
}
g_object_unref (monitor);
}

View File

@ -983,6 +983,8 @@ header_drag_begin (GtkGestureDrag *gesture,
break;
}
g_object_unref (column);
}
for (i = 0; !self->in_column_resize && i < n; i++)
@ -1049,7 +1051,10 @@ header_drag_end (GtkGestureDrag *gesture,
sequence = gtk_gesture_single_get_current_sequence (GTK_GESTURE_SINGLE (gesture));
if (!gtk_gesture_handles_sequence (GTK_GESTURE (gesture), sequence))
return;
{
g_object_unref (column);
return;
}
for (i = 0; i < g_list_model_get_n_items (G_LIST_MODEL (self->columns)); i++)
{
@ -1531,7 +1536,6 @@ gtk_column_view_remove_column (GtkColumnView *self,
g_object_unref (item);
if (item == column)
break;
}
gtk_column_view_sorter_remove_column (GTK_COLUMN_VIEW_SORTER (self->sorter), column);

View File

@ -1368,11 +1368,14 @@ gtk_font_chooser_widget_ensure_matching_selection (GtkFontChooserWidget *self)
n = g_list_model_get_n_items (G_LIST_MODEL (self->selection));
for (i = 0; i < n; i++)
{
gpointer item = g_list_model_get_item (G_LIST_MODEL (self->selection), i);
gpointer item;
PangoFontFace *face;
PangoFontFamily *family;
PangoFontDescription *merged;
item = g_list_model_get_item (G_LIST_MODEL (self->selection), i);
g_object_unref (item);
if (PANGO_IS_FONT_FAMILY (item))
{
family = item;
@ -1384,14 +1387,10 @@ gtk_font_chooser_widget_ensure_matching_selection (GtkFontChooserWidget *self)
family = pango_font_face_get_family (face);
}
if (!my_pango_font_family_equal (desc_family, pango_font_family_get_name (family)))
{
g_object_unref (face);
continue;
}
continue;
merged = pango_font_face_describe (face);
pango_font_description_merge_static (merged, self->font_desc, FALSE);
g_object_unref (face);
if (pango_font_description_equal (merged, self->font_desc))
{

View File

@ -702,6 +702,8 @@ paper_size_changed (GtkDropDown *combo_box,
g_signal_connect (custom_paper_dialog, "response", G_CALLBACK (custom_paper_dialog_response_cb), dialog);
gtk_window_present (GTK_WINDOW (custom_paper_dialog));
g_object_unref (page_setup);
return;
}