2002-12-08  Havoc Pennington  <hp@pobox.com>

	* README: updates

	* src/window.c (MAX_RESIZES_PER_SECOND): change to 20 instead of
	30, just as an experiment.
	(MOVE_THRESHOLD): change 15 to 20
	(RESIZE_THRESHOLD): change 15 to 20

	* src/util.c (ensure_logfile): kill this function when verbose
	mode is disabled.
This commit is contained in:
Havoc Pennington
2002-12-09 02:53:16 +00:00
committed by Havoc Pennington
parent e0c8b245ef
commit 9c337d0a8f
5 changed files with 247 additions and 63 deletions

View File

@ -117,7 +117,7 @@ bin_PROGRAMS=metacity metacity-theme-viewer
libexec_PROGRAMS=metacity-dialog
EFENCE=
metacity_LDADD= $(EFENCE) @METACITY_LIBS@ $(EFENCE)
metacity_LDADD=@METACITY_LIBS@ $(EFENCE)
metacity_theme_viewer_LDADD= @METACITY_LIBS@ libmetacity-private.la
metacity_dialog_LDADD=@METACITY_LIBS@

View File

@ -64,6 +64,8 @@ static gboolean is_verbose = FALSE;
static gboolean is_debugging = FALSE;
static gboolean replace_current = FALSE;
static int no_prefix = 0;
#ifdef WITH_VERBOSE_MODE
static FILE* logfile = NULL;
static void
@ -110,6 +112,7 @@ ensure_logfile (void)
g_free (filename);
}
}
#endif
gboolean
meta_is_verbose (void)

View File

@ -6117,15 +6117,22 @@ check_moveresize_frequency (MetaWindow *window)
(current_time.tv_usec - window->display->grab_last_moveresize_time.tv_usec))) / 1000.0;
#define EPSILON (1e-6)
#define MAX_RESIZES_PER_SECOND 30.0
#define MAX_RESIZES_PER_SECOND 20.0
if (elapsed >= 0.0 && elapsed < (1000.0 / MAX_RESIZES_PER_SECOND))
return FALSE;
{
meta_verbose ("Delaying move/resize as only %g of %g seconds elapsed\n",
elapsed / 1000.0, 1.0 / MAX_RESIZES_PER_SECOND);
return FALSE;
}
else if (elapsed < (0.0 - EPSILON)) /* handle clock getting set backward */
clear_moveresize_time (window);
/* store latest time */
window->display->grab_last_moveresize_time = current_time;
meta_verbose ("Doing move/resize as %g of %g seconds elapsed\n",
elapsed / 1000.0, 1.0 / MAX_RESIZES_PER_SECOND);
return TRUE;
}
@ -6154,7 +6161,7 @@ update_move (MetaWindow *window,
/* Force a move regardless of time if a certain delta is exceeded,
* so we don't get too out of sync with reality when dropping frames
*/
#define MOVE_THRESHOLD 15
#define MOVE_THRESHOLD 20
if (!check_moveresize_frequency (window) &&
ABS (dx) < MOVE_THRESHOLD && ABS (dy) < MOVE_THRESHOLD)
return;
@ -6226,7 +6233,7 @@ update_resize (MetaWindow *window,
/* Force a move regardless of time if a certain delta
* is exceeded
*/
#define RESIZE_THRESHOLD 15
#define RESIZE_THRESHOLD 20
if (!check_moveresize_frequency (window) &&
ABS (dx) < RESIZE_THRESHOLD && ABS (dy) < RESIZE_THRESHOLD)
return;