[metacity/argb-frame: 5/7] frame: use ARGB visual if composited
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [metacity/argb-frame: 5/7] frame: use ARGB visual if composited
- Date: Fri, 28 Feb 2020 18:12:14 +0000 (UTC)
commit 705117086d8c792e30383e7963636ccdd87ad8e0
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Wed Aug 21 23:38:38 2019 +0300
frame: use ARGB visual if composited
src/core/frame.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
---
diff --git a/src/core/frame.c b/src/core/frame.c
index 8a2a6bc4..0af7b8b7 100644
--- a/src/core/frame.c
+++ b/src/core/frame.c
@@ -100,6 +100,19 @@ meta_window_ensure_frame (MetaWindow *window)
frame->xvisual = window->xvisual;
+ if (meta_compositor_is_composited (window->display->compositor))
+ {
+ XVisualInfo visual_info;
+
+ if (XMatchVisualInfo (window->display->xdisplay,
+ XScreenNumberOfScreen (window->screen->xscreen),
+ 32, TrueColor,
+ &visual_info) != 0)
+ {
+ frame->xvisual = visual_info.visual;
+ }
+ }
+
frame->xwindow = meta_ui_create_frame_window (window->screen->ui,
window->display->xdisplay,
frame->xvisual,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]