diff options
| author | Po Lu | 2022-01-30 14:02:40 +0800 |
|---|---|---|
| committer | Po Lu | 2022-01-30 14:04:12 +0800 |
| commit | 26a9acc86ae4e646b17570f009dcdf566f75c3de (patch) | |
| tree | eee3e7ec640a8e87be83447f0361f16c30b4502f /src | |
| parent | f4ddd6153d0108e6101590699ab4a839a90739d9 (diff) | |
| download | emacs-26a9acc86ae4e646b17570f009dcdf566f75c3de.tar.gz emacs-26a9acc86ae4e646b17570f009dcdf566f75c3de.zip | |
Fix some problems with inconsistent visuals on GDK
* src/xterm.c (x_xr_ensure_picture): Use the visual GDK used
instead of our own.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xterm.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/xterm.c b/src/xterm.c index 209e99fc09c..0ecebfb4205 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -382,11 +382,22 @@ x_xr_ensure_picture (struct frame *f) | |||
| 382 | { | 382 | { |
| 383 | XRenderPictureAttributes attrs; | 383 | XRenderPictureAttributes attrs; |
| 384 | attrs.clip_mask = None; | 384 | attrs.clip_mask = None; |
| 385 | XRenderPictFormat *fmt; | ||
| 386 | |||
| 387 | #ifdef USE_GTK | ||
| 388 | GdkWindow *wnd = gtk_widget_get_window (FRAME_GTK_OUTER_WIDGET (f)); | ||
| 389 | GdkVisual *visual = gdk_window_get_visual (wnd); | ||
| 390 | Visual *xvisual = gdk_x11_visual_get_xvisual (visual); | ||
| 391 | |||
| 392 | fmt = XRenderFindVisualFormat (FRAME_X_DISPLAY (f), xvisual); | ||
| 393 | |||
| 394 | if (!fmt) | ||
| 395 | #endif | ||
| 396 | fmt = FRAME_X_PICTURE_FORMAT (f); | ||
| 385 | 397 | ||
| 386 | FRAME_X_PICTURE (f) = XRenderCreatePicture (FRAME_X_DISPLAY (f), | 398 | FRAME_X_PICTURE (f) = XRenderCreatePicture (FRAME_X_DISPLAY (f), |
| 387 | FRAME_X_RAW_DRAWABLE (f), | 399 | FRAME_X_RAW_DRAWABLE (f), |
| 388 | FRAME_X_PICTURE_FORMAT (f), | 400 | fmt, CPClipMask, &attrs); |
| 389 | CPClipMask, &attrs); | ||
| 390 | } | 401 | } |
| 391 | } | 402 | } |
| 392 | #endif | 403 | #endif |