Fix unitialized value problem when in raise-on-click mode. Søren,

2006-01-20  Elijah Newren  <newren gmail com>

	Fix unitialized value problem when in raise-on-click mode.  Søren,
	#327572.

	* src/display.c (meta_display_check_threshold_reached): make
	function be a no op if raise_on_click!=FALSE

	* src/display.h (struct MetaDisplay): point out that
	grab_initial_[xy] and grab_threshold_movement_reached are only for
	raise_on_click==FALSE mode.
This commit is contained in:
Elijah Newren 2006-01-20 23:02:24 +00:00 committed by Elijah Newren
parent 5568f75cb0
commit 6f318f1a75
3 changed files with 16 additions and 3 deletions

View File

@ -1,3 +1,15 @@
2006-01-20 Elijah Newren <newren gmail com>
Fix unitialized value problem when in raise-on-click mode. Søren,
#327572.
* src/display.c (meta_display_check_threshold_reached): make
function be a no op if raise_on_click!=FALSE
* src/display.h (struct MetaDisplay): point out that
grab_initial_[xy] and grab_threshold_movement_reached are only for
raise_on_click==FALSE mode.
2006-01-20 Elijah Newren <newren gmail com>
Patch from Søren to fix some reading-from-free'd-data errors.

View File

@ -3616,7 +3616,8 @@ meta_display_check_threshold_reached (MetaDisplay *display,
int y)
{
/* Don't bother doing the check again if we've already reached the threshold */
if (display->grab_threshold_movement_reached)
if (display->grab_threshold_movement_reached ||
meta_prefs_get_raise_on_click ())
return;
if (ABS (display->grab_initial_x - x) >= 8 ||

View File

@ -269,8 +269,8 @@ struct _MetaDisplay
MetaRectangle grab_wireframe_rect;
MetaRectangle grab_wireframe_last_xor_rect;
MetaRectangle grab_initial_window_pos;
int grab_initial_x, grab_initial_y;
gboolean grab_threshold_movement_reached;
int grab_initial_x, grab_initial_y; /* These are only relevant for */
gboolean grab_threshold_movement_reached; /* raise_on_click == FALSE. */
MetaResizePopup *grab_resize_popup;
GTimeVal grab_last_moveresize_time;
Time grab_motion_notify_time;