diff options
| author | Paul Eggert | 2016-03-22 11:04:36 -0700 |
|---|---|---|
| committer | Paul Eggert | 2016-03-22 11:04:36 -0700 |
| commit | f95bbe5a67e03fe6d05cbfb4d0c9151a754d6ccd (patch) | |
| tree | 770fbf699587d51ed3a374c6f01bdd655394c66c /src | |
| parent | 4869e0d85a215e7fb0262430a48aa4d5804bf0a4 (diff) | |
| parent | b8ea08b037fb16395b90481162587706e71b487c (diff) | |
| download | emacs-f95bbe5a67e03fe6d05cbfb4d0c9151a754d6ccd.tar.gz emacs-f95bbe5a67e03fe6d05cbfb4d0c9151a754d6ccd.zip | |
-
Diffstat (limited to 'src')
| -rw-r--r-- | src/bidi.c | 2 | ||||
| -rw-r--r-- | src/emacsgtkfixed.c | 3 | ||||
| -rw-r--r-- | src/emacsgtkfixed.h | 1 | ||||
| -rw-r--r-- | src/floatfns.c | 3 | ||||
| -rw-r--r-- | src/gtkutil.c | 12 | ||||
| -rw-r--r-- | src/lisp.h | 3 | ||||
| -rw-r--r-- | src/nsterm.m | 30 |
7 files changed, 38 insertions, 16 deletions
diff --git a/src/bidi.c b/src/bidi.c index a68ffdb7e6d..c23ff954356 100644 --- a/src/bidi.c +++ b/src/bidi.c | |||
| @@ -532,7 +532,7 @@ bidi_copy_it (struct bidi_it *to, struct bidi_it *from) | |||
| 532 | /* Copy everything from the start through the active part of | 532 | /* Copy everything from the start through the active part of |
| 533 | the level stack. */ | 533 | the level stack. */ |
| 534 | memcpy (to, from, | 534 | memcpy (to, from, |
| 535 | (offsetof (struct bidi_it, level_stack[1]) | 535 | (offsetof (struct bidi_it, level_stack) + sizeof from->level_stack[0] |
| 536 | + from->stack_idx * sizeof from->level_stack[0])); | 536 | + from->stack_idx * sizeof from->level_stack[0])); |
| 537 | } | 537 | } |
| 538 | 538 | ||
diff --git a/src/emacsgtkfixed.c b/src/emacsgtkfixed.c index cebd7b613c7..ca0bbfbb866 100644 --- a/src/emacsgtkfixed.c +++ b/src/emacsgtkfixed.c | |||
| @@ -27,13 +27,12 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 27 | #include "emacsgtkfixed.h" | 27 | #include "emacsgtkfixed.h" |
| 28 | 28 | ||
| 29 | /* Silence a bogus diagnostic; see GNOME bug 683906. */ | 29 | /* Silence a bogus diagnostic; see GNOME bug 683906. */ |
| 30 | #if 4 < __GNUC__ + (7 <= __GNUC_MINOR__) | 30 | #if 4 < __GNUC__ + (7 <= __GNUC_MINOR__) && ! GLIB_CHECK_VERSION (2, 35, 7) |
| 31 | # pragma GCC diagnostic push | 31 | # pragma GCC diagnostic push |
| 32 | # pragma GCC diagnostic ignored "-Wunused-local-typedefs" | 32 | # pragma GCC diagnostic ignored "-Wunused-local-typedefs" |
| 33 | #endif | 33 | #endif |
| 34 | 34 | ||
| 35 | typedef struct _EmacsFixed EmacsFixed; | 35 | typedef struct _EmacsFixed EmacsFixed; |
| 36 | typedef struct _EmacsFixedPrivate EmacsFixedPrivate; | ||
| 37 | typedef struct _EmacsFixedClass EmacsFixedClass; | 36 | typedef struct _EmacsFixedClass EmacsFixedClass; |
| 38 | 37 | ||
| 39 | struct _EmacsFixedPrivate | 38 | struct _EmacsFixedPrivate |
diff --git a/src/emacsgtkfixed.h b/src/emacsgtkfixed.h index 3d6a76ab570..0d09525e02a 100644 --- a/src/emacsgtkfixed.h +++ b/src/emacsgtkfixed.h | |||
| @@ -30,7 +30,6 @@ G_BEGIN_DECLS | |||
| 30 | struct frame; | 30 | struct frame; |
| 31 | 31 | ||
| 32 | typedef struct _EmacsFixedPrivate EmacsFixedPrivate; | 32 | typedef struct _EmacsFixedPrivate EmacsFixedPrivate; |
| 33 | typedef struct _EmacsFixedClass EmacsFixedClass; | ||
| 34 | 33 | ||
| 35 | struct _EmacsFixed | 34 | struct _EmacsFixed |
| 36 | { | 35 | { |
diff --git a/src/floatfns.c b/src/floatfns.c index b9af03b3431..c1bd25877e3 100644 --- a/src/floatfns.c +++ b/src/floatfns.c | |||
| @@ -3,8 +3,7 @@ | |||
| 3 | Copyright (C) 1988, 1993-1994, 1999, 2001-2016 Free Software Foundation, | 3 | Copyright (C) 1988, 1993-1994, 1999, 2001-2016 Free Software Foundation, |
| 4 | Inc. | 4 | Inc. |
| 5 | 5 | ||
| 6 | Author: Wolfgang Rupprecht (ac | 6 | Author: Wolfgang Rupprecht (according to ack.texi) |
| 7 | ording to ack.texi) | ||
| 8 | 7 | ||
| 9 | This file is part of GNU Emacs. | 8 | This file is part of GNU Emacs. |
| 10 | 9 | ||
diff --git a/src/gtkutil.c b/src/gtkutil.c index 7dca5851f29..ba059b73a70 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c | |||
| @@ -1300,7 +1300,7 @@ xg_create_frame_widgets (struct frame *f) | |||
| 1300 | if (! g_signal_handler_find (G_OBJECT (gs), | 1300 | if (! g_signal_handler_find (G_OBJECT (gs), |
| 1301 | G_SIGNAL_MATCH_FUNC, | 1301 | G_SIGNAL_MATCH_FUNC, |
| 1302 | 0, 0, 0, | 1302 | 0, 0, 0, |
| 1303 | G_CALLBACK (style_changed_cb), | 1303 | (gpointer) G_CALLBACK (style_changed_cb), |
| 1304 | 0)) | 1304 | 0)) |
| 1305 | { | 1305 | { |
| 1306 | g_signal_connect (G_OBJECT (gs), "notify::gtk-theme-name", | 1306 | g_signal_connect (G_OBJECT (gs), "notify::gtk-theme-name", |
| @@ -1832,14 +1832,10 @@ xg_toggle_notify_cb (GObject *gobject, GParamSpec *arg1, gpointer user_data) | |||
| 1832 | 1832 | ||
| 1833 | if (!!visible != !!toggle_on) | 1833 | if (!!visible != !!toggle_on) |
| 1834 | { | 1834 | { |
| 1835 | g_signal_handlers_block_by_func (G_OBJECT (wtoggle), | 1835 | gpointer cb = (gpointer) G_CALLBACK (xg_toggle_visibility_cb); |
| 1836 | G_CALLBACK (xg_toggle_visibility_cb), | 1836 | g_signal_handlers_block_by_func (G_OBJECT (wtoggle), cb, gobject); |
| 1837 | gobject); | ||
| 1838 | gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (wtoggle), visible); | 1837 | gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (wtoggle), visible); |
| 1839 | g_signal_handlers_unblock_by_func | 1838 | g_signal_handlers_unblock_by_func (G_OBJECT (wtoggle), cb, gobject); |
| 1840 | (G_OBJECT (wtoggle), | ||
| 1841 | G_CALLBACK (xg_toggle_visibility_cb), | ||
| 1842 | gobject); | ||
| 1843 | } | 1839 | } |
| 1844 | x_gtk_show_hidden_files = visible; | 1840 | x_gtk_show_hidden_files = visible; |
| 1845 | } | 1841 | } |
diff --git a/src/lisp.h b/src/lisp.h index d0abb24b685..e606ffa0259 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -1768,7 +1768,8 @@ CHAR_TABLE_EXTRA_SLOTS (struct Lisp_Char_Table *ct) | |||
| 1768 | 1768 | ||
| 1769 | /* Make sure that sub char-table contents slot is where we think it is. */ | 1769 | /* Make sure that sub char-table contents slot is where we think it is. */ |
| 1770 | verify (offsetof (struct Lisp_Sub_Char_Table, contents) | 1770 | verify (offsetof (struct Lisp_Sub_Char_Table, contents) |
| 1771 | == offsetof (struct Lisp_Vector, contents[SUB_CHAR_TABLE_OFFSET])); | 1771 | == (offsetof (struct Lisp_Vector, contents) |
| 1772 | + SUB_CHAR_TABLE_OFFSET * sizeof (Lisp_Object))); | ||
| 1772 | 1773 | ||
| 1773 | /*********************************************************************** | 1774 | /*********************************************************************** |
| 1774 | Symbols | 1775 | Symbols |
diff --git a/src/nsterm.m b/src/nsterm.m index 38aa4a3a413..b796193af77 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -1172,10 +1172,31 @@ ns_clip_to_row (struct window *w, struct glyph_row *row, | |||
| 1172 | ========================================================================== */ | 1172 | ========================================================================== */ |
| 1173 | 1173 | ||
| 1174 | 1174 | ||
| 1175 | // This bell implementation shows the visual bell image asynchronously | ||
| 1176 | // from the rest of Emacs. This is done by adding a NSView to the | ||
| 1177 | // superview of the Emacs window and removing it using a timer. | ||
| 1178 | // | ||
| 1179 | // Unfortunately, some Emacs operations, like scrolling, is done using | ||
| 1180 | // low-level primitives that copy the content of the window, including | ||
| 1181 | // the bell image. To some extent, this is handled by removing the | ||
| 1182 | // image prior to scrolling and marking that the window is in need for | ||
| 1183 | // redisplay. | ||
| 1184 | // | ||
| 1185 | // To test this code, make sure that there is no artifacts of the bell | ||
| 1186 | // image in the following situations. Use a non-empty buffer (like the | ||
| 1187 | // tutorial) to ensure that a scroll is performed: | ||
| 1188 | // | ||
| 1189 | // * Single-window: C-g C-v | ||
| 1190 | // | ||
| 1191 | // * Side-by-windows: C-x 3 C-g C-v | ||
| 1192 | // | ||
| 1193 | // * Windows above each other: C-x 2 C-g C-v | ||
| 1194 | |||
| 1175 | @interface EmacsBell : NSImageView | 1195 | @interface EmacsBell : NSImageView |
| 1176 | { | 1196 | { |
| 1177 | // Number of currently active bell:s. | 1197 | // Number of currently active bell:s. |
| 1178 | unsigned int nestCount; | 1198 | unsigned int nestCount; |
| 1199 | NSView * mView; | ||
| 1179 | bool isAttached; | 1200 | bool isAttached; |
| 1180 | } | 1201 | } |
| 1181 | - (void)show:(NSView *)view; | 1202 | - (void)show:(NSView *)view; |
| @@ -1204,7 +1225,6 @@ ns_clip_to_row (struct window *w, struct glyph_row *row, | |||
| 1204 | [self.image unlockFocus]; | 1225 | [self.image unlockFocus]; |
| 1205 | #else | 1226 | #else |
| 1206 | self.image = [NSImage imageNamed:NSImageNameCaution]; | 1227 | self.image = [NSImage imageNamed:NSImageNameCaution]; |
| 1207 | [self.image setScalesWhenResized:YES]; | ||
| 1208 | [self.image setSize:NSMakeSize(self.image.size.width * 5, | 1228 | [self.image setSize:NSMakeSize(self.image.size.width * 5, |
| 1209 | self.image.size.height * 5)]; | 1229 | self.image.size.height * 5)]; |
| 1210 | #endif | 1230 | #endif |
| @@ -1229,6 +1249,7 @@ ns_clip_to_row (struct window *w, struct glyph_row *row, | |||
| 1229 | [self setFrameSize:self.image.size]; | 1249 | [self setFrameSize:self.image.size]; |
| 1230 | 1250 | ||
| 1231 | isAttached = true; | 1251 | isAttached = true; |
| 1252 | mView = view; | ||
| 1232 | [[[view window] contentView] addSubview:self | 1253 | [[[view window] contentView] addSubview:self |
| 1233 | positioned:NSWindowAbove | 1254 | positioned:NSWindowAbove |
| 1234 | relativeTo:nil]; | 1255 | relativeTo:nil]; |
| @@ -1258,9 +1279,12 @@ ns_clip_to_row (struct window *w, struct glyph_row *row, | |||
| 1258 | 1279 | ||
| 1259 | -(void)remove | 1280 | -(void)remove |
| 1260 | { | 1281 | { |
| 1282 | NSTRACE ("[EmacsBell remove]"); | ||
| 1261 | if (isAttached) | 1283 | if (isAttached) |
| 1262 | { | 1284 | { |
| 1285 | NSTRACE_MSG ("removeFromSuperview"); | ||
| 1263 | [self removeFromSuperview]; | 1286 | [self removeFromSuperview]; |
| 1287 | mView.needsDisplay = YES; | ||
| 1264 | isAttached = false; | 1288 | isAttached = false; |
| 1265 | } | 1289 | } |
| 1266 | } | 1290 | } |
| @@ -1310,6 +1334,8 @@ static void hide_bell () | |||
| 1310 | Ensure the bell is hidden. | 1334 | Ensure the bell is hidden. |
| 1311 | -------------------------------------------------------------------------- */ | 1335 | -------------------------------------------------------------------------- */ |
| 1312 | { | 1336 | { |
| 1337 | NSTRACE ("hide_bell"); | ||
| 1338 | |||
| 1313 | if (bell_view != nil) | 1339 | if (bell_view != nil) |
| 1314 | { | 1340 | { |
| 1315 | [bell_view remove]; | 1341 | [bell_view remove]; |
| @@ -2392,6 +2418,8 @@ ns_clear_frame_area (struct frame *f, int x, int y, int width, int height) | |||
| 2392 | static void | 2418 | static void |
| 2393 | ns_copy_bits (struct frame *f, NSRect src, NSRect dest) | 2419 | ns_copy_bits (struct frame *f, NSRect src, NSRect dest) |
| 2394 | { | 2420 | { |
| 2421 | NSTRACE ("ns_copy_bits"); | ||
| 2422 | |||
| 2395 | if (FRAME_NS_VIEW (f)) | 2423 | if (FRAME_NS_VIEW (f)) |
| 2396 | { | 2424 | { |
| 2397 | hide_bell(); // Ensure the bell image isn't scrolled. | 2425 | hide_bell(); // Ensure the bell image isn't scrolled. |