(lisp_data_to_selection_data): Call
[bpt/emacs.git] / src / widget.c
index b9dfe47..b7d1754 100644 (file)
@@ -36,6 +36,7 @@ Boston, MA 02111-1307, USA.  */
 #include "xterm.h"
 
 #include "frame.h"
+#include "window.h"
 
 #include "dispextern.h"
 #include "blockinput.h"
@@ -779,6 +780,8 @@ EmacsFrameResize (widget)
   change_frame_size (f, rows, columns, 0, 1);
   update_wm_hints (ew); 
   update_various_frame_slots (ew);
+
+  cancel_mouse_face (f);
 }
 
 static Boolean
@@ -796,7 +799,6 @@ EmacsFrameSetValues (cur_widget, req_widget, new_widget, dum1, dum2)
   Boolean has_to_recompute_size;
   Boolean has_to_recompute_gcs;
   Boolean has_to_update_hints;
-  Boolean has_to_update_internal_border_width;
 
   int char_width, char_height;
   Dimension pixel_width;
@@ -815,10 +817,6 @@ EmacsFrameSetValues (cur_widget, req_widget, new_widget, dum1, dum2)
 
   has_to_update_hints = (cur->emacs_frame.font != new->emacs_frame.font);
 
-  has_to_update_internal_border_width
-    = (cur->emacs_frame.internal_border_width
-       != new->emacs_frame.internal_border_width);
-
   if (has_to_recompute_gcs)
     {
       setup_frame_gcs (new);
@@ -844,18 +842,12 @@ EmacsFrameSetValues (cur_widget, req_widget, new_widget, dum1, dum2)
   if (has_to_update_hints)
     update_wm_hints (new);
 
-  /* Don't clobber the internal_border_width
-     if the caller did not try to change it.  */
-  if (! has_to_update_internal_border_width)
-    new->emacs_frame.internal_border_width
-      = new->emacs_frame.frame->output_data.x->internal_border_width;
-
   update_various_frame_slots (new);
 
   /* #### This doesn't work, I haven't been able to find ANY kludge that
      will let (x-create-frame '((iconic . t))) work.  It seems that changes
      to wm_shell's iconic slot have no effect after it has been realized,
-     and calling XIconifyWindow doesn't work either (even thought the window
+     and calling XIconifyWindow doesn't work either (even though the window
      has been created.)  Perhaps there is some property we could smash
      directly, but I'm sick of this for now.
    */
@@ -975,3 +967,14 @@ EmacsFrameSetCharSize (widget, columns, rows)
      we have to make sure to do it here.  */
   SET_FRAME_GARBAGED (f);
 }
+\f
+void
+widget_store_internal_border (widget)
+     Widget widget;
+{
+  EmacsFrame ew = (EmacsFrame) widget;
+  FRAME_PTR f = ew->emacs_frame.frame;
+
+  ew->emacs_frame.internal_border_width
+    = f->output_data.x->internal_border_width;
+}