mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 09:30:45 -05:00
New function. Use it here to synchronize with the hardware between each
Mon Aug 9 05:38:33 2004 Soeren Sandmann <sandmann@daimi.au.dk> * src/effects.c (graphics_sync): New function. * src/effects.c (effects_draw_box_animation_timeout): Use it here to synchronize with the hardware between each frame.
This commit is contained in:
parent
5f1de4bf7a
commit
766d46b70d
@ -1,3 +1,9 @@
|
|||||||
|
Mon Aug 9 05:38:33 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||||
|
|
||||||
|
* src/effects.c (graphics_sync): New function.
|
||||||
|
* src/effects.c (effects_draw_box_animation_timeout): Use it here
|
||||||
|
to synchronize with the hardware between each frame.
|
||||||
|
|
||||||
2004-08-08 Rob Adams <readams@readams.net>
|
2004-08-08 Rob Adams <readams@readams.net>
|
||||||
|
|
||||||
* src/window.c (meta_window_move_resize_internal): Add #ifdef
|
* src/window.c (meta_window_move_resize_internal): Add #ifdef
|
||||||
|
@ -125,6 +125,22 @@ update_wireframe_window (MetaDisplay *display,
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
graphics_sync (BoxAnimationContext *context)
|
||||||
|
{
|
||||||
|
XImage *image;
|
||||||
|
|
||||||
|
/* A hack to force the X server to synchronize with the
|
||||||
|
* graphics hardware
|
||||||
|
*/
|
||||||
|
image = XGetImage (context->screen->display->xdisplay,
|
||||||
|
context->screen->xroot,
|
||||||
|
0, 0, 1, 1,
|
||||||
|
AllPlanes, ZPixmap);
|
||||||
|
|
||||||
|
XDestroyImage (image);
|
||||||
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
effects_draw_box_animation_timeout (BoxAnimationContext *context)
|
effects_draw_box_animation_timeout (BoxAnimationContext *context)
|
||||||
{
|
{
|
||||||
@ -183,6 +199,8 @@ effects_draw_box_animation_timeout (BoxAnimationContext *context)
|
|||||||
context->wireframe_xwindow);
|
context->wireframe_xwindow);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
graphics_sync (context);
|
||||||
|
|
||||||
g_free (context);
|
g_free (context);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -267,7 +285,7 @@ effects_draw_box_animation_timeout (BoxAnimationContext *context)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* kick changes onto the server */
|
/* kick changes onto the server */
|
||||||
XFlush (context->screen->display->xdisplay);
|
graphics_sync (context);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "screen.h"
|
#include "screen.h"
|
||||||
|
|
||||||
#define META_MINIMIZE_ANIMATION_LENGTH 0.35
|
#define META_MINIMIZE_ANIMATION_LENGTH 0.25
|
||||||
#define META_SHADE_ANIMATION_LENGTH 0.2
|
#define META_SHADE_ANIMATION_LENGTH 0.2
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
|
Loading…
Reference in New Issue
Block a user