aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPo Lu2022-01-30 08:51:13 +0800
committerPo Lu2022-01-30 08:51:13 +0800
commit391c1289e28ce11d5639a4d754ec36e7b26aa6ac (patch)
treed3950c55c5532f208e360af9bd61cb063103a13b /src
parentb944841173f12134e4c68d269d5b82b1820b2a40 (diff)
downloademacs-391c1289e28ce11d5639a4d754ec36e7b26aa6ac.tar.gz
emacs-391c1289e28ce11d5639a4d754ec36e7b26aa6ac.zip
Some adjustments to last change
* src/gtkutil.c (xg_set_undecorated): Only set ARGB visual on Cairo builds wtihout PGTK. * src/xfns.c (select_visual): Likewise.
Diffstat (limited to 'src')
-rw-r--r--src/gtkutil.c2
-rw-r--r--src/xfns.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 8b8123c807e..067df216a4a 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -1593,12 +1593,14 @@ xg_create_frame_widgets (struct frame *f)
1593 1593
1594 GdkScreen *screen = gtk_widget_get_screen (wtop); 1594 GdkScreen *screen = gtk_widget_get_screen (wtop);
1595 1595
1596#if !defined HAVE_PGTK && defined USE_CAIRO
1596 if (FRAME_DISPLAY_INFO (f)->n_planes == 32) 1597 if (FRAME_DISPLAY_INFO (f)->n_planes == 32)
1597 { 1598 {
1598 GdkVisual *visual = gdk_screen_get_rgba_visual (screen); 1599 GdkVisual *visual = gdk_screen_get_rgba_visual (screen);
1599 gtk_widget_set_visual (wtop, visual); 1600 gtk_widget_set_visual (wtop, visual);
1600 gtk_widget_set_visual (wfixed, visual); 1601 gtk_widget_set_visual (wfixed, visual);
1601 } 1602 }
1603#endif
1602 1604
1603#ifndef HAVE_PGTK 1605#ifndef HAVE_PGTK
1604 /* Must realize the windows so the X window gets created. It is used 1606 /* Must realize the windows so the X window gets created. It is used
diff --git a/src/xfns.c b/src/xfns.c
index 2f2e33fa69c..b37ba139a22 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -6375,7 +6375,7 @@ select_visual (struct x_display_info *dpyinfo)
6375 6375
6376 vinfo_template.screen = XScreenNumberOfScreen (screen); 6376 vinfo_template.screen = XScreenNumberOfScreen (screen);
6377 6377
6378#if defined (USE_GTK) 6378#if defined (USE_GTK) && defined (USE_CAIRO)
6379 /* First attempt to use 32-bit visual if available */ 6379 /* First attempt to use 32-bit visual if available */
6380 6380
6381 vinfo_template.depth = 32; 6381 vinfo_template.depth = 32;
@@ -6391,7 +6391,7 @@ select_visual (struct x_display_info *dpyinfo)
6391 return; 6391 return;
6392 } 6392 }
6393 6393
6394#endif /* defined (USE_GTK) */ 6394#endif /* USE_GTK && USE_CAIRO */
6395 6395
6396 /* 32-bit visual not available, fallback to default visual */ 6396 /* 32-bit visual not available, fallback to default visual */
6397 dpyinfo->visual = DefaultVisualOfScreen (screen); 6397 dpyinfo->visual = DefaultVisualOfScreen (screen);