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: Fri, 21 Mar 2003 08:49:40 -0500

Index: emacs/src/keyboard.c
diff -c emacs/src/keyboard.c:1.730 emacs/src/keyboard.c:1.731
*** emacs/src/keyboard.c:1.730  Sun Mar  9 15:43:04 2003
--- emacs/src/keyboard.c        Fri Mar 21 08:49:39 2003
***************
*** 5084,5090 ****
        /* Build the position as appropriate for this mouse click.  */
        if (event->kind == MOUSE_CLICK_EVENT)
          {
!           int part;
            struct frame *f = XFRAME (event->frame_or_window);
            Lisp_Object posn;
            Lisp_Object string_info = Qnil;
--- 5084,5090 ----
        /* Build the position as appropriate for this mouse click.  */
        if (event->kind == MOUSE_CLICK_EVENT)
          {
!           enum window_part part;
            struct frame *f = XFRAME (event->frame_or_window);
            Lisp_Object posn;
            Lisp_Object string_info = Qnil;
***************
*** 5183,5208 ****
                XSETINT (event->x, wx);
                XSETINT (event->y, wy);
  
!               if (part == 1 || part == 3)
                  {
                    /* Mode line or header line.  Look for a string under
                       the mouse that may have a `local-map' property.  */
                    Lisp_Object string;
                    int charpos;
  
!                   posn = part == 1 ? Qmode_line : Qheader_line;
!                   string = mode_line_string (w, wx, wy, part == 1, &charpos);
                    if (STRINGP (string))
                      string_info = Fcons (string, make_number (charpos));
                  }
!               else if (part == 2)
                  posn = Qvertical_line;
!               else if (part == 6 || part == 7)
                  {
                    int charpos;
                    Lisp_Object object = marginal_area_string (w, wx, wy, part,
                                                               &charpos);
!                   posn = (part == 6) ? Qleft_margin : Qright_margin;
                    if (STRINGP (object))
                      string_info = Fcons (object, make_number (charpos));
                  }
--- 5183,5208 ----
                XSETINT (event->x, wx);
                XSETINT (event->y, wy);
  
!               if (part == ON_MODE_LINE || part == ON_HEADER_LINE)
                  {
                    /* Mode line or header line.  Look for a string under
                       the mouse that may have a `local-map' property.  */
                    Lisp_Object string;
                    int charpos;
  
!                   posn = part == ON_MODE_LINE ? Qmode_line : Qheader_line;
!                   string = mode_line_string (w, wx, wy, part, &charpos);
                    if (STRINGP (string))
                      string_info = Fcons (string, make_number (charpos));
                  }
!               else if (part == ON_VERTICAL_BORDER)
                  posn = Qvertical_line;
!               else if (part == ON_LEFT_MARGIN || part == ON_RIGHT_MARGIN)
                  {
                    int charpos;
                    Lisp_Object object = marginal_area_string (w, wx, wy, part,
                                                               &charpos);
!                   posn = (part == ON_LEFT_MARGIN) ? Qleft_margin : 
Qright_margin;
                    if (STRINGP (object))
                      string_info = Fcons (object, make_number (charpos));
                  }
***************
*** 5494,5500 ****
  #if defined(WINDOWSNT) || defined(MAC_OSX)
      case MOUSE_WHEEL_EVENT:
        {
!       int part;
        FRAME_PTR f = XFRAME (event->frame_or_window);
        Lisp_Object window;
        Lisp_Object posn;
--- 5494,5500 ----
  #if defined(WINDOWSNT) || defined(MAC_OSX)
      case MOUSE_WHEEL_EVENT:
        {
!       enum window_part part;
        FRAME_PTR f = XFRAME (event->frame_or_window);
        Lisp_Object window;
        Lisp_Object posn;
***************
*** 5525,5535 ****
            XSETINT (event->x, pixcolumn);
            XSETINT (event->y, pixrow);
  
!           if (part == 1)
              posn = Qmode_line;
!           else if (part == 2)
              posn = Qvertical_line;
!           else if (part == 3)
              posn = Qheader_line;
            else
              {
--- 5525,5535 ----
            XSETINT (event->x, pixcolumn);
            XSETINT (event->y, pixrow);
  
!           if (part == ON_MODE_LINE)
              posn = Qmode_line;
!           else if (part == ON_VERTICAL_BORDER)
              posn = Qvertical_line;
!           else if (part == ON_HEADER_LINE)
              posn = Qheader_line;
            else
              {
***************
*** 5567,5573 ****
  
      case DRAG_N_DROP_EVENT:
        {
!       int part;
        FRAME_PTR f;
        Lisp_Object window;
        Lisp_Object posn;
--- 5567,5573 ----
  
      case DRAG_N_DROP_EVENT:
        {
!       enum window_part part;
        FRAME_PTR f;
        Lisp_Object window;
        Lisp_Object posn;
***************
*** 5610,5620 ****
            XSETINT (event->x, wx);
            XSETINT (event->y, wy);
  
!           if (part == 1)
              posn = Qmode_line;
!           else if (part == 2)
              posn = Qvertical_line;
!           else if (part == 3)
              posn = Qheader_line;
            else
              {
--- 5610,5620 ----
            XSETINT (event->x, wx);
            XSETINT (event->y, wy);
  
!           if (part == ON_MODE_LINE)
              posn = Qmode_line;
!           else if (part == ON_VERTICAL_BORDER)
              posn = Qvertical_line;
!           else if (part == ON_HEADER_LINE)
              posn = Qheader_line;
            else
              {
***************
*** 5710,5716 ****
    /* Or is it an ordinary mouse movement?  */
    else
      {
!       int area;
        Lisp_Object window;
        Lisp_Object posn;
  
--- 5710,5716 ----
    /* Or is it an ordinary mouse movement?  */
    else
      {
!       enum window_part area;
        Lisp_Object window;
        Lisp_Object posn;
  
***************
*** 5731,5741 ****
          XSETINT (x, wx);
          XSETINT (y, wy);
  
!         if (area == 1)
            posn = Qmode_line;
!         else if (area == 2)
            posn = Qvertical_line;
!         else if (area == 3)
            posn = Qheader_line;
          else
            {
--- 5731,5741 ----
          XSETINT (x, wx);
          XSETINT (y, wy);
  
!         if (area == ON_MODE_LINE)
            posn = Qmode_line;
!         else if (area == ON_VERTICAL_BORDER)
            posn = Qvertical_line;
!         else if (area == ON_HEADER_LINE)
            posn = Qheader_line;
          else
            {




reply via email to

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