mirror of
https://github.com/brl/mutter.git
synced 2025-07-23 01:51:38 +00:00
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:
29
src/ui/ui.c
29
src/ui/ui.c
@ -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,
|
||||
|
Reference in New Issue
Block a user