summaryrefslogtreecommitdiff
path: root/src/xfaces.c
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2022-05-03 11:43:32 +0800
committerPo Lu <luangruo@yahoo.com>2022-05-03 11:43:32 +0800
commitc77ef7d193cfba2e06846012abeb684e37d228a9 (patch)
treeb9c4144205718f67d32c8a3d5098e6c2cf63eb1b /src/xfaces.c
parent61a5829c1ed4ec3d2e824da6048c58bf447d86b3 (diff)
downloademacs-c77ef7d193cfba2e06846012abeb684e37d228a9.tar.gz
Make sure rectangles are drawn correctly on X
* src/xfaces.c (prepare_face_for_display): Always use line-width of 1. * src/xfns.c (x_make_gc): Likewise. * src/xterm.c (x_scroll_bar_expose): Comment out obsolete code.
Diffstat (limited to 'src/xfaces.c')
-rw-r--r--src/xfaces.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/xfaces.c b/src/xfaces.c
index 8ebb33c5abd..05e0df4b7dc 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -4447,17 +4447,26 @@ free_realized_face (struct frame *f, struct face *face)
void
prepare_face_for_display (struct frame *f, struct face *face)
{
+ Emacs_GC egc;
+ unsigned long mask;
+
eassert (FRAME_WINDOW_P (f));
if (face->gc == 0)
{
- Emacs_GC egc;
- unsigned long mask = GCForeground | GCBackground | GCGraphicsExposures;
+ mask = GCForeground | GCBackground | GCGraphicsExposures;
egc.foreground = face->foreground;
egc.background = face->background;
#ifdef HAVE_X_WINDOWS
egc.graphics_exposures = False;
+
+ /* While this was historically slower than a line_width of 0,
+ the difference no longer matters on modern X servers, so set
+ it to 1 in order for PolyLine requests to behave consistently
+ everywhere. */
+ mask |= GCLineWidth;
+ egc.line_width = 1;
#endif
block_input ();