diff options
| author | Eli Zaretskii | 2012-10-09 20:28:06 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2012-10-09 20:28:06 +0200 |
| commit | b97f22cdad55a0964758cef3a19ce3fa1098657d (patch) | |
| tree | 8d078a5b2aab3f55708a5f8eeaf8ca0f022e6ee3 /src | |
| parent | 87c141ce9750881f6203148e3c49d00710cd472e (diff) | |
| parent | b15736e6e33a52021a2a91b0b3360cd5a9803405 (diff) | |
| download | emacs-b97f22cdad55a0964758cef3a19ce3fa1098657d.tar.gz emacs-b97f22cdad55a0964758cef3a19ce3fa1098657d.zip | |
Merge from trunk.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 49 | ||||
| -rw-r--r-- | src/conf_post.h | 16 | ||||
| -rw-r--r-- | src/emacs.c | 24 | ||||
| -rw-r--r-- | src/frame.c | 8 | ||||
| -rw-r--r-- | src/image.c | 25 | ||||
| -rw-r--r-- | src/keyboard.c | 6 | ||||
| -rw-r--r-- | src/makefile.w32-in | 12 | ||||
| -rw-r--r-- | src/nsfont.m | 19 | ||||
| -rw-r--r-- | src/termhooks.h | 2 | ||||
| -rw-r--r-- | src/w32fns.c | 24 | ||||
| -rw-r--r-- | src/w32select.h | 2 | ||||
| -rw-r--r-- | src/w32term.c | 3 | ||||
| -rw-r--r-- | src/xdisp.c | 5 |
13 files changed, 115 insertions, 80 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index d0670d05af3..25a4e92a1ca 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,15 +1,52 @@ | |||
| 1 | 2012-10-09 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * w32fns.c (w32_last_error): Change the return value to DWORD, to | ||
| 4 | match what GetLastError returns. Explain why the function is | ||
| 5 | needed. | ||
| 6 | |||
| 7 | * frame.c (delete_frame): Rename local variable 'tooltip_frame' to | ||
| 8 | 'is_tooltip_frame', to avoid confusion with its global namesake. | ||
| 9 | |||
| 10 | 2012-10-08 Daniel Colascione <dancol@dancol.org> | ||
| 11 | |||
| 12 | * xdisp.c (start_hourglass): Call w32_note_current_window when | ||
| 13 | HAVE_NTGUI, not just WINDOWSNT, resolving a problem in the cygw32 | ||
| 14 | build that caused Emacs to display the hourglass cursor forever. | ||
| 15 | |||
| 16 | * w32fns.c (Fx_display_color_cells): Instead of using NCOLORS, | ||
| 17 | which is broken under remote desktop, calculate the number of | ||
| 18 | colors available for a display based on the display's number of | ||
| 19 | planes and number of bits per pixel per plane. (bug#10397). | ||
| 20 | |||
| 21 | 2012-10-08 Jan Djärv <jan.h.d@swipnet.se> | ||
| 22 | |||
| 23 | * nsfont.m (Vfonts_in_cache): New variable. | ||
| 24 | (nsfont_open): Use unsignedLongLongValue for cache in case wide ints | ||
| 25 | are used. Add cached fonts to Vfonts_in_cache. | ||
| 26 | (syms_of_nsfont): Initialize and staticpro Vfonts_in_cache. | ||
| 27 | |||
| 28 | 2012-10-08 Juanma Barranquero <lekktu@gmail.com> | ||
| 29 | |||
| 30 | * makefile.w32-in (LOCAL_FLAGS): Don't define HAVE_NTGUI, it's now | ||
| 31 | in nt/config.nt. | ||
| 32 | (FONT_H): Define after FRAME_H. | ||
| 33 | ($(BLD)/emacs.$(O), $(BLD)/process.$(O), $(BLD)/w32heap.$(O)): | ||
| 34 | Update dependencies. | ||
| 35 | |||
| 36 | * w32term.c: Remove leftover declaration of keyboard_codepage. | ||
| 37 | |||
| 1 | 2012-10-08 Eli Zaretskii <eliz@gnu.org> | 38 | 2012-10-08 Eli Zaretskii <eliz@gnu.org> |
| 2 | 39 | ||
| 3 | * makefile.w32-in (FONT_H): Add $(FRAME_H). | 40 | * makefile.w32-in (FONT_H): Add $(FRAME_H). |
| 4 | (W32TERM_H): Add $(ATIMER_H) and $(FRAME_H). | 41 | (W32TERM_H): Add $(ATIMER_H) and $(FRAME_H). |
| 5 | ($(BLD)/emacs.$(O), $(BLD)/w32console.$(O)): Update dependencies. | 42 | ($(BLD)/emacs.$(O), $(BLD)/w32console.$(O)): Update dependencies. |
| 6 | (GLOBAL_SOURCES): Add cygw32.c. | 43 | (GLOBAL_SOURCES): Add cygw32.c. |
| 7 | ($(BLD)/unexw32.$(O)): | 44 | ($(BLD)/unexw32.$(O)): |
| 8 | ($(BLD)/w32.$(O)): | 45 | ($(BLD)/w32.$(O)): |
| 9 | ($(BLD)/w32console.$(O)): | 46 | ($(BLD)/w32console.$(O)): |
| 10 | ($(BLD)/w32fns.$(O)): | 47 | ($(BLD)/w32fns.$(O)): |
| 11 | ($(BLD)/w32heap.$(O)): | 48 | ($(BLD)/w32heap.$(O)): |
| 12 | ($(BLD)/w32menu.$(O)): | 49 | ($(BLD)/w32menu.$(O)): |
| 13 | ($(BLD)/w32proc.$(O)): Add w32common.h. | 50 | ($(BLD)/w32proc.$(O)): Add w32common.h. |
| 14 | 51 | ||
| 15 | * w32fns.c (w32_color_map_lookup, x_to_w32_color): Argument is now | 52 | * w32fns.c (w32_color_map_lookup, x_to_w32_color): Argument is now |
diff --git a/src/conf_post.h b/src/conf_post.h index 53fc941f464..aa008107ba6 100644 --- a/src/conf_post.h +++ b/src/conf_post.h | |||
| @@ -142,19 +142,19 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */ | |||
| 142 | #endif | 142 | #endif |
| 143 | #endif | 143 | #endif |
| 144 | 144 | ||
| 145 | #if defined(HAVE_NTGUI) && !defined(DebPrint) | 145 | #if defined HAVE_NTGUI && !defined DebPrint |
| 146 | # if defined(EMACSDEBUG) | 146 | # ifdef EMACSDEBUG |
| 147 | extern void _DebPrint (const char *fmt, ...); | 147 | extern void _DebPrint (const char *fmt, ...); |
| 148 | # define DebPrint(stuff) _DebPrint stuff | 148 | # define DebPrint(stuff) _DebPrint stuff |
| 149 | # else | 149 | # else |
| 150 | # define DebPrint(stuff) | 150 | # define DebPrint(stuff) |
| 151 | # endif /* EMACSDEBUG */ | 151 | # endif |
| 152 | #endif /* DebPrint */ | 152 | #endif |
| 153 | 153 | ||
| 154 | #if defined(CYGWIN) && defined(HAVE_NTGUI) | 154 | #if defined CYGWIN && defined HAVE_NTGUI |
| 155 | #define NTGUI_UNICODE /* Cygwin runs only on UNICODE-supporting systems */ | 155 | # define NTGUI_UNICODE /* Cygwin runs only on UNICODE-supporting systems */ |
| 156 | #define _WIN32_WINNT 0x500 /* Win2k */ | 156 | # define _WIN32_WINNT 0x500 /* Win2k */ |
| 157 | #endif /* CYGWIN && HAVE_NTGUI */ | 157 | #endif |
| 158 | 158 | ||
| 159 | #ifdef emacs /* Don't do this for lib-src. */ | 159 | #ifdef emacs /* Don't do this for lib-src. */ |
| 160 | /* Tell regex.c to use a type compatible with Emacs. */ | 160 | /* Tell regex.c to use a type compatible with Emacs. */ |
diff --git a/src/emacs.c b/src/emacs.c index 1d416984d2d..c84da7411ad 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -34,18 +34,15 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 34 | #ifdef WINDOWSNT | 34 | #ifdef WINDOWSNT |
| 35 | #include <fcntl.h> | 35 | #include <fcntl.h> |
| 36 | #include "w32.h" | 36 | #include "w32.h" |
| 37 | #endif | ||
| 38 | |||
| 39 | #if defined (WINDOWSNT) | ||
| 40 | #include "w32heap.h" | 37 | #include "w32heap.h" |
| 41 | #endif | 38 | #endif |
| 42 | 39 | ||
| 43 | #if defined (WINDOWSNT) || defined (HAVE_NTGUI) | 40 | #if defined WINDOWSNT || defined HAVE_NTGUI |
| 44 | #include "w32select.h" | 41 | #include "w32select.h" |
| 45 | #include "w32font.h" | 42 | #include "w32font.h" |
| 46 | #endif | 43 | #endif |
| 47 | 44 | ||
| 48 | #if defined (HAVE_NTGUI) && defined (CYGWIN) | 45 | #if defined HAVE_NTGUI && defined CYGWIN |
| 49 | #include "cygw32.h" | 46 | #include "cygw32.h" |
| 50 | #endif | 47 | #endif |
| 51 | 48 | ||
| @@ -179,7 +176,7 @@ static uprintmax_t heap_bss_diff; | |||
| 179 | We mark being in the exec'd process by a daemon name argument of | 176 | We mark being in the exec'd process by a daemon name argument of |
| 180 | form "--daemon=\nFD0,FD1\nNAME" where FD are the pipe file descriptors, | 177 | form "--daemon=\nFD0,FD1\nNAME" where FD are the pipe file descriptors, |
| 181 | NAME is the original daemon name, if any. */ | 178 | NAME is the original daemon name, if any. */ |
| 182 | #if defined (NS_IMPL_COCOA) || (defined (HAVE_NTGUI) && defined (CYGWIN)) | 179 | #if defined NS_IMPL_COCOA || (defined HAVE_NTGUI && defined CYGWIN) |
| 183 | # define DAEMON_MUST_EXEC | 180 | # define DAEMON_MUST_EXEC |
| 184 | #endif | 181 | #endif |
| 185 | 182 | ||
| @@ -698,7 +695,7 @@ main (int argc, char **argv) | |||
| 698 | char *dname_arg = 0; | 695 | char *dname_arg = 0; |
| 699 | #ifdef DAEMON_MUST_EXEC | 696 | #ifdef DAEMON_MUST_EXEC |
| 700 | char dname_arg2[80]; | 697 | char dname_arg2[80]; |
| 701 | #endif /* DAEMON_MUST_EXEC */ | 698 | #endif |
| 702 | char *ch_to_dir; | 699 | char *ch_to_dir; |
| 703 | 700 | ||
| 704 | #if GC_MARK_STACK | 701 | #if GC_MARK_STACK |
| @@ -1378,9 +1375,9 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem | |||
| 1378 | #ifdef WINDOWSNT | 1375 | #ifdef WINDOWSNT |
| 1379 | syms_of_ntproc (); | 1376 | syms_of_ntproc (); |
| 1380 | #endif /* WINDOWSNT */ | 1377 | #endif /* WINDOWSNT */ |
| 1381 | #if defined (CYGWIN) && defined (HAVE_NTGUI) | 1378 | #if defined CYGWIN && defined HAVE_NTGUI |
| 1382 | syms_of_cygw32 (); | 1379 | syms_of_cygw32 (); |
| 1383 | #endif /* defined(CYGWIN) && defined (HAVE_NTGUI) */ | 1380 | #endif |
| 1384 | syms_of_window (); | 1381 | syms_of_window (); |
| 1385 | syms_of_xdisp (); | 1382 | syms_of_xdisp (); |
| 1386 | syms_of_font (); | 1383 | syms_of_font (); |
| @@ -1415,9 +1412,9 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem | |||
| 1415 | syms_of_fontset (); | 1412 | syms_of_fontset (); |
| 1416 | #endif /* HAVE_NTGUI */ | 1413 | #endif /* HAVE_NTGUI */ |
| 1417 | 1414 | ||
| 1418 | #if defined (WINDOWSNT) || defined (HAVE_NTGUI) | 1415 | #if defined WINDOWSNT || defined HAVE_NTGUI |
| 1419 | syms_of_w32select (); | 1416 | syms_of_w32select (); |
| 1420 | #endif /* WINDOWSNT || HAVE_NTGUI */ | 1417 | #endif |
| 1421 | 1418 | ||
| 1422 | #ifdef MSDOS | 1419 | #ifdef MSDOS |
| 1423 | syms_of_xmenu (); | 1420 | syms_of_xmenu (); |
| @@ -1466,10 +1463,9 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem | |||
| 1466 | globals_of_w32menu (); | 1463 | globals_of_w32menu (); |
| 1467 | #endif /* HAVE_NTGUI */ | 1464 | #endif /* HAVE_NTGUI */ |
| 1468 | 1465 | ||
| 1469 | #if defined (WINDOWSNT) || defined (HAVE_NTGUI) | 1466 | #if defined WINDOWSNT || defined HAVE_NTGUI |
| 1470 | globals_of_w32select (); | 1467 | globals_of_w32select (); |
| 1471 | #endif /* WINDOWSNT || HAVE_NTGUI */ | 1468 | #endif |
| 1472 | |||
| 1473 | } | 1469 | } |
| 1474 | 1470 | ||
| 1475 | init_charset (); | 1471 | init_charset (); |
diff --git a/src/frame.c b/src/frame.c index 599d8879169..017d051fc1d 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -1124,7 +1124,7 @@ delete_frame (Lisp_Object frame, Lisp_Object force) | |||
| 1124 | struct frame *sf = SELECTED_FRAME (); | 1124 | struct frame *sf = SELECTED_FRAME (); |
| 1125 | struct kboard *kb; | 1125 | struct kboard *kb; |
| 1126 | 1126 | ||
| 1127 | int minibuffer_selected, tooltip_frame; | 1127 | int minibuffer_selected, is_tooltip_frame; |
| 1128 | 1128 | ||
| 1129 | if (EQ (frame, Qnil)) | 1129 | if (EQ (frame, Qnil)) |
| 1130 | { | 1130 | { |
| @@ -1176,13 +1176,13 @@ delete_frame (Lisp_Object frame, Lisp_Object force) | |||
| 1176 | } | 1176 | } |
| 1177 | } | 1177 | } |
| 1178 | 1178 | ||
| 1179 | tooltip_frame = !NILP (Fframe_parameter (frame, intern ("tooltip"))); | 1179 | is_tooltip_frame = !NILP (Fframe_parameter (frame, intern ("tooltip"))); |
| 1180 | 1180 | ||
| 1181 | /* Run `delete-frame-functions' unless FORCE is `noelisp' or | 1181 | /* Run `delete-frame-functions' unless FORCE is `noelisp' or |
| 1182 | frame is a tooltip. FORCE is set to `noelisp' when handling | 1182 | frame is a tooltip. FORCE is set to `noelisp' when handling |
| 1183 | a disconnect from the terminal, so we don't dare call Lisp | 1183 | a disconnect from the terminal, so we don't dare call Lisp |
| 1184 | code. */ | 1184 | code. */ |
| 1185 | if (NILP (Vrun_hooks) || tooltip_frame) | 1185 | if (NILP (Vrun_hooks) || is_tooltip_frame) |
| 1186 | ; | 1186 | ; |
| 1187 | else if (EQ (force, Qnoelisp)) | 1187 | else if (EQ (force, Qnoelisp)) |
| 1188 | pending_funcalls | 1188 | pending_funcalls |
| @@ -1461,7 +1461,7 @@ delete_frame (Lisp_Object frame, Lisp_Object force) | |||
| 1461 | } | 1461 | } |
| 1462 | 1462 | ||
| 1463 | /* Cause frame titles to update--necessary if we now have just one frame. */ | 1463 | /* Cause frame titles to update--necessary if we now have just one frame. */ |
| 1464 | if (!tooltip_frame) | 1464 | if (!is_tooltip_frame) |
| 1465 | update_mode_lines = 1; | 1465 | update_mode_lines = 1; |
| 1466 | 1466 | ||
| 1467 | return Qnil; | 1467 | return Qnil; |
diff --git a/src/image.c b/src/image.c index 6058bdf444c..9b41cf74993 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -75,11 +75,12 @@ typedef struct x_bitmap_record Bitmap_Record; | |||
| 75 | #endif /* HAVE_X_WINDOWS */ | 75 | #endif /* HAVE_X_WINDOWS */ |
| 76 | 76 | ||
| 77 | #ifdef HAVE_NTGUI | 77 | #ifdef HAVE_NTGUI |
| 78 | # ifdef WINDOWSNT | 78 | |
| 79 | /* We only need (or want) w32.h when we're _not_ | 79 | /* We need (or want) w32.h only when we're _not_ compiling for Cygwin. */ |
| 80 | * compiling for Cygwin */ | 80 | #ifdef WINDOWSNT |
| 81 | # include "w32.h" | 81 | # include "w32.h" |
| 82 | # endif /* WINDOWSNT */ | 82 | #endif |
| 83 | |||
| 83 | /* W32_TODO : Color tables on W32. */ | 84 | /* W32_TODO : Color tables on W32. */ |
| 84 | #undef COLOR_TABLE_SUPPORT | 85 | #undef COLOR_TABLE_SUPPORT |
| 85 | 86 | ||
| @@ -571,7 +572,7 @@ extern Lisp_Object Vlibrary_cache; | |||
| 571 | do { Vlibrary_cache = Fcons (Fcons (type, status), Vlibrary_cache); } while (0) | 572 | do { Vlibrary_cache = Fcons (Fcons (type, status), Vlibrary_cache); } while (0) |
| 572 | #else | 573 | #else |
| 573 | #define CACHE_IMAGE_TYPE(type, status) | 574 | #define CACHE_IMAGE_TYPE(type, status) |
| 574 | #endif /* WINDOWSNT */ | 575 | #endif |
| 575 | 576 | ||
| 576 | #define ADD_IMAGE_TYPE(type) \ | 577 | #define ADD_IMAGE_TYPE(type) \ |
| 577 | do { Vimage_types = Fcons (type, Vimage_types); } while (0) | 578 | do { Vimage_types = Fcons (type, Vimage_types); } while (0) |
| @@ -594,7 +595,7 @@ define_image_type (struct image_type *type) | |||
| 594 | 595 | ||
| 595 | if (type->init) | 596 | if (type->init) |
| 596 | { | 597 | { |
| 597 | #if defined (HAVE_NTGUI) && defined (WINDOWSNT) | 598 | #if defined HAVE_NTGUI && defined WINDOWSNT |
| 598 | /* If we failed to load the library before, don't try again. */ | 599 | /* If we failed to load the library before, don't try again. */ |
| 599 | Lisp_Object tested = Fassq (target_type, Vlibrary_cache); | 600 | Lisp_Object tested = Fassq (target_type, Vlibrary_cache); |
| 600 | if (CONSP (tested) && NILP (XCDR (tested))) | 601 | if (CONSP (tested) && NILP (XCDR (tested))) |
| @@ -3013,7 +3014,7 @@ static const struct image_keyword xpm_format[XPM_LAST] = | |||
| 3013 | {":background", IMAGE_STRING_OR_NIL_VALUE, 0} | 3014 | {":background", IMAGE_STRING_OR_NIL_VALUE, 0} |
| 3014 | }; | 3015 | }; |
| 3015 | 3016 | ||
| 3016 | #if defined(HAVE_NTGUI) && defined(WINDOWSNT) | 3017 | #if defined HAVE_NTGUI && defined WINDOWSNT |
| 3017 | static bool init_xpm_functions (void); | 3018 | static bool init_xpm_functions (void); |
| 3018 | #else | 3019 | #else |
| 3019 | #define init_xpm_functions NULL | 3020 | #define init_xpm_functions NULL |
| @@ -3240,7 +3241,7 @@ init_xpm_functions (void) | |||
| 3240 | 3241 | ||
| 3241 | #endif /* WINDOWSNT */ | 3242 | #endif /* WINDOWSNT */ |
| 3242 | 3243 | ||
| 3243 | #if defined (HAVE_NTGUI) && !defined (WINDOWSNT) | 3244 | #if defined HAVE_NTGUI && !defined WINDOWSNT |
| 3244 | /* Glue for code below */ | 3245 | /* Glue for code below */ |
| 3245 | #define fn_XpmReadFileToImage XpmReadFileToImage | 3246 | #define fn_XpmReadFileToImage XpmReadFileToImage |
| 3246 | #define fn_XpmCreateImageFromBuffer XpmCreateImageFromBuffer | 3247 | #define fn_XpmCreateImageFromBuffer XpmCreateImageFromBuffer |
| @@ -5352,7 +5353,7 @@ static const struct image_keyword png_format[PNG_LAST] = | |||
| 5352 | {":background", IMAGE_STRING_OR_NIL_VALUE, 0} | 5353 | {":background", IMAGE_STRING_OR_NIL_VALUE, 0} |
| 5353 | }; | 5354 | }; |
| 5354 | 5355 | ||
| 5355 | #if defined(HAVE_NTGUI) && defined (WINDOWSNT) | 5356 | #if defined HAVE_NTGUI && defined WINDOWSNT |
| 5356 | static bool init_png_functions (void); | 5357 | static bool init_png_functions (void); |
| 5357 | #else | 5358 | #else |
| 5358 | #define init_png_functions NULL | 5359 | #define init_png_functions NULL |
| @@ -6011,7 +6012,7 @@ static const struct image_keyword jpeg_format[JPEG_LAST] = | |||
| 6011 | {":background", IMAGE_STRING_OR_NIL_VALUE, 0} | 6012 | {":background", IMAGE_STRING_OR_NIL_VALUE, 0} |
| 6012 | }; | 6013 | }; |
| 6013 | 6014 | ||
| 6014 | #if defined(HAVE_NTGUI) && defined(WINDOWSNT) | 6015 | #if defined HAVE_NTGUI && defined WINDOWSNT |
| 6015 | static bool init_jpeg_functions (void); | 6016 | static bool init_jpeg_functions (void); |
| 6016 | #else | 6017 | #else |
| 6017 | #define init_jpeg_functions NULL | 6018 | #define init_jpeg_functions NULL |
| @@ -6075,7 +6076,7 @@ jpeg_image_p (Lisp_Object object) | |||
| 6075 | different name. This name, jpeg_boolean, remains in effect through | 6076 | different name. This name, jpeg_boolean, remains in effect through |
| 6076 | the rest of image.c. | 6077 | the rest of image.c. |
| 6077 | */ | 6078 | */ |
| 6078 | #if defined (CYGWIN) && defined (HAVE_NTGUI) | 6079 | #if defined CYGWIN && defined HAVE_NTGUI |
| 6079 | #define boolean jpeg_boolean | 6080 | #define boolean jpeg_boolean |
| 6080 | #endif | 6081 | #endif |
| 6081 | #include <jpeglib.h> | 6082 | #include <jpeglib.h> |
| @@ -7071,7 +7072,7 @@ static const struct image_keyword gif_format[GIF_LAST] = | |||
| 7071 | {":background", IMAGE_STRING_OR_NIL_VALUE, 0} | 7072 | {":background", IMAGE_STRING_OR_NIL_VALUE, 0} |
| 7072 | }; | 7073 | }; |
| 7073 | 7074 | ||
| 7074 | #if defined(HAVE_NTGUI) && defined(WINDOWSNT) | 7075 | #if defined HAVE_NTGUI && defined WINDOWSNT |
| 7075 | static bool init_gif_functions (void); | 7076 | static bool init_gif_functions (void); |
| 7076 | #else | 7077 | #else |
| 7077 | #define init_gif_functions NULL | 7078 | #define init_gif_functions NULL |
diff --git a/src/keyboard.c b/src/keyboard.c index 8316223cd28..2a37e510ba4 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -313,7 +313,7 @@ static Lisp_Object Qmouse_fixup_help_message; | |||
| 313 | /* Symbols to denote kinds of events. */ | 313 | /* Symbols to denote kinds of events. */ |
| 314 | static Lisp_Object Qfunction_key; | 314 | static Lisp_Object Qfunction_key; |
| 315 | Lisp_Object Qmouse_click; | 315 | Lisp_Object Qmouse_click; |
| 316 | #if defined (HAVE_NTGUI) | 316 | #ifdef HAVE_NTGUI |
| 317 | Lisp_Object Qlanguage_change; | 317 | Lisp_Object Qlanguage_change; |
| 318 | #ifdef WINDOWSNT | 318 | #ifdef WINDOWSNT |
| 319 | Lisp_Object Qfile_notify; | 319 | Lisp_Object Qfile_notify; |
| @@ -3950,7 +3950,7 @@ kbd_buffer_get_event (KBOARD **kbp, | |||
| 3950 | x_activate_menubar (XFRAME (event->frame_or_window)); | 3950 | x_activate_menubar (XFRAME (event->frame_or_window)); |
| 3951 | } | 3951 | } |
| 3952 | #endif | 3952 | #endif |
| 3953 | #if defined (HAVE_NTGUI) | 3953 | #ifdef HAVE_NTGUI |
| 3954 | else if (event->kind == LANGUAGE_CHANGE_EVENT) | 3954 | else if (event->kind == LANGUAGE_CHANGE_EVENT) |
| 3955 | { | 3955 | { |
| 3956 | /* Make an event (language-change (FRAME CODEPAGE LANGUAGE-ID)). */ | 3956 | /* Make an event (language-change (FRAME CODEPAGE LANGUAGE-ID)). */ |
| @@ -11407,7 +11407,7 @@ syms_of_keyboard (void) | |||
| 11407 | DEFSYM (Qconfig_changed_event, "config-changed-event"); | 11407 | DEFSYM (Qconfig_changed_event, "config-changed-event"); |
| 11408 | DEFSYM (Qmenu_enable, "menu-enable"); | 11408 | DEFSYM (Qmenu_enable, "menu-enable"); |
| 11409 | 11409 | ||
| 11410 | #if defined (HAVE_NTGUI) | 11410 | #ifdef HAVE_NTGUI |
| 11411 | DEFSYM (Qlanguage_change, "language-change"); | 11411 | DEFSYM (Qlanguage_change, "language-change"); |
| 11412 | DEFSYM (Qfile_notify, "file-notify"); | 11412 | DEFSYM (Qfile_notify, "file-notify"); |
| 11413 | #endif | 11413 | #endif |
diff --git a/src/makefile.w32-in b/src/makefile.w32-in index 29b7925f1b9..f96f765a7fa 100644 --- a/src/makefile.w32-in +++ b/src/makefile.w32-in | |||
| @@ -27,7 +27,7 @@ EMACSLOADPATH=$(CURDIR)/../lisp | |||
| 27 | # Size in MBs of the static heap in temacs.exe. | 27 | # Size in MBs of the static heap in temacs.exe. |
| 28 | HEAPSIZE = $(EMACS_HEAPSIZE) | 28 | HEAPSIZE = $(EMACS_HEAPSIZE) |
| 29 | 29 | ||
| 30 | LOCAL_FLAGS = -Demacs=1 -I../lib -I../nt/inc -DHAVE_NTGUI=1 $(EMACS_EXTRA_C_FLAGS) | 30 | LOCAL_FLAGS = -Demacs=1 -I../lib -I../nt/inc $(EMACS_EXTRA_C_FLAGS) |
| 31 | 31 | ||
| 32 | SRC = . | 32 | SRC = . |
| 33 | EMACS = $(BLD)/emacs.exe | 33 | EMACS = $(BLD)/emacs.exe |
| @@ -424,11 +424,11 @@ DISPEXTERN_H = $(SRC)/dispextern.h \ | |||
| 424 | $(W32GUI_H) | 424 | $(W32GUI_H) |
| 425 | FILEMODE_H = $(GNU_LIB)/filemode.h \ | 425 | FILEMODE_H = $(GNU_LIB)/filemode.h \ |
| 426 | $(NT_INC)/sys/stat.h | 426 | $(NT_INC)/sys/stat.h |
| 427 | FONT_H = $(SRC)/font.h \ | ||
| 428 | $(FRAME_H) \ | ||
| 429 | $(CCL_H) | ||
| 430 | FRAME_H = $(SRC)/frame.h \ | 427 | FRAME_H = $(SRC)/frame.h \ |
| 431 | $(DISPEXTERN_H) | 428 | $(DISPEXTERN_H) |
| 429 | FONT_H = $(SRC)/font.h \ | ||
| 430 | $(CCL_H) \ | ||
| 431 | $(FRAME_H) | ||
| 432 | FTOASTR_H = $(GNU_LIB)/ftoastr.h \ | 432 | FTOASTR_H = $(GNU_LIB)/ftoastr.h \ |
| 433 | $(GNU_LIB)/intprops.h | 433 | $(GNU_LIB)/intprops.h |
| 434 | GRP_H = $(NT_INC)/grp.h \ | 434 | GRP_H = $(NT_INC)/grp.h \ |
| @@ -801,7 +801,6 @@ $(BLD)/emacs.$(O) : \ | |||
| 801 | $(SRC)/w32.h \ | 801 | $(SRC)/w32.h \ |
| 802 | $(SRC)/w32heap.h \ | 802 | $(SRC)/w32heap.h \ |
| 803 | $(SRC)/w32select.h \ | 803 | $(SRC)/w32select.h \ |
| 804 | $(SRC)/w32font.h \ | ||
| 805 | $(NT_INC)/sys/file.h \ | 804 | $(NT_INC)/sys/file.h \ |
| 806 | $(NT_INC)/unistd.h \ | 805 | $(NT_INC)/unistd.h \ |
| 807 | $(GNU_LIB)/ignore-value.h \ | 806 | $(GNU_LIB)/ignore-value.h \ |
| @@ -817,6 +816,7 @@ $(BLD)/emacs.$(O) : \ | |||
| 817 | $(SYSSIGNAL_H) \ | 816 | $(SYSSIGNAL_H) \ |
| 818 | $(SYSTTY_H) \ | 817 | $(SYSTTY_H) \ |
| 819 | $(TERMHOOKS_H) \ | 818 | $(TERMHOOKS_H) \ |
| 819 | $(W32FONT_H) \ | ||
| 820 | $(W32TERM_H) \ | 820 | $(W32TERM_H) \ |
| 821 | $(WINDOW_H) | 821 | $(WINDOW_H) |
| 822 | 822 | ||
| @@ -1191,8 +1191,8 @@ $(BLD)/w32.$(O) : \ | |||
| 1191 | 1191 | ||
| 1192 | $(BLD)/w32heap.$(O) : \ | 1192 | $(BLD)/w32heap.$(O) : \ |
| 1193 | $(SRC)/w32heap.c \ | 1193 | $(SRC)/w32heap.c \ |
| 1194 | $(SRC)/w32heap.h \ | ||
| 1195 | $(SRC)/w32common.h \ | 1194 | $(SRC)/w32common.h \ |
| 1195 | $(SRC)/w32heap.h \ | ||
| 1196 | $(CONFIG_H) \ | 1196 | $(CONFIG_H) \ |
| 1197 | $(LISP_H) | 1197 | $(LISP_H) |
| 1198 | 1198 | ||
diff --git a/src/nsfont.m b/src/nsfont.m index b13c96aa6ed..20a8f5d4028 100644 --- a/src/nsfont.m +++ b/src/nsfont.m | |||
| @@ -53,6 +53,9 @@ extern float ns_antialias_threshold; | |||
| 53 | extern int ns_tmp_flags; | 53 | extern int ns_tmp_flags; |
| 54 | extern struct nsfont_info *ns_tmp_font; | 54 | extern struct nsfont_info *ns_tmp_font; |
| 55 | 55 | ||
| 56 | static Lisp_Object Vfonts_in_cache; | ||
| 57 | |||
| 58 | |||
| 56 | /* font glyph and metrics caching functions, implemented at end */ | 59 | /* font glyph and metrics caching functions, implemented at end */ |
| 57 | static void ns_uni_to_glyphs (struct nsfont_info *font_info, | 60 | static void ns_uni_to_glyphs (struct nsfont_info *font_info, |
| 58 | unsigned char block); | 61 | unsigned char block); |
| @@ -799,8 +802,7 @@ nsfont_open (FRAME_PTR f, Lisp_Object font_entity, int pixel_size) | |||
| 799 | { | 802 | { |
| 800 | if (NSFONT_TRACE) | 803 | if (NSFONT_TRACE) |
| 801 | fprintf(stderr, "*** nsfont_open CACHE HIT!\n"); | 804 | fprintf(stderr, "*** nsfont_open CACHE HIT!\n"); |
| 802 | /* FIXME: Cast from (unsigned long) to Lisp_Object. */ | 805 | XHASH (font_object) = [cached unsignedLongLongValue]; |
| 803 | XHASH (font_object) = [cached unsignedLongValue]; | ||
| 804 | return font_object; | 806 | return font_object; |
| 805 | } | 807 | } |
| 806 | else | 808 | else |
| @@ -808,9 +810,13 @@ nsfont_open (FRAME_PTR f, Lisp_Object font_entity, int pixel_size) | |||
| 808 | font_object = font_make_object (VECSIZE (struct nsfont_info), | 810 | font_object = font_make_object (VECSIZE (struct nsfont_info), |
| 809 | font_entity, pixel_size); | 811 | font_entity, pixel_size); |
| 810 | if (!synthItal) | 812 | if (!synthItal) |
| 811 | [fontCache setObject: [NSNumber numberWithUnsignedLong: | 813 | { |
| 812 | (unsigned long) XHASH (font_object)] | 814 | [fontCache setObject: [NSNumber |
| 813 | forKey: nsfont]; | 815 | numberWithUnsignedLongLong: |
| 816 | (unsigned long long) XHASH (font_object)] | ||
| 817 | forKey: nsfont]; | ||
| 818 | Vfonts_in_cache = Fcons (font_object, Vfonts_in_cache); | ||
| 819 | } | ||
| 814 | } | 820 | } |
| 815 | 821 | ||
| 816 | font_info = (struct nsfont_info *) XFONT_OBJECT (font_object); | 822 | font_info = (struct nsfont_info *) XFONT_OBJECT (font_object); |
| @@ -1529,4 +1535,7 @@ syms_of_nsfont (void) | |||
| 1529 | doc: /* Internal use: maps font registry to Unicode script. */); | 1535 | doc: /* Internal use: maps font registry to Unicode script. */); |
| 1530 | 1536 | ||
| 1531 | ascii_printable = NULL; | 1537 | ascii_printable = NULL; |
| 1538 | |||
| 1539 | Vfonts_in_cache = Qnil; | ||
| 1540 | staticpro (&Vfonts_in_cache); | ||
| 1532 | } | 1541 | } |
diff --git a/src/termhooks.h b/src/termhooks.h index 285a1824ecb..bac86423a4b 100644 --- a/src/termhooks.h +++ b/src/termhooks.h | |||
| @@ -107,7 +107,7 @@ enum event_kind | |||
| 107 | HORIZ_WHEEL_EVENT, /* A wheel event generated by a second | 107 | HORIZ_WHEEL_EVENT, /* A wheel event generated by a second |
| 108 | horizontal wheel that is present on some | 108 | horizontal wheel that is present on some |
| 109 | mice. See WHEEL_EVENT. */ | 109 | mice. See WHEEL_EVENT. */ |
| 110 | #if defined (HAVE_NTGUI) | 110 | #ifdef HAVE_NTGUI |
| 111 | LANGUAGE_CHANGE_EVENT, /* A LANGUAGE_CHANGE_EVENT is | 111 | LANGUAGE_CHANGE_EVENT, /* A LANGUAGE_CHANGE_EVENT is |
| 112 | generated when HAVE_NTGUI or on Mac OS | 112 | generated when HAVE_NTGUI or on Mac OS |
| 113 | when the keyboard layout or input | 113 | when the keyboard layout or input |
diff --git a/src/w32fns.c b/src/w32fns.c index 6eb12ee917e..aa1647fcaa4 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -4645,22 +4645,14 @@ If omitted or nil, that stands for the selected frame's display. */) | |||
| 4645 | (Lisp_Object display) | 4645 | (Lisp_Object display) |
| 4646 | { | 4646 | { |
| 4647 | struct w32_display_info *dpyinfo = check_x_display_info (display); | 4647 | struct w32_display_info *dpyinfo = check_x_display_info (display); |
| 4648 | HDC hdc; | ||
| 4649 | int cap; | 4648 | int cap; |
| 4650 | 4649 | ||
| 4651 | hdc = GetDC (dpyinfo->root_window); | 4650 | /* Don't use NCOLORS: it returns incorrect results under remote |
| 4652 | if (dpyinfo->has_palette) | 4651 | * desktop. We force 24+ bit depths to 24-bit, both to prevent an |
| 4653 | cap = GetDeviceCaps (hdc, SIZEPALETTE); | 4652 | * overflow and because probably is more meaningful on Windows |
| 4654 | else | 4653 | * anyway. */ |
| 4655 | cap = GetDeviceCaps (hdc, NUMCOLORS); | ||
| 4656 | |||
| 4657 | /* We force 24+ bit depths to 24-bit, both to prevent an overflow | ||
| 4658 | and because probably is more meaningful on Windows anyway */ | ||
| 4659 | if (cap < 0) | ||
| 4660 | cap = 1 << min (dpyinfo->n_planes * dpyinfo->n_cbits, 24); | ||
| 4661 | |||
| 4662 | ReleaseDC (dpyinfo->root_window, hdc); | ||
| 4663 | 4654 | ||
| 4655 | cap = 1 << min (dpyinfo->n_planes * dpyinfo->n_cbits, 24); | ||
| 4664 | return make_number (cap); | 4656 | return make_number (cap); |
| 4665 | } | 4657 | } |
| 4666 | 4658 | ||
| @@ -6994,8 +6986,10 @@ w32_strerror (int error_no) | |||
| 6994 | return buf; | 6986 | return buf; |
| 6995 | } | 6987 | } |
| 6996 | 6988 | ||
| 6997 | /* For convenience when debugging. */ | 6989 | /* For convenience when debugging. (You cannot call GetLastError |
| 6998 | int | 6990 | directly from GDB: it will crash, because it uses the __stdcall |
| 6991 | calling convention, not the _cdecl convention assumed by GDB.) */ | ||
| 6992 | DWORD | ||
| 6999 | w32_last_error (void) | 6993 | w32_last_error (void) |
| 7000 | { | 6994 | { |
| 7001 | return GetLastError (); | 6995 | return GetLastError (); |
diff --git a/src/w32select.h b/src/w32select.h index e895c3d9bf2..4f4de59f7fe 100644 --- a/src/w32select.h +++ b/src/w32select.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Selection processing for Emacs on the Microsoft W32 API. | 1 | /* Selection processing for Emacs on the Microsoft W32 API. |
| 2 | 2 | ||
| 3 | Copyright (C) 1993-1994, 2001-2011 Free Software Foundation, Inc. | 3 | Copyright (C) 1993-1994, 2001-2012 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/src/w32term.c b/src/w32term.c index b18d07135ed..806b82297f1 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -201,9 +201,6 @@ static int input_signal_count; | |||
| 201 | int w32_message_fd = -1; | 201 | int w32_message_fd = -1; |
| 202 | #endif /* CYGWIN */ | 202 | #endif /* CYGWIN */ |
| 203 | 203 | ||
| 204 | /* Keyboard code page - may be changed by language-change events. */ | ||
| 205 | static int keyboard_codepage; | ||
| 206 | |||
| 207 | static void x_update_window_end (struct window *, int, int); | 204 | static void x_update_window_end (struct window *, int, int); |
| 208 | static void w32_handle_tool_bar_click (struct frame *, | 205 | static void w32_handle_tool_bar_click (struct frame *, |
| 209 | struct input_event *); | 206 | struct input_event *); |
diff --git a/src/xdisp.c b/src/xdisp.c index 2047c0e78c1..1e61a74068b 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -29379,9 +29379,10 @@ start_hourglass (void) | |||
| 29379 | else | 29379 | else |
| 29380 | delay = make_emacs_time (DEFAULT_HOURGLASS_DELAY, 0); | 29380 | delay = make_emacs_time (DEFAULT_HOURGLASS_DELAY, 0); |
| 29381 | 29381 | ||
| 29382 | #ifdef WINDOWSNT | 29382 | #ifdef HAVE_NTGUI |
| 29383 | extern void w32_note_current_window (void); | ||
| 29383 | w32_note_current_window (); | 29384 | w32_note_current_window (); |
| 29384 | #endif | 29385 | #endif /* HAVE_NTGUI */ |
| 29385 | 29386 | ||
| 29386 | hourglass_atimer = start_atimer (ATIMER_RELATIVE, delay, | 29387 | hourglass_atimer = start_atimer (ATIMER_RELATIVE, delay, |
| 29387 | show_hourglass, NULL); | 29388 | show_hourglass, NULL); |