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 ();
gc_values.foreground = FRAME_FOREGROUND_PIXEL (f);
gc_values.background = FRAME_BACKGROUND_PIXEL (f);
- gc_values.line_width = 0; /* Means 1 using fast algorithm. */
+ gc_values.line_width = 1;
f->output_data.x->normal_gc
= XCreateGC (FRAME_X_DISPLAY (f),
FRAME_X_DRAWABLE (f),
/* x, y, width, height */
0, 0, bar->width - 1, bar->height - 1);
- XDrawPoint (FRAME_X_DISPLAY (f), w, gc,
- bar->width - 1, bar->height - 1);
+ /* XDrawPoint (FRAME_X_DISPLAY (f), w, gc,
+ bar->width - 1, bar->height - 1);
+
+ This code is no longer required since the normal GC now uses the
+ regular line width. */
/* Restore the foreground color of the GC if we changed it above. */
if (f->output_data.x->scroll_bar_foreground_pixel != -1)