Skip to content

Commit d247bc2

Browse files
committed
libcinnamon-desktop: Fix some various build warnings, and an
incorrect free.
1 parent f912ede commit d247bc2

File tree

6 files changed

+10
-13
lines changed

6 files changed

+10
-13
lines changed

libcinnamon-desktop/gnome-bg-crossfade.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ draw_background (GnomeBGCrossfade *fade)
399399
send_root_property_change_notification (fade);
400400

401401
gdk_flush ();
402-
gdk_error_trap_pop (); // ignore errors
402+
gdk_error_trap_pop_ignored (); // ignore errors
403403
} else {
404404
gdk_window_invalidate_rect (fade->priv->window, NULL, FALSE);
405405
gdk_window_process_updates (fade->priv->window, FALSE);

libcinnamon-desktop/gnome-desktop-thumbnail.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,12 @@ gnome_desktop_thumbnail_factory_finalize (GObject *object)
494494

495495
priv = factory->priv;
496496

497-
g_clear_pointer (&priv->thumbnailers, thumbnailer_unref);
497+
if (priv->thumbnailers)
498+
{
499+
g_list_free_full (priv->thumbnailers, (GDestroyNotify)thumbnailer_unref);
500+
priv->thumbnailers = NULL;
501+
}
502+
498503
g_clear_pointer (&priv->mime_types_map, g_hash_table_destroy);
499504

500505
if (priv->monitors)

libcinnamon-desktop/gnome-rr-config.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1469,7 +1469,7 @@ gnome_rr_config_apply_with_time (GnomeRRConfig *config,
14691469

14701470

14711471
gdk_flush ();
1472-
gdk_error_trap_pop (); // ignore errors
1472+
gdk_error_trap_pop_ignored (); // ignore errors
14731473
}
14741474

14751475
if (result == TRUE)

libcinnamon-desktop/gnome-rr-config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ void gnome_rr_output_info_get_vendor (GnomeRROutputInfo *self, gchar*
8484
guint gnome_rr_output_info_get_product (GnomeRROutputInfo *self);
8585
guint gnome_rr_output_info_get_serial (GnomeRROutputInfo *self);
8686
double gnome_rr_output_info_get_aspect_ratio (GnomeRROutputInfo *self);
87-
char *gnome_rr_output_info_get_display_name (GnomeRROutputInfo *self);
87+
const char *gnome_rr_output_info_get_display_name (GnomeRROutputInfo *self);
8888

8989
gboolean gnome_rr_output_info_get_primary (GnomeRROutputInfo *self);
9090
void gnome_rr_output_info_set_primary (GnomeRROutputInfo *self, gboolean primary);

libcinnamon-desktop/gnome-rr-output-info.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ double gnome_rr_output_info_get_aspect_ratio (GnomeRROutputInfo *self)
264264
*
265265
* Returns: (transfer none): the display name of this output
266266
*/
267-
char *gnome_rr_output_info_get_display_name (GnomeRROutputInfo *self)
267+
const char *gnome_rr_output_info_get_display_name (GnomeRROutputInfo *self)
268268
{
269269
g_return_val_if_fail (GNOME_IS_RR_OUTPUT_INFO (self), NULL);
270270

libcinnamon-desktop/gnome-rr.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2162,7 +2162,6 @@ set_crtc_scale (GnomeRRCrtc *crtc,
21622162
{
21632163
gchar *filter;
21642164
float real_scale;
2165-
int i;
21662165
int looks_like_w, looks_like_h;
21672166

21682167
real_scale = global_scale / scale;
@@ -2761,13 +2760,6 @@ gnome_rr_crtc_get_gamma (GnomeRRCrtc *crtc, int *size,
27612760
* apps to work, and it's better to just be tiny */
27622761
#define HIDPI_MIN_HEIGHT 1500
27632762

2764-
static gboolean
2765-
is_logical_size_large_enough (int width,
2766-
int height)
2767-
{
2768-
return height > HIDPI_MIN_SCALED_HEIGHT;
2769-
}
2770-
27712763
static gboolean
27722764
is_scale_valid_for_size (float width,
27732765
float height,

0 commit comments

Comments
 (0)