comparison 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
comparison
equal deleted inserted replaced
544:ffd4d00ff0b6 545:9a775fb11bb7
6274 int 6274 int
6275 redisplay_frame (struct frame *f, int preemption_check) 6275 redisplay_frame (struct frame *f, int preemption_check)
6276 { 6276 {
6277 struct device *d = XDEVICE (f->device); 6277 struct device *d = XDEVICE (f->device);
6278 6278
6279 if (preemption_check) 6279 if (preemption_check
6280 && !DEVICE_IMPL_FLAG (d, XDEVIMPF_DONT_PREEMPT_REDISPLAY))
6280 { 6281 {
6281 /* The preemption check itself takes a lot of time, 6282 /* The preemption check itself takes a lot of time,
6282 so normally don't do it here. We do it if called 6283 so normally don't do it here. We do it if called
6283 from Lisp, though (`redisplay-frame'). */ 6284 from Lisp, though (`redisplay-frame'). */
6284 int preempted; 6285 int preempted;
6434 6435
6435 static int 6436 static int
6436 redisplay_device (struct device *d, int automatic) 6437 redisplay_device (struct device *d, int automatic)
6437 { 6438 {
6438 Lisp_Object frame, frmcons; 6439 Lisp_Object frame, frmcons;
6439 int preempted = 0;
6440 int size_change_failed = 0; 6440 int size_change_failed = 0;
6441 struct frame *f; 6441 struct frame *f;
6442 6442
6443 if (automatic 6443 if (automatic && DEVICE_IMPL_FLAG (d, XDEVIMPF_NO_AUTO_REDISPLAY))
6444 && (MAYBE_INT_DEVMETH (d, device_implementation_flags, ())
6445 & XDEVIMPF_NO_AUTO_REDISPLAY))
6446 return 0; 6444 return 0;
6447 6445
6448 if (DEVICE_STREAM_P (d)) /* nothing to do */ 6446 if (DEVICE_STREAM_P (d)) /* nothing to do */
6449 return 0; 6447 return 0;
6450 6448
6451 /* It is possible that redisplay has been called before the 6449 /* It is possible that redisplay has been called before the
6452 device is fully initialized. If so then continue with the 6450 device is fully initialized, or that the console implementation
6453 next device. */ 6451 allows frameless devices. If so then continue with the next
6452 device. */
6454 if (NILP (DEVICE_SELECTED_FRAME (d))) 6453 if (NILP (DEVICE_SELECTED_FRAME (d)))
6455 return 0; 6454 return 0;
6456 6455
6457 REDISPLAY_PREEMPTION_CHECK; 6456 if (!DEVICE_IMPL_FLAG (d, XDEVIMPF_DONT_PREEMPT_REDISPLAY))
6458 if (preempted) 6457 {
6459 return 1; 6458 int preempted;
6459 REDISPLAY_PREEMPTION_CHECK;
6460 if (preempted)
6461 return 1;
6462 }
6460 6463
6461 /* Always do the selected frame first. */ 6464 /* Always do the selected frame first. */
6462 frame = DEVICE_SELECTED_FRAME (d); 6465 frame = DEVICE_SELECTED_FRAME (d);
6463 6466
6464 f = XFRAME (frame); 6467 f = XFRAME (frame);
6468 6471
6469 if (FRAME_REPAINT_P (f)) 6472 if (FRAME_REPAINT_P (f))
6470 { 6473 {
6471 if (CLASS_REDISPLAY_FLAGS_CHANGEDP(f)) 6474 if (CLASS_REDISPLAY_FLAGS_CHANGEDP(f))
6472 { 6475 {
6473 preempted = redisplay_frame (f, 0); 6476 int preempted = redisplay_frame (f, 0);
6474 } 6477 if (preempted)
6475 6478 return 1;
6476 if (preempted) 6479 }
6477 return 1;
6478 6480
6479 /* If the frame redisplay did not get preempted, then this flag 6481 /* If the frame redisplay did not get preempted, then this flag
6480 should have gotten set to 0. It might be possible for that 6482 should have gotten set to 0. It might be possible for that
6481 not to happen if a size change event were to occur at an odd 6483 not to happen if a size change event were to occur at an odd
6482 time. To make sure we don't miss anything we simply don't 6484 time. To make sure we don't miss anything we simply don't
6498 6500
6499 if (FRAME_REPAINT_P (f)) 6501 if (FRAME_REPAINT_P (f))
6500 { 6502 {
6501 if (CLASS_REDISPLAY_FLAGS_CHANGEDP (f)) 6503 if (CLASS_REDISPLAY_FLAGS_CHANGEDP (f))
6502 { 6504 {
6503 preempted = redisplay_frame (f, 0); 6505 int preempted = redisplay_frame (f, 0);
6506 if (preempted)
6507 return 1;
6504 } 6508 }
6505
6506 if (preempted)
6507 return 1;
6508 6509
6509 if (f->size_change_pending) 6510 if (f->size_change_pending)
6510 size_change_failed = 1; 6511 size_change_failed = 1;
6511 } 6512 }
6512 } 6513 }