aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nsterm.m23
-rw-r--r--src/xfns.c21
2 files changed, 26 insertions, 18 deletions
diff --git a/src/nsterm.m b/src/nsterm.m
index b270e0e58b5..860c55de70f 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -1161,11 +1161,24 @@ ns_clip_to_row (struct window *w, struct glyph_row *row,
1161 1161
1162- (id)init; 1162- (id)init;
1163{ 1163{
1164 NSTRACE ("[EmacsBell init]");
1164 if ((self = [super init])) 1165 if ((self = [super init]))
1165 { 1166 {
1166 nestCount = 0; 1167 nestCount = 0;
1167 isAttached = false; 1168 isAttached = false;
1169#ifdef NS_IMPL_GNUSTEP
1170 // GNUstep doesn't provide named images. This was reported in
1171 // 2011, see https://savannah.gnu.org/bugs/?33396
1172 //
1173 // As a drop in replacment, a semi tranparent gray square is used.
1174 self.image = [[NSImage alloc] initWithSize:NSMakeSize(32, 32)];
1175 [self.image lockFocus];
1176 [[NSColor colorForEmacsRed:0.5 green:0.5 blue:0.5 alpha:0.5] set];
1177 NSRectFill(NSMakeRect(0, 0, 32, 32));
1178 [self.image unlockFocus];
1179#else
1168 self.image = [NSImage imageNamed:NSImageNameCaution]; 1180 self.image = [NSImage imageNamed:NSImageNameCaution];
1181#endif
1169 } 1182 }
1170 return self; 1183 return self;
1171} 1184}
@@ -1572,7 +1585,6 @@ x_set_window_size (struct frame *f,
1572 NSRect wr = [window frame]; 1585 NSRect wr = [window frame];
1573 int tb = FRAME_EXTERNAL_TOOL_BAR (f); 1586 int tb = FRAME_EXTERNAL_TOOL_BAR (f);
1574 int pixelwidth, pixelheight; 1587 int pixelwidth, pixelheight;
1575 int rows, cols;
1576 int orig_height = wr.size.height; 1588 int orig_height = wr.size.height;
1577 1589
1578 NSTRACE ("x_set_window_size"); 1590 NSTRACE ("x_set_window_size");
@@ -1590,15 +1602,11 @@ x_set_window_size (struct frame *f,
1590 { 1602 {
1591 pixelwidth = FRAME_TEXT_TO_PIXEL_WIDTH (f, width); 1603 pixelwidth = FRAME_TEXT_TO_PIXEL_WIDTH (f, width);
1592 pixelheight = FRAME_TEXT_TO_PIXEL_HEIGHT (f, height); 1604 pixelheight = FRAME_TEXT_TO_PIXEL_HEIGHT (f, height);
1593 cols = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, pixelwidth);
1594 rows = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, pixelheight);
1595 } 1605 }
1596 else 1606 else
1597 { 1607 {
1598 pixelwidth = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, width); 1608 pixelwidth = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, width);
1599 pixelheight = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, height); 1609 pixelheight = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, height);
1600 cols = width;
1601 rows = height;
1602 } 1610 }
1603 1611
1604 /* If we have a toolbar, take its height into account. */ 1612 /* If we have a toolbar, take its height into account. */
@@ -2631,13 +2639,13 @@ ns_draw_fringe_bitmap (struct window *w, struct glyph_row *row,
2631 [img setXBMColor: bm_color]; 2639 [img setXBMColor: bm_color];
2632 } 2640 }
2633 2641
2642#ifdef NS_IMPL_COCOA
2634 // Note: For periodic images, the full image height is "h + hd". 2643 // Note: For periodic images, the full image height is "h + hd".
2635 // By using the height h, a suitable part of the image is used. 2644 // By using the height h, a suitable part of the image is used.
2636 NSRect fromRect = NSMakeRect(0, 0, p->wd, p->h); 2645 NSRect fromRect = NSMakeRect(0, 0, p->wd, p->h);
2637 2646
2638 NSTRACE_RECT ("fromRect", fromRect); 2647 NSTRACE_RECT ("fromRect", fromRect);
2639 2648
2640#ifdef NS_IMPL_COCOA
2641 [img drawInRect: r 2649 [img drawInRect: r
2642 fromRect: fromRect 2650 fromRect: fromRect
2643 operation: NSCompositeSourceOver 2651 operation: NSCompositeSourceOver
@@ -6357,7 +6365,6 @@ not_in_argv (NSString *arg)
6357 if (oldr != rows || oldc != cols || neww != oldw || newh != oldh) 6365 if (oldr != rows || oldc != cols || neww != oldw || newh != oldh)
6358 { 6366 {
6359 NSView *view = FRAME_NS_VIEW (emacsframe); 6367 NSView *view = FRAME_NS_VIEW (emacsframe);
6360 NSWindow *win = [view window];
6361 6368
6362 change_frame_size (emacsframe, 6369 change_frame_size (emacsframe,
6363 FRAME_PIXEL_TO_TEXT_WIDTH (emacsframe, neww), 6370 FRAME_PIXEL_TO_TEXT_WIDTH (emacsframe, neww),
@@ -7778,8 +7785,6 @@ not_in_argv (NSString *arg)
7778 7785
7779- (void)zoom:(id)sender 7786- (void)zoom:(id)sender
7780{ 7787{
7781 struct frame * f = SELECTED_FRAME ();
7782
7783 NSTRACE ("[EmacsWindow zoom:]"); 7788 NSTRACE ("[EmacsWindow zoom:]");
7784 7789
7785 ns_update_auto_hide_menu_bar(); 7790 ns_update_auto_hide_menu_bar();
diff --git a/src/xfns.c b/src/xfns.c
index aad9680c4df..9624ac5d9ac 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -6084,16 +6084,19 @@ Value is t if tooltip was open, nil otherwise. */)
6084 items is unmapped. Redisplay the menu manually... */ 6084 items is unmapped. Redisplay the menu manually... */
6085 { 6085 {
6086 Widget w; 6086 Widget w;
6087 struct frame *f = SELECTED_FRAME (); 6087 struct frame *f = SELECTED_FRAME ();
6088 w = f->output_data.x->menubar_widget; 6088 if (FRAME_X_P (f) && FRAME_LIVE_P (f))
6089 {
6090 w = f->output_data.x->menubar_widget;
6089 6091
6090 if (!DoesSaveUnders (FRAME_DISPLAY_INFO (f)->screen) 6092 if (!DoesSaveUnders (FRAME_DISPLAY_INFO (f)->screen)
6091 && w != NULL) 6093 && w != NULL)
6092 { 6094 {
6093 block_input (); 6095 block_input ();
6094 xlwmenu_redisplay (w); 6096 xlwmenu_redisplay (w);
6095 unblock_input (); 6097 unblock_input ();
6096 } 6098 }
6099 }
6097 } 6100 }
6098#endif /* USE_LUCID */ 6101#endif /* USE_LUCID */
6099 } 6102 }