comparison src/gtkutil.c @ 84342:d514db1d656b

(menu_grab_callback) <cnt>: Move static variable to file scope.
author Glenn Morris <rgm@gnu.org>
date Thu, 06 Sep 2007 07:00:56 +0000
parents b1cecfd7014f
children d72079d7688e
comparison
equal deleted inserted replaced
84341:780798882130 84342:d514db1d656b
1778 popping down a menu is seen by Emacs (see xg_process_timeouts above). 1778 popping down a menu is seen by Emacs (see xg_process_timeouts above).
1779 W is the widget that does the grab (not used). 1779 W is the widget that does the grab (not used).
1780 UNGRAB_P is TRUE if this is an ungrab, FALSE if it is a grab. 1780 UNGRAB_P is TRUE if this is an ungrab, FALSE if it is a grab.
1781 CLIENT_DATA is NULL (not used). */ 1781 CLIENT_DATA is NULL (not used). */
1782 1782
1783 /* Keep track of total number of grabs. */
1784 static int cnt;
1785
1783 static void 1786 static void
1784 menu_grab_callback (GtkWidget *widget, 1787 menu_grab_callback (GtkWidget *widget,
1785 gboolean ungrab_p, 1788 gboolean ungrab_p,
1786 gpointer client_data) 1789 gpointer client_data)
1787 { 1790 {
1788 /* Keep track of total number of grabs. */
1789 static int cnt;
1790
1791 if (ungrab_p) cnt--; 1791 if (ungrab_p) cnt--;
1792 else cnt++; 1792 else cnt++;
1793 1793
1794 if (cnt > 0 && ! xg_timer) xg_start_timer (); 1794 if (cnt > 0 && ! xg_timer) xg_start_timer ();
1795 else if (cnt == 0 && xg_timer) xg_stop_timer (); 1795 else if (cnt == 0 && xg_timer) xg_stop_timer ();