ui: always set the frame background to None

This way the xserver never paints the frame background, even if
the client window is destroyed. This allows us to have clean
destroy window animation.

There is no problem with interactive resizing because applications
are using the XSync protocol, so we're not painting unless the
client has redrawn.

https://bugzilla.gnome.org/show_bug.cgi?id=734054
This commit is contained in:
Giovanni Campagna
2014-07-31 17:41:39 +02:00
parent 3a535b6722
commit d0f2c6be6d
5 changed files with 12 additions and 146 deletions

View File

@ -331,6 +331,17 @@ meta_ui_get_frame_borders (MetaUI *ui,
borders);
}
static void
set_background_none (Display *xdisplay,
Window xwindow)
{
XSetWindowAttributes attrs;
attrs.background_pixmap = None;
XChangeWindowAttributes (xdisplay, xwindow,
CWBackPixmap, &attrs);
}
Window
meta_ui_create_frame_window (MetaUI *ui,
Display *xdisplay,
@ -397,6 +408,7 @@ meta_ui_create_frame_window (MetaUI *ui,
&attrs, attributes_mask);
gdk_window_resize (window, width, height);
set_background_none (xdisplay, GDK_WINDOW_XID (window));
meta_frames_manage_window (ui->frames, GDK_WINDOW_XID (window), window);
@ -449,16 +461,6 @@ meta_ui_unmap_frame (MetaUI *ui,
gdk_window_hide (window);
}
void
meta_ui_unflicker_frame_bg (MetaUI *ui,
Window xwindow,
int target_width,
int target_height)
{
meta_frames_unflicker_bg (ui->frames, xwindow,
target_width, target_height);
}
void
meta_ui_update_frame_style (MetaUI *ui,
Window xwindow)
@ -473,13 +475,6 @@ meta_ui_repaint_frame (MetaUI *ui,
meta_frames_repaint_frame (ui->frames, xwindow);
}
void
meta_ui_reset_frame_bg (MetaUI *ui,
Window xwindow)
{
meta_frames_reset_bg (ui->frames, xwindow);
}
cairo_region_t *
meta_ui_get_frame_bounds (MetaUI *ui,
Window xwindow,