mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 11:32:04 +00:00
frames: Remove expose_delayed
This was introduced for the effects API and wireframe mode, and was forgotten when that went the way of the dinosaur. https://bugzilla.gnome.org/show_bug.cgi?id=671104
This commit is contained in:
parent
81930ca76e
commit
fc87a635b2
@ -261,8 +261,6 @@ meta_frames_init (MetaFrames *frames)
|
||||
|
||||
frames->frames = g_hash_table_new (unsigned_long_hash, unsigned_long_equal);
|
||||
|
||||
frames->expose_delay_count = 0;
|
||||
|
||||
frames->invalidate_cache_timeout_id = 0;
|
||||
frames->invalidate_frames = NULL;
|
||||
frames->cache = g_hash_table_new (g_direct_hash, g_direct_equal);
|
||||
@ -698,7 +696,6 @@ meta_frames_manage_window (MetaFrames *frames,
|
||||
frame->layout = NULL;
|
||||
frame->text_height = -1;
|
||||
frame->title = NULL;
|
||||
frame->expose_delayed = FALSE;
|
||||
frame->shape_applied = FALSE;
|
||||
frame->prelit_control = META_FRAME_CONTROL_NONE;
|
||||
|
||||
@ -2141,13 +2138,6 @@ meta_frames_draw (GtkWidget *widget,
|
||||
if (frame == NULL)
|
||||
return FALSE;
|
||||
|
||||
if (frames->expose_delay_count > 0)
|
||||
{
|
||||
/* Redraw this entire frame later */
|
||||
frame->expose_delayed = TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
populate_cache (frames, frame);
|
||||
|
||||
region = cairo_region_create_rectangle (&clip);
|
||||
@ -2620,50 +2610,6 @@ get_control (MetaFrames *frames,
|
||||
return META_FRAME_CONTROL_TITLE;
|
||||
}
|
||||
|
||||
void
|
||||
meta_frames_push_delay_exposes (MetaFrames *frames)
|
||||
{
|
||||
if (frames->expose_delay_count == 0)
|
||||
{
|
||||
/* Make sure we've repainted things */
|
||||
gdk_window_process_all_updates ();
|
||||
XFlush (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()));
|
||||
}
|
||||
|
||||
frames->expose_delay_count += 1;
|
||||
}
|
||||
|
||||
static void
|
||||
queue_pending_exposes_func (gpointer key, gpointer value, gpointer data)
|
||||
{
|
||||
MetaUIFrame *frame;
|
||||
MetaFrames *frames;
|
||||
|
||||
frames = META_FRAMES (data);
|
||||
frame = value;
|
||||
|
||||
if (frame->expose_delayed)
|
||||
{
|
||||
invalidate_whole_window (frames, frame);
|
||||
frame->expose_delayed = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
meta_frames_pop_delay_exposes (MetaFrames *frames)
|
||||
{
|
||||
g_return_if_fail (frames->expose_delay_count > 0);
|
||||
|
||||
frames->expose_delay_count -= 1;
|
||||
|
||||
if (frames->expose_delay_count == 0)
|
||||
{
|
||||
g_hash_table_foreach (frames->frames,
|
||||
queue_pending_exposes_func,
|
||||
frames);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
invalidate_whole_window (MetaFrames *frames,
|
||||
MetaUIFrame *frame)
|
||||
|
@ -80,7 +80,6 @@ struct _MetaUIFrame
|
||||
PangoLayout *layout;
|
||||
int text_height;
|
||||
char *title; /* NULL once we have a layout */
|
||||
guint expose_delayed : 1;
|
||||
guint shape_applied : 1;
|
||||
|
||||
/* FIXME get rid of this, it can just be in the MetaFrames struct */
|
||||
@ -99,8 +98,6 @@ struct _MetaFrames
|
||||
GtkStyleContext *normal_style;
|
||||
GHashTable *style_variants;
|
||||
|
||||
int expose_delay_count;
|
||||
|
||||
int invalidate_cache_timeout_id;
|
||||
GList *invalidate_frames;
|
||||
GHashTable *cache;
|
||||
@ -167,7 +164,4 @@ void meta_frames_notify_menu_hide (MetaFrames *frames);
|
||||
|
||||
Window meta_frames_get_moving_frame (MetaFrames *frames);
|
||||
|
||||
void meta_frames_push_delay_exposes (MetaFrames *frames);
|
||||
void meta_frames_pop_delay_exposes (MetaFrames *frames);
|
||||
|
||||
#endif
|
||||
|
12
src/ui/ui.c
12
src/ui/ui.c
@ -588,18 +588,6 @@ meta_gdk_pixbuf_get_from_pixmap (Pixmap xpixmap,
|
||||
return retval;
|
||||
}
|
||||
|
||||
void
|
||||
meta_ui_push_delay_exposes (MetaUI *ui)
|
||||
{
|
||||
meta_frames_push_delay_exposes (ui->frames);
|
||||
}
|
||||
|
||||
void
|
||||
meta_ui_pop_delay_exposes (MetaUI *ui)
|
||||
{
|
||||
meta_frames_pop_delay_exposes (ui->frames);
|
||||
}
|
||||
|
||||
GdkPixbuf*
|
||||
meta_ui_get_default_window_icon (MetaUI *ui)
|
||||
{
|
||||
|
@ -143,13 +143,6 @@ GdkPixbuf* meta_gdk_pixbuf_get_from_pixmap (Pixmap xpixmap,
|
||||
int width,
|
||||
int height);
|
||||
|
||||
/* Used when we have a server grab and draw all over everything,
|
||||
* then we need to handle exposes after doing that, instead of
|
||||
* during it
|
||||
*/
|
||||
void meta_ui_push_delay_exposes (MetaUI *ui);
|
||||
void meta_ui_pop_delay_exposes (MetaUI *ui);
|
||||
|
||||
GdkPixbuf* meta_ui_get_default_window_icon (MetaUI *ui);
|
||||
GdkPixbuf* meta_ui_get_default_mini_icon (MetaUI *ui);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user