emacs-devel
[Top][All Lists]
Advanced

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

Re: address@hidden: Re: redisplay]


From: YAMAMOTO Mitsuharu
Subject: Re: address@hidden: Re: redisplay]
Date: Tue, 17 Mar 2009 13:13:43 +0900
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI)

>>>>> On Mon, 16 Mar 2009 23:59:40 -0400, Chong Yidong <address@hidden> said:

>>> This does not work properly on X.  With that change, there are
>>> frame exposure problems using the recipe from
>> 
>>> http://lists.gnu.org/archive/html/emacs-devel/2007-04/msg01201.html
>> 
>>> (i.e., when the dialog box is moved, the underlying frame is not
>>> drawn properly.)  However, I have not had time to debug further.
>> 
>> Just to be sure, that doesn't happen if Fredisplay is called from
>> the original position?

> Correct.  The current version works properly; moving the Fredisplay
> call earlier leads to uncorrect display.

Perhaps `menu_items' or something like that is corrupted by the
Fredisplay call?  Could you try the following patch?

                                     YAMAMOTO Mitsuharu
                                address@hidden

Index: src/xmenu.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/xmenu.c,v
retrieving revision 1.339
diff -c -p -r1.339 xmenu.c
*** src/xmenu.c 8 Jan 2009 03:16:12 -0000       1.339
--- src/xmenu.c 17 Mar 2009 04:10:10 -0000
*************** for instance using the window manager, t
*** 604,609 ****
--- 604,617 ----
    if (! FRAME_X_P (f) && ! FRAME_MSDOS_P (f))
      error ("Can not put X dialog on this terminal");
  
+   /* Force a redisplay before showing the dialog.  If a frame is created
+      just before showing the dialog, its contents may not have been fully
+      drawn, as this depends on timing of events from the X server.  Redisplay
+      is not done when a dialog is shown.  If redisplay could be done in the
+      X event loop (i.e. the X event loop does not run in a signal handler)
+      this would not be needed.  */
+   Fredisplay (Qt);
+ 
  #if ! defined (USE_X_TOOLKIT) && ! defined (USE_GTK)
    /* Display a menu with these alternatives
       in the middle of frame F.  */
*************** xdialog_show (f, keymaps, title, header,
*** 2448,2461 ****
    /* No selection has been chosen yet.  */
    menu_item_selection = 0;
  
-   /* Force a redisplay before showing the dialog.  If a frame is created
-      just before showing the dialog, its contents may not have been fully
-      drawn, as this depends on timing of events from the X server.  Redisplay
-      is not done when a dialog is shown.  If redisplay could be done in the
-      X event loop (i.e. the X event loop does not run in a signal handler)
-      this would not be needed.  */
-   Fredisplay (Qt);
- 
    /* Actually create and show the dialog.  */
    create_and_show_dialog (f, first_wv);
  
--- 2456,2461 ----




reply via email to

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