emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/oldXMenu/Activate.c


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/oldXMenu/Activate.c
Date: Fri, 04 Apr 2003 01:23:41 -0500

Index: emacs/oldXMenu/Activate.c
diff -c emacs/oldXMenu/Activate.c:1.4 emacs/oldXMenu/Activate.c:1.5
*** emacs/oldXMenu/Activate.c:1.4       Mon Apr 22 14:27:03 2002
--- emacs/oldXMenu/Activate.c   Tue Feb  4 09:19:01 2003
***************
*** 1,4 ****
! /* $Header: /cvsroot/emacs/emacs/oldXMenu/Activate.c,v 1.4 2002/04/22 
18:27:03 jhd Exp $ */
  /* Copyright    Massachusetts Institute of Technology    1985 */
  
  #include "copyright.h"
--- 1,4 ----
! /* $Header: /cvsroot/emacs/emacs/oldXMenu/Activate.c,v 1.5 2003/02/04 
14:19:01 lektu Exp $ */
  /* Copyright    Massachusetts Institute of Technology    1985 */
  
  #include "copyright.h"
***************
*** 28,34 ****
   *
   *                    1)      If at any time an error occurs the data
   *                            pointer is left untouched and XM_FAILURE
!  *                            is returned.  
   *
   *                    2)      When a selection request is received (i.e.,
   *                            when the specified mouse event occurs) the
--- 28,34 ----
   *
   *                    1)      If at any time an error occurs the data
   *                            pointer is left untouched and XM_FAILURE
!  *                            is returned.
   *
   *                    2)      When a selection request is received (i.e.,
   *                            when the specified mouse event occurs) the
***************
*** 42,48 ****
   *                            will be left untouched and XM_NO_SELECT will
   *                            be returned.
   *
!  *                    4)      If the selection that was current at the time 
   *                            a selection request is made is not an active
   *                            selection the data pointer will be left
   *                            untouched and XM_IA_SELECT will be returned.
--- 42,48 ----
   *                            will be left untouched and XM_NO_SELECT will
   *                            be returned.
   *
!  *                    4)      If the selection that was current at the time
   *                            a selection request is made is not an active
   *                            selection the data pointer will be left
   *                            untouched and XM_IA_SELECT will be returned.
***************
*** 131,137 ****
  
      XMEventQue *feq = NULL;                   /* Foreign event queue. */
      XMEventQue *feq_tmp;              /* Foreign event queue temporary. */
!     
      /*
       * If there are no panes in the menu then return failure
       * because the menu is not initialized.
--- 131,137 ----
  
      XMEventQue *feq = NULL;                   /* Foreign event queue. */
      XMEventQue *feq_tmp;              /* Foreign event queue temporary. */
! 
      /*
       * If there are no panes in the menu then return failure
       * because the menu is not initialized.
***************
*** 162,175 ****
       * Compute origin of menu so that cursor is in
       * Correct pane and selection.
       */
!     _XMTransToOrigin(display, 
!                    menu, 
!                    cur_p, cur_s, 
!                    x_pos, y_pos, 
                     &orig_x, &orig_y);
      menu->x_pos = orig_x;     /* Store X and Y coords of menu. */
      menu->y_pos = orig_y;
!     
      if (XMenuRecompute(display, menu) == XM_FAILURE) {
        return(XM_FAILURE);
      }
--- 162,175 ----
       * Compute origin of menu so that cursor is in
       * Correct pane and selection.
       */
!     _XMTransToOrigin(display,
!                    menu,
!                    cur_p, cur_s,
!                    x_pos, y_pos,
                     &orig_x, &orig_y);
      menu->x_pos = orig_x;     /* Store X and Y coords of menu. */
      menu->y_pos = orig_y;
! 
      if (XMenuRecompute(display, menu) == XM_FAILURE) {
        return(XM_FAILURE);
      }
***************
*** 212,222 ****
       * not provided an event handler.
       */
      XSync(display, 0);
!     
      /*
       * Grab the mouse for menu input.
       */
!     
      status = XGrabPointer(
                          display,
                          menu->parent,
--- 212,222 ----
       * not provided an event handler.
       */
      XSync(display, 0);
! 
      /*
       * Grab the mouse for menu input.
       */
! 
      status = XGrabPointer(
                          display,
                          menu->parent,
***************
*** 239,245 ****
          if (status != Success)
            XUngrabPointer(display, CurrentTime);
        }
!     
      if (status == _X_FAILURE) {
        _XMErrorCode = XME_GRAB_MOUSE;
        return(XM_FAILURE);
--- 239,245 ----
          if (status != Success)
            XUngrabPointer(display, CurrentTime);
        }
! 
      if (status == _X_FAILURE) {
        _XMErrorCode = XME_GRAB_MOUSE;
        return(XM_FAILURE);
***************
*** 250,256 ****
       */
      XMapWindow(display, cur_p->window);
      for (p_ptr = menu->p_list->next;
!        p_ptr != cur_p; 
         p_ptr = p_ptr->next)
        XMapWindow(display, p_ptr->window);
      for (p_ptr = cur_p->next;
--- 250,256 ----
       */
      XMapWindow(display, cur_p->window);
      for (p_ptr = menu->p_list->next;
!        p_ptr != cur_p;
         p_ptr = p_ptr->next)
        XMapWindow(display, p_ptr->window);
      for (p_ptr = cur_p->next;
***************
*** 260,266 ****
  
      XRaiseWindow(display, cur_p->window);     /* Make sure current */
                                                /* pane is on top. */
!     
      cur_s = NULL;                     /* Clear current selection. */
  
      /*
--- 260,266 ----
  
      XRaiseWindow(display, cur_p->window);     /* Make sure current */
                                                /* pane is on top. */
! 
      cur_s = NULL;                     /* Clear current selection. */
  
      /*
***************
*** 271,277 ****
        switch (event.type) {           /* Dispatch on the event type. */
      case Expose:
            event_xmp = (XMPane *)XLookUpAssoc(display,
!                                              menu->assoc_tab, 
                                               event.xexpose.window);
            if (event_xmp == NULL) {
                /*
--- 271,277 ----
        switch (event.type) {           /* Dispatch on the event type. */
      case Expose:
            event_xmp = (XMPane *)XLookUpAssoc(display,
!                                              menu->assoc_tab,
                                               event.xexpose.window);
            if (event_xmp == NULL) {
                /*
***************
*** 292,298 ****
            }
            if (event_xmp->activated) {
                XSetWindowBackground(display,
!                                    event_xmp->window, 
                                     menu->bkgnd_color);
            }
            else {
--- 292,298 ----
            }
            if (event_xmp->activated) {
                XSetWindowBackground(display,
!                                    event_xmp->window,
                                     menu->bkgnd_color);
            }
            else {
***************
*** 303,315 ****
            _XMRefreshPane(display, menu, event_xmp);
            break;
      case EnterNotify:
!           /* 
             * First wait a small period of time, and see
             * if another EnterNotify event follows hard on the
             * heels of this one. i.e., the user is simply
             * "passing through". If so, ignore this one.
             */
!       
            event_xmw = (XMWindow *)XLookUpAssoc(display,
                                                 menu->assoc_tab,
                                                 event.xcrossing.window);
--- 303,315 ----
            _XMRefreshPane(display, menu, event_xmp);
            break;
      case EnterNotify:
!           /*
             * First wait a small period of time, and see
             * if another EnterNotify event follows hard on the
             * heels of this one. i.e., the user is simply
             * "passing through". If so, ignore this one.
             */
! 
            event_xmw = (XMWindow *)XLookUpAssoc(display,
                                                 menu->assoc_tab,
                                                 event.xcrossing.window);
***************
*** 324,334 ****
                    if(peek_event.type == LeaveNotify) {
                        break;
                    }
!               }                         
                cur_s = (XMSelect *)event_xmw;
                help_callback (cur_s->help_string,
                               cur_p->serial, cur_s->serial);
!               
                /*
                 * If the pane we are in is active and the
                 * selection entered is active then activate
--- 324,334 ----
                    if(peek_event.type == LeaveNotify) {
                        break;
                    }
!               }
                cur_s = (XMSelect *)event_xmw;
                help_callback (cur_s->help_string,
                               cur_p->serial, cur_s->serial);
! 
                /*
                 * If the pane we are in is active and the
                 * selection entered is active then activate
***************
*** 385,391 ****
                 * take it from here.  -- address@hidden
                 */
                XSetWindowBackground(display,
!                                    event_xmp->window, 
                                     menu->bkgnd_color);
                _XMRefreshPane(display, menu, event_xmp);
  #endif
--- 385,391 ----
                 * take it from here.  -- address@hidden
                 */
                XSetWindowBackground(display,
!                                    event_xmp->window,
                                     menu->bkgnd_color);
                _XMRefreshPane(display, menu, event_xmp);
  #endif
***************
*** 400,406 ****
                                                 );
            if (event_xmw == NULL) break;
            if(cur_s == NULL) break;
!           
            /*
             * If the current selection was activated then
             * deactivate it.
--- 400,406 ----
                                                 );
            if (event_xmw == NULL) break;
            if(cur_s == NULL) break;
! 
            /*
             * If the current selection was activated then
             * deactivate it.
***************
*** 411,417 ****
            }
            cur_s = NULL;
            break;
!       
      case ButtonPress:
      case ButtonRelease:
                *p_num = cur_p->serial;
--- 411,417 ----
            }
            cur_s = NULL;
            break;
! 
      case ButtonPress:
      case ButtonRelease:
                *p_num = cur_p->serial;
***************
*** 471,477 ****
       */
      for ( p_ptr = menu->p_list->next;
         p_ptr != menu->p_list;
!        p_ptr = p_ptr->next) 
        {
          XUnmapWindow(display, p_ptr->window);
        }
--- 471,477 ----
       */
      for ( p_ptr = menu->p_list->next;
         p_ptr != menu->p_list;
!        p_ptr = p_ptr->next)
        {
          XUnmapWindow(display, p_ptr->window);
        }
***************
*** 482,488 ****
      XUngrabPointer(display, CurrentTime);
      XUngrabKeyboard(display, CurrentTime);
  
!     /* 
       * Restore bits under where the menu was if we managed
       * to save them and free the pixmap.
       */
--- 482,488 ----
      XUngrabPointer(display, CurrentTime);
      XUngrabKeyboard(display, CurrentTime);
  
!     /*
       * Restore bits under where the menu was if we managed
       * to save them and free the pixmap.
       */
***************
*** 502,508 ****
       * Synchronize the X buffers and the X event queue.
       */
      XSync(display, 0);
!     
      /*
       * Dispatch any events remaining on the queue.
       */
--- 502,508 ----
       * Synchronize the X buffers and the X event queue.
       */
      XSync(display, 0);
! 
      /*
       * Dispatch any events remaining on the queue.
       */
***************
*** 557,563 ****
        feq = feq_tmp->next;
        free((char *)feq_tmp);
      }
!     
      /*
       * Return successfully.
       */
--- 557,563 ----
        feq = feq_tmp->next;
        free((char *)feq_tmp);
      }
! 
      /*
       * Return successfully.
       */




reply via email to

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