aboutsummaryrefslogtreecommitdiffstats
path: root/src/frame.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/frame.c')
-rw-r--r--src/frame.c39
1 files changed, 15 insertions, 24 deletions
diff --git a/src/frame.c b/src/frame.c
index c871e4fd994..c4dfc35a0c5 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -35,7 +35,6 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
35#include "buffer.h" 35#include "buffer.h"
36/* These help us bind and responding to switch-frame events. */ 36/* These help us bind and responding to switch-frame events. */
37#include "keyboard.h" 37#include "keyboard.h"
38#include "ptr-bounds.h"
39#include "frame.h" 38#include "frame.h"
40#include "blockinput.h" 39#include "blockinput.h"
41#include "termchar.h" 40#include "termchar.h"
@@ -2566,21 +2565,18 @@ before calling this function on it, like this.
2566 if (FRAME_WINDOW_P (XFRAME (frame))) 2565 if (FRAME_WINDOW_P (XFRAME (frame)))
2567 /* Warping the mouse will cause enternotify and focus events. */ 2566 /* Warping the mouse will cause enternotify and focus events. */
2568 frame_set_mouse_position (XFRAME (frame), xval, yval); 2567 frame_set_mouse_position (XFRAME (frame), xval, yval);
2569#else 2568#elif defined MSDOS
2570#if defined (MSDOS)
2571 if (FRAME_MSDOS_P (XFRAME (frame))) 2569 if (FRAME_MSDOS_P (XFRAME (frame)))
2572 { 2570 {
2573 Fselect_frame (frame, Qnil); 2571 Fselect_frame (frame, Qnil);
2574 mouse_moveto (xval, yval); 2572 mouse_moveto (xval, yval);
2575 } 2573 }
2574#elif defined HAVE_GPM
2575 Fselect_frame (frame, Qnil);
2576 term_mouse_moveto (xval, yval);
2576#else 2577#else
2577#ifdef HAVE_GPM 2578 (void) xval;
2578 { 2579 (void) yval;
2579 Fselect_frame (frame, Qnil);
2580 term_mouse_moveto (xval, yval);
2581 }
2582#endif
2583#endif
2584#endif 2580#endif
2585 2581
2586 return Qnil; 2582 return Qnil;
@@ -2607,21 +2603,18 @@ before calling this function on it, like this.
2607 if (FRAME_WINDOW_P (XFRAME (frame))) 2603 if (FRAME_WINDOW_P (XFRAME (frame)))
2608 /* Warping the mouse will cause enternotify and focus events. */ 2604 /* Warping the mouse will cause enternotify and focus events. */
2609 frame_set_mouse_pixel_position (XFRAME (frame), xval, yval); 2605 frame_set_mouse_pixel_position (XFRAME (frame), xval, yval);
2610#else 2606#elif defined MSDOS
2611#if defined (MSDOS)
2612 if (FRAME_MSDOS_P (XFRAME (frame))) 2607 if (FRAME_MSDOS_P (XFRAME (frame)))
2613 { 2608 {
2614 Fselect_frame (frame, Qnil); 2609 Fselect_frame (frame, Qnil);
2615 mouse_moveto (xval, yval); 2610 mouse_moveto (xval, yval);
2616 } 2611 }
2612#elif defined HAVE_GPM
2613 Fselect_frame (frame, Qnil);
2614 term_mouse_moveto (xval, yval);
2617#else 2615#else
2618#ifdef HAVE_GPM 2616 (void) xval;
2619 { 2617 (void) yval;
2620 Fselect_frame (frame, Qnil);
2621 term_mouse_moveto (xval, yval);
2622 }
2623#endif
2624#endif
2625#endif 2618#endif
2626 2619
2627 return Qnil; 2620 return Qnil;
@@ -3658,6 +3651,9 @@ bottom edge of FRAME's display. */)
3658#ifdef HAVE_WINDOW_SYSTEM 3651#ifdef HAVE_WINDOW_SYSTEM
3659 if (FRAME_TERMINAL (f)->set_frame_offset_hook) 3652 if (FRAME_TERMINAL (f)->set_frame_offset_hook)
3660 FRAME_TERMINAL (f)->set_frame_offset_hook (f, xval, yval, 1); 3653 FRAME_TERMINAL (f)->set_frame_offset_hook (f, xval, yval, 1);
3654#else
3655 (void) xval;
3656 (void) yval;
3661#endif 3657#endif
3662 } 3658 }
3663 3659
@@ -5019,8 +5015,6 @@ gui_display_get_resource (Display_Info *dpyinfo, Lisp_Object attribute,
5019 USE_SAFE_ALLOCA; 5015 USE_SAFE_ALLOCA;
5020 char *name_key = SAFE_ALLOCA (name_keysize + class_keysize); 5016 char *name_key = SAFE_ALLOCA (name_keysize + class_keysize);
5021 char *class_key = name_key + name_keysize; 5017 char *class_key = name_key + name_keysize;
5022 name_key = ptr_bounds_clip (name_key, name_keysize);
5023 class_key = ptr_bounds_clip (class_key, class_keysize);
5024 5018
5025 /* Start with emacs.FRAMENAME for the name (the specific one) 5019 /* Start with emacs.FRAMENAME for the name (the specific one)
5026 and with `Emacs' for the class key (the general one). */ 5020 and with `Emacs' for the class key (the general one). */
@@ -5091,9 +5085,6 @@ x_get_resource_string (const char *attribute, const char *class)
5091 ptrdiff_t class_keysize = sizeof (EMACS_CLASS) - 1 + strlen (class) + 2; 5085 ptrdiff_t class_keysize = sizeof (EMACS_CLASS) - 1 + strlen (class) + 2;
5092 char *name_key = SAFE_ALLOCA (name_keysize + class_keysize); 5086 char *name_key = SAFE_ALLOCA (name_keysize + class_keysize);
5093 char *class_key = name_key + name_keysize; 5087 char *class_key = name_key + name_keysize;
5094 name_key = ptr_bounds_clip (name_key, name_keysize);
5095 class_key = ptr_bounds_clip (class_key, class_keysize);
5096
5097 esprintf (name_key, "%s.%s", SSDATA (Vinvocation_name), attribute); 5088 esprintf (name_key, "%s.%s", SSDATA (Vinvocation_name), attribute);
5098 sprintf (class_key, "%s.%s", EMACS_CLASS, class); 5089 sprintf (class_key, "%s.%s", EMACS_CLASS, class);
5099 5090