diff src/redisplay.c @ 545:9a775fb11bb7

[xemacs-hg @ 2001-05-18 04:39:39 by kkm] My 3 patches of 05/01-05/03
author kkm
date Fri, 18 May 2001 04:39:44 +0000
parents 5aa1854ad537
children 183866b06e0b
line wrap: on
line diff
--- a/src/redisplay.c	Thu May 17 13:55:47 2001 +0000
+++ b/src/redisplay.c	Fri May 18 04:39:44 2001 +0000
@@ -6276,7 +6276,8 @@
 {
   struct device *d = XDEVICE (f->device);
 
-  if (preemption_check)
+  if (preemption_check
+      && !DEVICE_IMPL_FLAG (d, XDEVIMPF_DONT_PREEMPT_REDISPLAY))
     {
       /* The preemption check itself takes a lot of time,
 	 so normally don't do it here.  We do it if called
@@ -6436,27 +6437,29 @@
 redisplay_device (struct device *d, int automatic)
 {
   Lisp_Object frame, frmcons;
-  int preempted = 0;
   int size_change_failed = 0;
   struct frame *f;
 
-  if (automatic
-      && (MAYBE_INT_DEVMETH (d, device_implementation_flags, ())
-	  & XDEVIMPF_NO_AUTO_REDISPLAY))
+  if (automatic && DEVICE_IMPL_FLAG (d, XDEVIMPF_NO_AUTO_REDISPLAY))
     return 0;
 
   if (DEVICE_STREAM_P (d)) /* nothing to do */
     return 0;
 
   /* It is possible that redisplay has been called before the
-     device is fully initialized.  If so then continue with the
-     next device. */
+     device is fully initialized, or that the console implementation
+     allows frameless devices.  If so then continue with the next
+     device. */
   if (NILP (DEVICE_SELECTED_FRAME (d)))
     return 0;
 
-  REDISPLAY_PREEMPTION_CHECK;
-  if (preempted)
-    return 1;
+  if (!DEVICE_IMPL_FLAG (d, XDEVIMPF_DONT_PREEMPT_REDISPLAY))
+    {
+      int preempted;
+      REDISPLAY_PREEMPTION_CHECK;
+      if (preempted)
+	return 1;
+    }
 
   /* Always do the selected frame first. */
   frame = DEVICE_SELECTED_FRAME (d);
@@ -6470,11 +6473,10 @@
     {
       if (CLASS_REDISPLAY_FLAGS_CHANGEDP(f))
 	{
-	  preempted = redisplay_frame (f, 0);
-	}
-
-      if (preempted)
-	return 1;
+	  int preempted = redisplay_frame (f, 0);
+	  if (preempted)
+	    return 1;
+	}
 
       /* If the frame redisplay did not get preempted, then this flag
          should have gotten set to 0.  It might be possible for that
@@ -6500,12 +6502,11 @@
 	{
 	  if (CLASS_REDISPLAY_FLAGS_CHANGEDP (f))
 	    {
-	      preempted = redisplay_frame (f, 0);
+	      int preempted = redisplay_frame (f, 0);
+	      if (preempted)
+		return 1;
 	    }
 
-	  if (preempted)
-	    return 1;
-
 	  if (f->size_change_pending)
 	    size_change_failed = 1;
 	}