From f21f40313f1a22f6d424b4a43b287449e8206e44 Mon Sep 17 00:00:00 2001 From: Brian Cameron Date: Fri, 15 Sep 2006 11:08:41 +0000 Subject: [PATCH] Fixes #356075 2006-09-15 Brian Cameron Fixes #356075 * main.c (apply_config, revert_config): make sure we never pass negative values for the rates. --- capplets/display/ChangeLog | 7 +++++++ capplets/display/main.c | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/capplets/display/ChangeLog b/capplets/display/ChangeLog index 5d65c620f..47861f5f3 100644 --- a/capplets/display/ChangeLog +++ b/capplets/display/ChangeLog @@ -1,3 +1,10 @@ +2006-09-15 Brian Cameron + + Fixes #356075 + + * main.c (apply_config, revert_config): make sure we never pass + negative values for the rates. + 2006-08-18 Rodrigo Moya * main.c (create_dialog): free 'resolution' string after using it, diff --git a/capplets/display/main.c b/capplets/display/main.c index 23bbe7d41..d352794d6 100644 --- a/capplets/display/main.c +++ b/capplets/display/main.c @@ -229,7 +229,7 @@ apply_config (struct DisplayInfo *info) gdk_x11_drawable_get_xid (GDK_DRAWABLE (root_window)), new_res, new_rot, - new_rate, + new_rate > 0 ? new_rate : 0, GDK_CURRENT_TIME); } } @@ -277,7 +277,7 @@ revert_config (struct DisplayInfo *info) gdk_x11_drawable_get_xid (GDK_DRAWABLE (root_window)), screen_info->old_size, screen_info->old_rotation, - screen_info->old_rate, + screen_info->old_rate > 0 ? screen_info->old_rate : 0, GDK_CURRENT_TIME); }