emacs-diffs
[Top][All Lists]
Advanced

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

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


From: Jan Djärv
Subject: [Emacs-diffs] Changes to emacs/src/xmenu.c
Date: Sun, 02 Nov 2003 11:47:32 -0500

Index: emacs/src/xmenu.c
diff -c emacs/src/xmenu.c:1.250 emacs/src/xmenu.c:1.251
*** emacs/src/xmenu.c:1.250     Mon Sep  1 11:45:58 2003
--- emacs/src/xmenu.c   Sun Nov  2 11:47:32 2003
***************
*** 1866,1871 ****
--- 1866,1877 ----
        f->output_data.x->saved_menu_event->type = 0;
      }
  
+ #ifdef USE_GTK
+   /* If we have detached menus, we must update deep so detached menus
+      also gets updated.  */
+   deep_p = deep_p || xg_have_tear_offs ();
+ #endif
+ 
    if (deep_p)
      {
        /* Make a widget-value tree representing the entire menu trees.  */
***************
*** 2066,2072 ****
    xg_crazy_callback_abort = 1;
    if (menubar_widget)
      {
!       /* The third arg is DEEP_P, which says to consider the entire
         menu trees we supply, rather than just the menu bar item names.  */
        xg_modify_menubar_widgets (menubar_widget,
                                   f,
--- 2072,2078 ----
    xg_crazy_callback_abort = 1;
    if (menubar_widget)
      {
!       /* The fourth arg is DEEP_P, which says to consider the entire
         menu trees we supply, rather than just the menu bar item names.  */
        xg_modify_menubar_widgets (menubar_widget,
                                   f,
***************
*** 2343,2359 ****
    gtk_widget_show_all (menu);
    gtk_menu_popup (GTK_MENU (menu), 0, 0, pos_func, &popup_x_y, i, 0);
  
-   xg_did_tearoff = 0;
    /* Set this to one.  popup_widget_loop increases it by one, so it becomes
       two.  show_help_echo uses this to detect popup menus.  */
    popup_activated_flag = 1;
    /* Process events that apply to the menu.  */
    popup_widget_loop ();
  
!   if (xg_did_tearoff)
!     xg_keep_popup (menu, xg_did_tearoff);
!   else
!     gtk_widget_destroy (menu);
  
    /* Must reset this manually because the button release event is not passed
       to Emacs event loop. */
--- 2349,2361 ----
    gtk_widget_show_all (menu);
    gtk_menu_popup (GTK_MENU (menu), 0, 0, pos_func, &popup_x_y, i, 0);
  
    /* Set this to one.  popup_widget_loop increases it by one, so it becomes
       two.  show_help_echo uses this to detect popup menus.  */
    popup_activated_flag = 1;
    /* Process events that apply to the menu.  */
    popup_widget_loop ();
  
!   gtk_widget_destroy (menu);
  
    /* Must reset this manually because the button release event is not passed
       to Emacs event loop. */




reply via email to

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