[Xfce4-commits] r23580 - xfwm4/trunk/src
Olivier Fourdan
olivier at xfce.org
Wed Nov 1 01:27:24 CET 2006
Author: olivier
Date: 2006-11-01 00:27:21 +0000 (Wed, 01 Nov 2006)
New Revision: 23580
Modified:
xfwm4/trunk/src/client.c
xfwm4/trunk/src/client.h
Log:
Get rid of resize limit speed for good.
Modified: xfwm4/trunk/src/client.c
===================================================================
--- xfwm4/trunk/src/client.c 2006-10-31 23:56:13 UTC (rev 23579)
+++ xfwm4/trunk/src/client.c 2006-11-01 00:27:21 UTC (rev 23580)
@@ -80,14 +80,6 @@
(c->wmhints->initial_state == IconicState) && \
!clientIsValidTransientOrModal (c))
-#ifndef EPSILON
-#define EPSILON (1e-6)
-#endif
-
-#ifndef MAX_RESIZES_PER_SECOND
-#define MAX_RESIZES_PER_SECOND 0.0
-#endif
-
#define OPACITY_SET_STEP (guint) 0x16000000
#define OPACITY_SET_MIN (guint) 0x40000000
@@ -134,54 +126,7 @@
return myScreenGetXDisplay (c->screen_info);
}
-/*
- * The following two functions are to limit the number of updates
- * during resize operations.
- * It's taken from Metacity
- */
void
-clientClearLastOpTime (Client * c)
-{
- g_return_if_fail (c != NULL);
-
- TRACE ("entering clientClearLastOpTime");
- c->last_op_time.tv_sec = 0;
- c->last_op_time.tv_usec = 0;
-}
-
-static gboolean
-clientCheckLastOpTime (Client * c)
-{
- GTimeVal current_time;
- gdouble elapsed;
-
- g_return_val_if_fail (c != NULL, FALSE);
-
- if (!(MAX_RESIZES_PER_SECOND > 0.0))
- {
- return TRUE;
- }
-
- g_get_current_time (¤t_time);
- /* use milliseconds, 1000 milliseconds/second */
- elapsed = ((gdouble) (current_time.tv_sec - c->last_op_time.tv_sec)) * G_USEC_PER_SEC +
- ((gdouble) (current_time.tv_usec - c->last_op_time.tv_usec)) / 1000.0;
-
- if (elapsed >= 0.0 && elapsed < (1000.0 / MAX_RESIZES_PER_SECOND))
- {
- return FALSE;
- }
- else if (elapsed < (0.0 - EPSILON))
- {
- /* clock screw */
- clientClearLastOpTime (c);
- }
- c->last_op_time = current_time;
-
- return TRUE;
-}
-
-void
clientInstallColormaps (Client * c)
{
XWindowAttributes attr;
@@ -1785,8 +1730,6 @@
wc.height = c->height;
clientConfigure (c, &wc, CWX | CWY | CWHeight | CWWidth, CFG_NOTIFY | CFG_FORCE_REDRAW);
- /* Clear time counter */
- clientClearLastOpTime (c);
/* net_wm_user_time standard */
clientGetUserTime (c);
@@ -4006,7 +3949,7 @@
{
clientDrawOutline (c);
}
- else if (clientCheckLastOpTime (c))
+ else
{
wc.x = c->x;
wc.y = c->y;
@@ -4046,7 +3989,7 @@
{
clientDrawOutline (c);
}
- else if (clientCheckLastOpTime (c))
+ else
{
wc.x = c->x;
wc.y = c->y;
@@ -4074,7 +4017,6 @@
if (xevent->type == ButtonRelease)
{
resizing = FALSE;
- clientClearLastOpTime (c);
}
if (!passdata->grab && screen_info->params->box_resize)
{
@@ -4197,14 +4139,11 @@
}
else
{
- if (clientCheckLastOpTime (c))
- {
- wc.x = c->x;
- wc.y = c->y;
- wc.width = c->width;
- wc.height = c->height;
- clientConfigure (c, &wc, configure_flags, NO_CFG_FLAG);
- }
+ wc.x = c->x;
+ wc.y = c->y;
+ wc.width = c->width;
+ wc.height = c->height;
+ clientConfigure (c, &wc, configure_flags, NO_CFG_FLAG);
}
}
Modified: xfwm4/trunk/src/client.h
===================================================================
--- xfwm4/trunk/src/client.h 2006-10-31 23:56:13 UTC (rev 23579)
+++ xfwm4/trunk/src/client.h 2006-11-01 00:27:21 UTC (rev 23580)
@@ -256,7 +256,6 @@
int button_pressed[BUTTON_COUNT];
int struts[12];
gchar *name;
- GTimeVal last_op_time;
Time user_time;
unsigned long flags;
unsigned long wm_flags;
More information about the Xfce4-commits
mailing list