Skip to content

Commit

Permalink
Ignore X errors when applying xrandr configuration (fixes CSD crashes…
Browse files Browse the repository at this point in the history
… with NVIDIA cards linuxmint/cinnamon-settings-daemon#52)

Ignore X errors when performing BG crossfade (should make it more stable and we might use it again in 2.8 as a result)
  • Loading branch information
clefebvre committed Jun 22, 2015
1 parent 15af3e9 commit dab0d63
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libcinnamon-desktop/gnome-bg-crossfade.c
Expand Up @@ -388,6 +388,7 @@ static void
draw_background (GnomeBGCrossfade *fade)
{
if (gdk_window_get_window_type (fade->priv->window) == GDK_WINDOW_ROOT) {
gdk_error_trap_push ();
XClearArea (GDK_WINDOW_XDISPLAY (fade->priv->window),
GDK_WINDOW_XID (fade->priv->window),
0, 0,
Expand All @@ -398,6 +399,7 @@ draw_background (GnomeBGCrossfade *fade)
send_root_property_change_notification (fade);

gdk_flush ();
gdk_error_trap_pop (); // ignore errors
} else {
gdk_window_invalidate_rect (fade->priv->window, NULL, FALSE);
gdk_window_process_updates (fade->priv->window, FALSE);
Expand Down
4 changes: 4 additions & 0 deletions libcinnamon-desktop/gnome-rr-config.c
Expand Up @@ -1298,6 +1298,8 @@ gnome_rr_config_apply_with_time (GnomeRRConfig *config,
g_return_val_if_fail (GNOME_IS_RR_CONFIG (config), FALSE);
g_return_val_if_fail (GNOME_IS_RR_SCREEN (screen), FALSE);

gdk_error_trap_push ();

outputs = make_outputs (config);

assignment = crtc_assignment_new (screen, outputs, error);
Expand All @@ -1313,7 +1315,9 @@ gnome_rr_config_apply_with_time (GnomeRRConfig *config,

crtc_assignment_free (assignment);


gdk_flush ();
gdk_error_trap_pop (); // ignore errors
}

return result;
Expand Down

0 comments on commit dab0d63

Please sign in to comment.