/[emacs]/emacs/src/macterm.c
ViewVC logotype

Diff of /emacs/src/macterm.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.132 by mituharu, Fri Oct 7 07:39:37 2005 UTC revision 1.133 by mituharu, Sat Oct 8 02:28:09 2005 UTC
# Line 270  extern void menubar_selection_callback ( Line 270  extern void menubar_selection_callback (
270  #define GC_FORE_COLOR(gc)       (&(gc)->fore_color)  #define GC_FORE_COLOR(gc)       (&(gc)->fore_color)
271  #define GC_BACK_COLOR(gc)       (&(gc)->back_color)  #define GC_BACK_COLOR(gc)       (&(gc)->back_color)
272  #define GC_FONT(gc)             ((gc)->xgcv.font)  #define GC_FONT(gc)             ((gc)->xgcv.font)
273    #define GC_CLIP_REGION(gc)      ((gc)->clip_region)
274  #define MAC_WINDOW_NORMAL_GC(w) (((mac_output *) GetWRefCon (w))->normal_gc)  #define MAC_WINDOW_NORMAL_GC(w) (((mac_output *) GetWRefCon (w))->normal_gc)
275    
276    static RgnHandle saved_port_clip_region = NULL;
277    
278    static void
279    mac_begin_clip (region)
280         RgnHandle region;
281    {
282      static RgnHandle new_region = NULL;
283    
284      if (saved_port_clip_region == NULL)
285        saved_port_clip_region = NewRgn ();
286      if (new_region == NULL)
287        new_region = NewRgn ();
288    
289      if (region)
290        {
291          GetClip (saved_port_clip_region);
292          SectRgn (saved_port_clip_region, region, new_region);
293          SetClip (new_region);
294        }
295    }
296    
297    static void
298    mac_end_clip (region)
299         RgnHandle region;
300    {
301      if (region)
302        SetClip (saved_port_clip_region);
303    }
304    
305    
306  /* X display function emulation */  /* X display function emulation */
307    
# Line 297  XDrawLine (display, w, gc, x1, y1, x2, y Line 327  XDrawLine (display, w, gc, x1, y1, x2, y
327    
328    RGBForeColor (GC_FORE_COLOR (gc));    RGBForeColor (GC_FORE_COLOR (gc));
329    
330      mac_begin_clip (GC_CLIP_REGION (gc));
331    MoveTo (x1, y1);    MoveTo (x1, y1);
332    LineTo (x2, y2);    LineTo (x2, y2);
333      mac_end_clip (GC_CLIP_REGION (gc));
334  }  }
335    
336  void  void
# Line 339  mac_erase_rectangle (w, gc, x, y, width, Line 371  mac_erase_rectangle (w, gc, x, y, width,
371    RGBBackColor (GC_BACK_COLOR (gc));    RGBBackColor (GC_BACK_COLOR (gc));
372    SetRect (&r, x, y, x + width, y + height);    SetRect (&r, x, y, x + width, y + height);
373    
374      mac_begin_clip (GC_CLIP_REGION (gc));
375    EraseRect (&r);    EraseRect (&r);
376      mac_end_clip (GC_CLIP_REGION (gc));
377    
378    RGBBackColor (GC_BACK_COLOR (MAC_WINDOW_NORMAL_GC (w)));    RGBBackColor (GC_BACK_COLOR (MAC_WINDOW_NORMAL_GC (w)));
379  }  }
# Line 406  mac_draw_bitmap (display, w, gc, x, y, w Line 440  mac_draw_bitmap (display, w, gc, x, y, w
440    RGBBackColor (GC_BACK_COLOR (gc));    RGBBackColor (GC_BACK_COLOR (gc));
441    SetRect (&r, x, y, x + width, y + height);    SetRect (&r, x, y, x + width, y + height);
442    
443      mac_begin_clip (GC_CLIP_REGION (gc));
444  #if TARGET_API_MAC_CARBON  #if TARGET_API_MAC_CARBON
445    LockPortBits (GetWindowPort (w));    LockPortBits (GetWindowPort (w));
446    CopyBits (&bitmap, GetPortBitMapForCopyBits (GetWindowPort (w)),    CopyBits (&bitmap, GetPortBitMapForCopyBits (GetWindowPort (w)),
# Line 415  mac_draw_bitmap (display, w, gc, x, y, w Line 450  mac_draw_bitmap (display, w, gc, x, y, w
450    CopyBits (&bitmap, &(w->portBits), &(bitmap.bounds), &r,    CopyBits (&bitmap, &(w->portBits), &(bitmap.bounds), &r,
451              overlay_p ? srcOr : srcCopy, 0);              overlay_p ? srcOr : srcCopy, 0);
452  #endif /* not TARGET_API_MAC_CARBON */  #endif /* not TARGET_API_MAC_CARBON */
453      mac_end_clip (GC_CLIP_REGION (gc));
454    
455    RGBBackColor (GC_BACK_COLOR (MAC_WINDOW_NORMAL_GC (w)));    RGBBackColor (GC_BACK_COLOR (MAC_WINDOW_NORMAL_GC (w)));
456  }  }
457    
458    
 /* Mac replacement for XSetClipRectangles.  */  
   
 static void  
 mac_set_clip_rectangle (display, w, r)  
      Display *display;  
      WindowPtr w;  
      Rect *r;  
 {  
   SetPortWindowPort (w);  
   
   ClipRect (r);  
 }  
   
   
 /* Mac replacement for XSetClipMask.  */  
   
 static void  
 mac_reset_clipping (display, w)  
      Display *display;  
      WindowPtr w;  
 {  
   Rect r;  
   
   SetPortWindowPort (w);  
   
   SetRect (&r, -32767, -32767, 32767, 32767);  
   ClipRect (&r);  
 }  
   
   
459  /* Mac replacement for XCreateBitmapFromBitmapData.  */  /* Mac replacement for XCreateBitmapFromBitmapData.  */
460    
461  static void  static void
# Line 577  XFillRectangle (display, w, gc, x, y, wi Line 583  XFillRectangle (display, w, gc, x, y, wi
583    RGBForeColor (GC_FORE_COLOR (gc));    RGBForeColor (GC_FORE_COLOR (gc));
584    SetRect (&r, x, y, x + width, y + height);    SetRect (&r, x, y, x + width, y + height);
585    
586      mac_begin_clip (GC_CLIP_REGION (gc));
587    PaintRect (&r); /* using foreground color of gc */    PaintRect (&r); /* using foreground color of gc */
588      mac_end_clip (GC_CLIP_REGION (gc));
589  }  }
590    
591    
# Line 625  mac_draw_rectangle (display, w, gc, x, y Line 633  mac_draw_rectangle (display, w, gc, x, y
633    RGBForeColor (GC_FORE_COLOR (gc));    RGBForeColor (GC_FORE_COLOR (gc));
634    SetRect (&r, x, y, x + width + 1, y + height + 1);    SetRect (&r, x, y, x + width + 1, y + height + 1);
635    
636      mac_begin_clip (GC_CLIP_REGION (gc));
637    FrameRect (&r); /* using foreground color of gc */    FrameRect (&r); /* using foreground color of gc */
638      mac_end_clip (GC_CLIP_REGION (gc));
639  }  }
640    
641    
# Line 678  atsu_get_text_layout_with_text_ptr (text Line 688  atsu_get_text_layout_with_text_ptr (text
688  #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1020  #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1020
689          kATSLineDisableAllLayoutOperations  | kATSLineUseDeviceMetrics          kATSLineDisableAllLayoutOperations  | kATSLineUseDeviceMetrics
690  #else  #else
691          kATSLineIsDisplayOnly          kATSLineIsDisplayOnly | kATSLineFractDisable
692  #endif  #endif
693          ;          ;
694        ATSUAttributeValuePtr values[] = {&line_layout};        ATSUAttributeValuePtr values[] = {&line_layout};
# Line 782  mac_draw_string_common (display, w, gc, Line 792  mac_draw_string_common (display, w, gc,
792            if (NILP (Vmac_use_core_graphics))            if (NILP (Vmac_use_core_graphics))
793              {              {
794  #endif  #endif
795                  mac_begin_clip (GC_CLIP_REGION (gc));
796                MoveTo (x, y);                MoveTo (x, y);
797                ATSUDrawText (text_layout,                ATSUDrawText (text_layout,
798                              kATSUFromTextBeginning, kATSUToTextEnd,                              kATSUFromTextBeginning, kATSUToTextEnd,
799                              kATSUUseGrafPortPenLoc, kATSUUseGrafPortPenLoc);                              kATSUUseGrafPortPenLoc, kATSUUseGrafPortPenLoc);
800                  mac_end_clip (GC_CLIP_REGION (gc));
801  #ifdef MAC_OSX  #ifdef MAC_OSX
802              }              }
803            else            else
# Line 793  mac_draw_string_common (display, w, gc, Line 805  mac_draw_string_common (display, w, gc,
805                CGrafPtr port;                CGrafPtr port;
806                CGContextRef context;                CGContextRef context;
807                Rect rect;                Rect rect;
               RgnHandle region = NewRgn ();  
808                float port_height;                float port_height;
809                ATSUAttributeTag tags[] = {kATSUCGContextTag};                ATSUAttributeTag tags[] = {kATSUCGContextTag};
810                ByteCount sizes[] = {sizeof (CGContextRef)};                ByteCount sizes[] = {sizeof (CGContextRef)};
# Line 803  mac_draw_string_common (display, w, gc, Line 814  mac_draw_string_common (display, w, gc,
814                QDBeginCGContext (port, &context);                QDBeginCGContext (port, &context);
815                GetPortBounds (port, &rect);                GetPortBounds (port, &rect);
816                port_height = rect.bottom - rect.top;                port_height = rect.bottom - rect.top;
817                GetClip (region);                if (gc->n_clip_rects)
818                GetRegionBounds (region, &rect);                  {
819                /* XXX: This is not correct if the clip region is not a                    CGContextTranslateCTM (context, 0, port_height);
820                   simple rectangle.  */                    CGContextScaleCTM (context, 1, -1);
821                CGContextClipToRect (context,                    CGContextClipToRects (context, gc->clip_rects,
822                                     CGRectMake (rect.left,                                          gc->n_clip_rects);
823                                                 port_height - rect.bottom,                    CGContextScaleCTM (context, 1, -1);
824                                                 rect.right - rect.left,                    CGContextTranslateCTM (context, 0, -port_height);
825                                                 rect.bottom - rect.top));                  }
               DisposeRgn (region);  
826                CGContextSetRGBFillColor                CGContextSetRGBFillColor
827                  (context,                  (context,
828                   RED_FROM_ULONG (gc->xgcv.foreground) / 255.0,                   RED_FROM_ULONG (gc->xgcv.foreground) / 255.0,
# Line 843  mac_draw_string_common (display, w, gc, Line 853  mac_draw_string_common (display, w, gc,
853    TextFace (GC_FONT (gc)->mac_fontface);    TextFace (GC_FONT (gc)->mac_fontface);
854    TextMode (mode);    TextMode (mode);
855    
856      mac_begin_clip (GC_CLIP_REGION (gc));
857    MoveTo (x, y);    MoveTo (x, y);
858    DrawText (buf, 0, nchars * bytes_per_char);    DrawText (buf, 0, nchars * bytes_per_char);
859      mac_end_clip (GC_CLIP_REGION (gc));
860  #if USE_ATSUI  #if USE_ATSUI
861      }      }
862  #endif  #endif
# Line 943  mac_copy_area (display, src, dest, gc, s Line 955  mac_copy_area (display, src, dest, gc, s
955    ForeColor (blackColor);    ForeColor (blackColor);
956    BackColor (whiteColor);    BackColor (whiteColor);
957    
958      mac_begin_clip (GC_CLIP_REGION (gc));
959    LockPixels (GetGWorldPixMap (src));    LockPixels (GetGWorldPixMap (src));
960  #if TARGET_API_MAC_CARBON  #if TARGET_API_MAC_CARBON
961    LockPortBits (GetWindowPort (dest));    LockPortBits (GetWindowPort (dest));
# Line 955  mac_copy_area (display, src, dest, gc, s Line 968  mac_copy_area (display, src, dest, gc, s
968              &src_r, &dest_r, srcCopy, 0);              &src_r, &dest_r, srcCopy, 0);
969  #endif /* not TARGET_API_MAC_CARBON */  #endif /* not TARGET_API_MAC_CARBON */
970    UnlockPixels (GetGWorldPixMap (src));    UnlockPixels (GetGWorldPixMap (src));
971      mac_end_clip (GC_CLIP_REGION (gc));
972    
973    RGBBackColor (GC_BACK_COLOR (MAC_WINDOW_NORMAL_GC (dest)));    RGBBackColor (GC_BACK_COLOR (MAC_WINDOW_NORMAL_GC (dest)));
974  }  }
# Line 981  mac_copy_area_with_mask (display, src, m Line 995  mac_copy_area_with_mask (display, src, m
995    ForeColor (blackColor);    ForeColor (blackColor);
996    BackColor (whiteColor);    BackColor (whiteColor);
997    
998      mac_begin_clip (GC_CLIP_REGION (gc));
999    LockPixels (GetGWorldPixMap (src));    LockPixels (GetGWorldPixMap (src));
1000    LockPixels (GetGWorldPixMap (mask));    LockPixels (GetGWorldPixMap (mask));
1001  #if TARGET_API_MAC_CARBON  #if TARGET_API_MAC_CARBON
# Line 995  mac_copy_area_with_mask (display, src, m Line 1010  mac_copy_area_with_mask (display, src, m
1010  #endif /* not TARGET_API_MAC_CARBON */  #endif /* not TARGET_API_MAC_CARBON */
1011    UnlockPixels (GetGWorldPixMap (mask));    UnlockPixels (GetGWorldPixMap (mask));
1012    UnlockPixels (GetGWorldPixMap (src));    UnlockPixels (GetGWorldPixMap (src));
1013      mac_end_clip (GC_CLIP_REGION (gc));
1014    
1015    RGBBackColor (GC_BACK_COLOR (MAC_WINDOW_NORMAL_GC (dest)));    RGBBackColor (GC_BACK_COLOR (MAC_WINDOW_NORMAL_GC (dest)));
1016  }  }
# Line 1031  mac_scroll_area (display, w, gc, src_x, Line 1047  mac_scroll_area (display, w, gc, src_x,
1047       color mapping in CopyBits.  Otherwise, it will be slow.  */       color mapping in CopyBits.  Otherwise, it will be slow.  */
1048    ForeColor (blackColor);    ForeColor (blackColor);
1049    BackColor (whiteColor);    BackColor (whiteColor);
1050      mac_begin_clip (GC_CLIP_REGION (gc));
1051    CopyBits (&(w->portBits), &(w->portBits), &src_r, &dest_r, srcCopy, 0);    CopyBits (&(w->portBits), &(w->portBits), &src_r, &dest_r, srcCopy, 0);
1052      mac_end_clip (GC_CLIP_REGION (gc));
1053    
1054    RGBBackColor (GC_BACK_COLOR (MAC_WINDOW_NORMAL_GC (w)));    RGBBackColor (GC_BACK_COLOR (MAC_WINDOW_NORMAL_GC (w)));
1055  #endif /* not TARGET_API_MAC_CARBON */  #endif /* not TARGET_API_MAC_CARBON */
# Line 1166  XFreeGC (display, gc) Line 1184  XFreeGC (display, gc)
1184       Display *display;       Display *display;
1185       GC gc;       GC gc;
1186  {  {
1187      if (gc->clip_region)
1188        DisposeRgn (gc->clip_region);
1189    xfree (gc);    xfree (gc);
1190  }  }
1191    
# Line 1236  XSetFont (display, gc, font) Line 1256  XSetFont (display, gc, font)
1256  }  }
1257    
1258    
1259    /* Mac replacement for XSetClipRectangles.  */
1260    
1261    static void
1262    mac_set_clip_rectangles (display, gc, rectangles, n)
1263         Display *display;
1264         GC gc;
1265         Rect *rectangles;
1266         int n;
1267    {
1268      int i;
1269    
1270      if (n < 0 || n > MAX_CLIP_RECTS)
1271        abort ();
1272      if (n == 0)
1273        {
1274          if (gc->clip_region)
1275            {
1276              DisposeRgn (gc->clip_region);
1277              gc->clip_region = NULL;
1278            }
1279        }
1280      else
1281        {
1282          if (gc->clip_region == NULL)
1283            gc->clip_region = NewRgn ();
1284          RectRgn (gc->clip_region, rectangles);
1285          if (n > 1)
1286            {
1287              RgnHandle region = NewRgn ();
1288    
1289              for (i = 1; i < n; i++)
1290                {
1291                  RectRgn (region, rectangles + i);
1292                  UnionRgn (gc->clip_region, region, gc->clip_region);
1293                }
1294              DisposeRgn (region);
1295            }
1296        }
1297    #if defined (MAC_OSX) && USE_ATSUI
1298      gc->n_clip_rects = n;
1299    
1300      for (i = 0; i < n; i++)
1301        {
1302          Rect *rect = rectangles + i;
1303    
1304          gc->clip_rects[i] = CGRectMake (rect->left, rect->top,
1305                                          rect->right - rect->left,
1306                                          rect->bottom - rect->top);
1307        }
1308    #endif
1309    }
1310    
1311    
1312    /* Mac replacement for XSetClipMask.  */
1313    
1314    static INLINE void
1315    mac_reset_clip_rectangles (display, gc)
1316         Display *display;
1317         GC gc;
1318    {
1319      mac_set_clip_rectangles (display, gc, NULL, 0);
1320    }
1321    
1322    
1323  /* Mac replacement for XSetWindowBackground.  */  /* Mac replacement for XSetWindowBackground.  */
1324    
1325  void  void
# Line 1647  x_draw_fringe_bitmap (w, row, p) Line 1731  x_draw_fringe_bitmap (w, row, p)
1731        XSetForeground (display, face->gc, gcv.foreground);        XSetForeground (display, face->gc, gcv.foreground);
1732      }      }
1733    
1734    mac_reset_clipping (display, window);    mac_reset_clip_rectangles (display, gc);
1735  }  }
1736    
1737    
# Line 2122  static INLINE void Line 2206  static INLINE void
2206  x_set_glyph_string_clipping (s)  x_set_glyph_string_clipping (s)
2207       struct glyph_string *s;       struct glyph_string *s;
2208  {  {
2209    Rect r;    Rect rects[MAX_CLIP_RECTS];
2210    get_glyph_string_clip_rect (s, &r);    int n;
2211    mac_set_clip_rectangle (s->display, s->window, &r);  
2212      n = get_glyph_string_clip_rects (s, rects, MAX_CLIP_RECTS);
2213      mac_set_clip_rectangles (s->display, s->gc, rects, n);
2214  }  }
2215    
2216    
# Line 2341  x_draw_glyph_string_foreground (s) Line 2427  x_draw_glyph_string_foreground (s)
2427          {          {
2428            if (s->two_byte_p)            if (s->two_byte_p)
2429              XDrawImageString16 (s->display, s->window, s->gc, x,              XDrawImageString16 (s->display, s->window, s->gc, x,
2430                                  s->ybase - boff, s->char2b, s->nchars);                                  s->ybase - boff, s->char2b, s->nchars);
2431            else            else
2432              XDrawImageString (s->display, s->window, s->gc, x,              XDrawImageString (s->display, s->window, s->gc, x,
2433                                s->ybase - boff, char1b, s->nchars);                                s->ybase - boff, char1b, s->nchars);
# Line 2749  x_draw_relief_rect (f, left_x, top_y, ri Line 2835  x_draw_relief_rect (f, left_x, top_y, ri
2835      gc = f->output_data.mac->white_relief.gc;      gc = f->output_data.mac->white_relief.gc;
2836    else    else
2837      gc = f->output_data.mac->black_relief.gc;      gc = f->output_data.mac->black_relief.gc;
2838    mac_set_clip_rectangle (dpy, window, clip_rect);    mac_set_clip_rectangles (dpy, gc, clip_rect, 1);
2839    
2840    /* Top.  */    /* Top.  */
2841    if (top_p)    if (top_p)
# Line 2764  x_draw_relief_rect (f, left_x, top_y, ri Line 2850  x_draw_relief_rect (f, left_x, top_y, ri
2850        XDrawLine (dpy, window, gc,        XDrawLine (dpy, window, gc,
2851                   left_x + i, top_y + i, left_x + i, bottom_y - i);                   left_x + i, top_y + i, left_x + i, bottom_y - i);
2852    
2853    mac_reset_clipping (dpy, window);    mac_reset_clip_rectangles (dpy, gc);
2854    if (raised_p)    if (raised_p)
2855      gc = f->output_data.mac->black_relief.gc;      gc = f->output_data.mac->black_relief.gc;
2856    else    else
2857      gc = f->output_data.mac->white_relief.gc;      gc = f->output_data.mac->white_relief.gc;
2858    mac_set_clip_rectangle (dpy, window,    mac_set_clip_rectangles (dpy, gc, clip_rect, 1);
                           clip_rect);  
2859    
2860    /* Bottom.  */    /* Bottom.  */
2861    if (bot_p)    if (bot_p)
# Line 2785  x_draw_relief_rect (f, left_x, top_y, ri Line 2870  x_draw_relief_rect (f, left_x, top_y, ri
2870        XDrawLine (dpy, window, gc,        XDrawLine (dpy, window, gc,
2871                   right_x - i, top_y + i + 1, right_x - i, bottom_y - i - 1);                   right_x - i, top_y + i + 1, right_x - i, bottom_y - i - 1);
2872    
2873    mac_reset_clipping (dpy, window);    mac_reset_clip_rectangles (dpy, gc);
2874  }  }
2875    
2876    
# Line 2807  x_draw_box_rect (s, left_x, top_y, right Line 2892  x_draw_box_rect (s, left_x, top_y, right
2892    
2893    XGetGCValues (s->display, s->gc, GCForeground, &xgcv);    XGetGCValues (s->display, s->gc, GCForeground, &xgcv);
2894    XSetForeground (s->display, s->gc, s->face->box_color);    XSetForeground (s->display, s->gc, s->face->box_color);
2895    mac_set_clip_rectangle (s->display, s->window, clip_rect);    mac_set_clip_rectangles (s->display, s->gc, clip_rect, 1);
2896    
2897    /* Top.  */    /* Top.  */
2898    XFillRectangle (s->display, s->window, s->gc,    XFillRectangle (s->display, s->window, s->gc,
# Line 2828  x_draw_box_rect (s, left_x, top_y, right Line 2913  x_draw_box_rect (s, left_x, top_y, right
2913                      right_x - width + 1, top_y, width, bottom_y - top_y + 1);                      right_x - width + 1, top_y, width, bottom_y - top_y + 1);
2914    
2915    XSetForeground (s->display, s->gc, xgcv.foreground);    XSetForeground (s->display, s->gc, xgcv.foreground);
2916    mac_reset_clipping (s->display, s->window);    mac_reset_clip_rectangles (s->display, s->gc);
2917  }  }
2918    
2919    
# Line 3182  x_draw_image_glyph_string (s) Line 3267  x_draw_image_glyph_string (s)
3267        x_set_glyph_string_clipping (s);        x_set_glyph_string_clipping (s);
3268        mac_copy_area (s->display, pixmap, s->window, s->gc,        mac_copy_area (s->display, pixmap, s->window, s->gc,
3269                       0, 0, s->background_width, s->height, s->x, s->y);                       0, 0, s->background_width, s->height, s->x, s->y);
       mac_reset_clipping (s->display, s->window);  
3270        XFreePixmap (s->display, pixmap);        XFreePixmap (s->display, pixmap);
3271      }      }
3272    else    else
# Line 3234  x_draw_stretch_glyph_string (s) Line 3318  x_draw_stretch_glyph_string (s)
3318              gc = s->face->gc;              gc = s->face->gc;
3319    
3320            get_glyph_string_clip_rect (s, &r);            get_glyph_string_clip_rect (s, &r);
3321            mac_set_clip_rectangle (s->display, s->window, &r);            mac_set_clip_rectangles (s->display, gc, &r, 1);
3322    
3323  #if 0 /* MAC_TODO: stipple */  #if 0 /* MAC_TODO: stipple */
3324            if (s->face->stipple)            if (s->face->stipple)
# Line 3247  x_draw_stretch_glyph_string (s) Line 3331  x_draw_stretch_glyph_string (s)
3331            else            else
3332  #endif /* MAC_TODO */  #endif /* MAC_TODO */
3333              mac_erase_rectangle (s->window, gc, x, y, w, h);              mac_erase_rectangle (s->window, gc, x, y, w, h);
   
           mac_reset_clipping (s->display, s->window);  
3334          }          }
3335      }      }
3336    else if (!s->background_filled_p)    else if (!s->background_filled_p)
# Line 3397  x_draw_glyph_string (s) Line 3479  x_draw_glyph_string (s)
3479      }      }
3480    
3481    /* Reset clipping.  */    /* Reset clipping.  */
3482    mac_reset_clipping (s->display, s->window);    mac_reset_clip_rectangles (s->display, s->gc);
3483  }  }
3484    
3485  /* Shift display to make room for inserted glyphs.   */  /* Shift display to make room for inserted glyphs.   */
# Line 5270  x_clip_to_row (w, row, area, gc) Line 5352  x_clip_to_row (w, row, area, gc)
5352    clip_rect.right = clip_rect.left + window_width;    clip_rect.right = clip_rect.left + window_width;
5353    clip_rect.bottom = clip_rect.top + row->visible_height;    clip_rect.bottom = clip_rect.top + row->visible_height;
5354    
5355    mac_set_clip_rectangle (FRAME_MAC_DISPLAY (f), FRAME_MAC_WINDOW (f), &clip_rect);    mac_set_clip_rectangles (FRAME_MAC_DISPLAY (f), gc, &clip_rect, 1);
5356  }  }
5357    
5358    
# Line 5313  x_draw_hollow_cursor (w, row) Line 5395  x_draw_hollow_cursor (w, row)
5395    /* Set clipping, draw the rectangle, and reset clipping again.  */    /* Set clipping, draw the rectangle, and reset clipping again.  */
5396    x_clip_to_row (w, row, TEXT_AREA, gc);    x_clip_to_row (w, row, TEXT_AREA, gc);
5397    mac_draw_rectangle (dpy, FRAME_MAC_WINDOW (f), gc, x, y, wd, h);    mac_draw_rectangle (dpy, FRAME_MAC_WINDOW (f), gc, x, y, wd, h);
5398    mac_reset_clipping (dpy, FRAME_MAC_WINDOW (f));    mac_reset_clip_rectangles (dpy, gc);
5399  }  }
5400    
5401    
# Line 5397  x_draw_bar_cursor (w, row, width, kind) Line 5479  x_draw_bar_cursor (w, row, width, kind)
5479                          cursor_glyph->pixel_width,                          cursor_glyph->pixel_width,
5480                          width);                          width);
5481    
5482        mac_reset_clipping (dpy, FRAME_MAC_WINDOW (f));        mac_reset_clip_rectangles (dpy, gc);
5483      }      }
5484  }  }
5485    
# Line 7610  XLoadQueryFont (Display *dpy, char *font Line 7692  XLoadQueryFont (Display *dpy, char *font
7692        ATSUFontFeatureType types[] = {kAllTypographicFeaturesType};        ATSUFontFeatureType types[] = {kAllTypographicFeaturesType};
7693        ATSUFontFeatureSelector selectors[] = {kAllTypeFeaturesOffSelector};        ATSUFontFeatureSelector selectors[] = {kAllTypeFeaturesOffSelector};
7694        Lisp_Object font_id_cons;        Lisp_Object font_id_cons;
7695          
7696        font_id_cons = Fgethash (Fdowncase        font_id_cons = Fgethash (Fdowncase
7697                                 (make_unibyte_string (mfontname,                                 (make_unibyte_string (mfontname,
7698                                                       strlen (mfontname))),                                                       strlen (mfontname))),

Legend:
Removed from v.1.132  
changed lines
  Added in v.1.133

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26