emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/keyboard.c


From: Kim F. Storm
Subject: [Emacs-diffs] Changes to emacs/src/keyboard.c
Date: Sat, 24 May 2003 17:59:25 -0400

Index: emacs/src/keyboard.c
diff -c emacs/src/keyboard.c:1.745 emacs/src/keyboard.c:1.746
*** emacs/src/keyboard.c:1.745  Sat May 24 10:52:10 2003
--- emacs/src/keyboard.c        Sat May 24 17:59:25 2003
***************
*** 5115,5120 ****
--- 5115,5121 ----
            Lisp_Object posn;
            Lisp_Object string_info = Qnil;
            int row, column;
+           int wx, wy;
  
            /* Ignore mouse events that were made on frame that
               have been deleted.  */
***************
*** 5186,5192 ****
            /* Set `window' to the window under frame pixel coordinates
               event->x/event->y.  */
            window = window_from_coordinates (f, XINT (event->x),
!                                             XINT (event->y), &part, 0);
  
            if (!WINDOWP (window))
              {
--- 5187,5194 ----
            /* Set `window' to the window under frame pixel coordinates
               event->x/event->y.  */
            window = window_from_coordinates (f, XINT (event->x),
!                                             XINT (event->y),
!                                             &part, &wx, &wy, 0);
  
            if (!WINDOWP (window))
              {
***************
*** 5199,5209 ****
                   event->x/ event->y.  */
                struct window *w = XWINDOW (window);
  
-               /* Get window relative coordinates.  Original code
-                  `rounded' this to glyph boundaries.  */
-               int wx = FRAME_TO_WINDOW_PIXEL_X (w, XINT (event->x));
-               int wy = FRAME_TO_WINDOW_PIXEL_Y (w, XINT (event->y));
- 
                /* Set event coordinates to window-relative coordinates
                   for constructing the Lisp event below.  */
                XSETINT (event->x, wx);
--- 5201,5206 ----
***************
*** 5534,5540 ****
        pixel_to_glyph_coords (f, XINT (event->x), XINT (event->y),
                               &column, &row, NULL, 1);
        window = window_from_coordinates (f, XINT (event->x),
!                                           XINT (event->y), &part, 0);
  
        if (!WINDOWP (window))
          {
--- 5531,5538 ----
        pixel_to_glyph_coords (f, XINT (event->x), XINT (event->y),
                               &column, &row, NULL, 1);
        window = window_from_coordinates (f, XINT (event->x),
!                                           XINT (event->y),
!                                         &part, 0, 0, 0);
  
        if (!WINDOWP (window))
          {
***************
*** 5544,5551 ****
        else
          {
            int pixcolumn, pixrow;
!           column -= XINT (XWINDOW (window)->left);
!           row -= XINT (XWINDOW (window)->top);
            glyph_to_pixel_coords (XWINDOW(window), column, row,
                                     &pixcolumn, &pixrow);
            XSETINT (event->x, pixcolumn);
--- 5542,5549 ----
        else
          {
            int pixcolumn, pixrow;
!           column -= WINDOW_LEFT_EDGE_COL (XWINDOW (window));
!           row -= WINDOW_TOP_EDGE_LINE (XWINDOW (window));
            glyph_to_pixel_coords (XWINDOW(window), column, row,
                                     &pixcolumn, &pixrow);
            XSETINT (event->x, pixcolumn);
***************
*** 5598,5603 ****
--- 5596,5602 ----
        Lisp_Object window;
        Lisp_Object posn;
        Lisp_Object files;
+       int wx, wy;
  
        /* The frame_or_window field should be a cons of the frame in
           which the event occurred and a list of the filenames
***************
*** 5614,5620 ****
          return Qnil;
  
        window = window_from_coordinates (f, XINT (event->x),
!                                           XINT (event->y), &part, 0);
  
        if (!WINDOWP (window))
          {
--- 5613,5620 ----
          return Qnil;
  
        window = window_from_coordinates (f, XINT (event->x),
!                                           XINT (event->y),
!                                         &part, &wx, &wy, 0);
  
        if (!WINDOWP (window))
          {
***************
*** 5627,5636 ****
               event->x/ event->y.  */
            struct window *w = XWINDOW (window);
  
-           /* Get window relative coordinates.  */
-           int wx = FRAME_TO_WINDOW_PIXEL_X (w, XINT (event->x));
-           int wy = FRAME_TO_WINDOW_PIXEL_Y (w, XINT (event->y));
- 
            /* Set event coordinates to window-relative coordinates
               for constructing the Lisp event below.  */
            XSETINT (event->x, wx);
--- 5627,5632 ----
***************
*** 5745,5765 ****
        enum window_part area;
        Lisp_Object window;
        Lisp_Object posn;
  
        if (frame)
        /* It's in a frame; which window on that frame?  */
!       window = window_from_coordinates (frame, XINT (x), XINT (y), &area, 0);
        else
        window = Qnil;
  
        if (WINDOWP (window))
        {
          struct window *w = XWINDOW (window);
-         int wx, wy;
  
!         /* Get window relative coordinates.  */
!         wx = FRAME_TO_WINDOW_PIXEL_X (w, XINT (x));
!         wy = FRAME_TO_WINDOW_PIXEL_Y (w, XINT (y));
          XSETINT (x, wx);
          XSETINT (y, wy);
  
--- 5741,5760 ----
        enum window_part area;
        Lisp_Object window;
        Lisp_Object posn;
+       int wx, wy;
  
        if (frame)
        /* It's in a frame; which window on that frame?  */
!       window = window_from_coordinates (frame, XINT (x), XINT (y),
!                                         &area, &wx, &wy, 0);
        else
        window = Qnil;
  
        if (WINDOWP (window))
        {
          struct window *w = XWINDOW (window);
  
!         /* Set window relative coordinates.  */
          XSETINT (x, wx);
          XSETINT (y, wy);
  
***************
*** 7929,7935 ****
    register Lisp_Object name;
    int nlength;
    /* FIXME: Use the minibuffer's frame width.  */
!   int width = FRAME_WIDTH (SELECTED_FRAME ()) - 4;
    int idx = -1;
    int nobindings = 1;
    Lisp_Object rest, vector;
--- 7924,7930 ----
    register Lisp_Object name;
    int nlength;
    /* FIXME: Use the minibuffer's frame width.  */
!   int width = FRAME_COLS (SELECTED_FRAME ()) - 4;
    int idx = -1;
    int nobindings = 1;
    Lisp_Object rest, vector;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]