diff options
author | Giovanni Campagna <[email protected]> | 2014-07-31 17:41:39 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2019-06-16 18:12:44 +0200 |
commit | 0d821ca7744a36d8309b3698e567e2b4cec4fcee (patch) | |
tree | 7469624caf093a99ca1d4a0e45146cab3e4cb7e7 /src/ui/ui.c | |
parent | 514f6930bd3f22c6ccc3cddf699fd62061de7259 (diff) | |
download | marco-0d821ca7744a36d8309b3698e567e2b4cec4fcee.tar.bz2 marco-0d821ca7744a36d8309b3698e567e2b4cec4fcee.tar.xz |
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
origin commit:
https://gitlab.gnome.org/GNOME/metacity/commit/78c283c
Diffstat (limited to 'src/ui/ui.c')
-rw-r--r-- | src/ui/ui.c | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/src/ui/ui.c b/src/ui/ui.c index b3f40062..00c1176a 100644 --- a/src/ui/ui.c +++ b/src/ui/ui.c @@ -305,6 +305,17 @@ meta_ui_get_frame_geometry (MetaUI *ui, left_width, right_width); } +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, @@ -363,6 +374,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); @@ -418,16 +430,6 @@ meta_ui_unmap_frame (MetaUI *ui, } 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_repaint_frame (MetaUI *ui, Window xwindow) { @@ -435,13 +437,6 @@ meta_ui_repaint_frame (MetaUI *ui, } void -meta_ui_reset_frame_bg (MetaUI *ui, - Window xwindow) -{ - meta_frames_reset_bg (ui->frames, xwindow); -} - -void meta_ui_apply_frame_shape (MetaUI *ui, Window xwindow, int new_window_width, |