emacs-diffs
[Top][All Lists]
Advanced

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

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


From: Eli Zaretskii
Subject: [Emacs-diffs] Changes to emacs/src/xterm.c
Date: Thu, 06 Dec 2001 06:56:31 -0500

Index: emacs/src/xterm.c
diff -c emacs/src/xterm.c:1.693 emacs/src/xterm.c:1.694
*** emacs/src/xterm.c:1.693     Sun Dec  2 12:28:08 2001
--- emacs/src/xterm.c   Thu Dec  6 06:56:31 2001
***************
*** 13219,13224 ****
--- 13219,13226 ----
       struct frame *f;
  {
    struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
+   Lisp_Object bar;
+   struct scroll_bar *b;
  
    BLOCK_INPUT;
  
***************
*** 13228,13250 ****
      {
        if (f->output_data.x->icon_desc)
        XDestroyWindow (FRAME_X_DISPLAY (f), f->output_data.x->icon_desc);
!       
  #ifdef HAVE_X_I18N
        if (FRAME_XIC (f))
        free_frame_xic (f);
  #endif
!       
!       if (FRAME_X_WINDOW (f))
!       XDestroyWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f));
!       
  #ifdef USE_X_TOOLKIT
        if (f->output_data.x->widget)
        {
          XtDestroyWidget (f->output_data.x->widget);
          f->output_data.x->widget = NULL;
        }
        free_frame_menubar (f);
! #endif /* USE_X_TOOLKIT */
  
        unload_color (f, f->output_data.x->foreground_pixel);
        unload_color (f, f->output_data.x->background_pixel);
--- 13230,13269 ----
      {
        if (f->output_data.x->icon_desc)
        XDestroyWindow (FRAME_X_DISPLAY (f), f->output_data.x->icon_desc);
! 
! #ifdef USE_X_TOOLKIT
!       /* Explicitly destroy the scroll bars of the frame.  Without
!        this, we get "BadDrawable" errors from the toolkit later on,
!        presumably from expose events generated for the disappearing
!        toolkit scroll bars.  */
!       for (bar = FRAME_SCROLL_BARS (f); !NILP (bar); bar = b->next)
!       {
!         b = XSCROLL_BAR (bar);
!         x_scroll_bar_remove (b);
!       }
! #endif
! 
  #ifdef HAVE_X_I18N
        if (FRAME_XIC (f))
        free_frame_xic (f);
  #endif
! 
  #ifdef USE_X_TOOLKIT
        if (f->output_data.x->widget)
        {
          XtDestroyWidget (f->output_data.x->widget);
          f->output_data.x->widget = NULL;
        }
+       /* Tooltips don't have widgets, only a simple X window, even if
+        we are using a toolkit.  */
+       else if (FRAME_X_WINDOW (f))
+       XDestroyWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f));
+ 
        free_frame_menubar (f);
! #else  /* !USE_X_TOOLKIT */
!       if (FRAME_X_WINDOW (f))
!       XDestroyWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f));
! #endif /* !USE_X_TOOLKIT */
  
        unload_color (f, f->output_data.x->foreground_pixel);
        unload_color (f, f->output_data.x->background_pixel);
***************
*** 13252,13258 ****
        unload_color (f, f->output_data.x->cursor_foreground_pixel);
        unload_color (f, f->output_data.x->border_pixel);
        unload_color (f, f->output_data.x->mouse_pixel);
!       
        if (f->output_data.x->scroll_bar_background_pixel != -1)
        unload_color (f, f->output_data.x->scroll_bar_background_pixel);
        if (f->output_data.x->scroll_bar_foreground_pixel != -1)
--- 13271,13277 ----
        unload_color (f, f->output_data.x->cursor_foreground_pixel);
        unload_color (f, f->output_data.x->border_pixel);
        unload_color (f, f->output_data.x->mouse_pixel);
! 
        if (f->output_data.x->scroll_bar_background_pixel != -1)
        unload_color (f, f->output_data.x->scroll_bar_background_pixel);
        if (f->output_data.x->scroll_bar_foreground_pixel != -1)



reply via email to

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