summaryrefslogtreecommitdiff
path: root/src/ui/ui.c
diff options
context:
space:
mode:
authorGiovanni Campagna <[email protected]>2014-07-31 17:41:39 +0200
committerlukefromdc <[email protected]>2019-04-23 18:41:49 +0000
commit2d6e4ae2e8c8e5a371715c7b4ed1291769993125 (patch)
tree10e6a7e53fc0369fbb8b0de006d8ee348248c8eb /src/ui/ui.c
parent6da9dbba7d41ce8b08dcd9e4a025b409a59b68a0 (diff)
downloadmarco-2d6e4ae2e8c8e5a371715c7b4ed1291769993125.tar.bz2
marco-2d6e4ae2e8c8e5a371715c7b4ed1291769993125.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.c29
1 files changed, 12 insertions, 17 deletions
diff --git a/src/ui/ui.c b/src/ui/ui.c
index f44b68cf..20e7546b 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,