277 |
|
|
278 |
extern Lisp_Object Qtop; |
extern Lisp_Object Qtop; |
279 |
extern Lisp_Object Qdisplay; |
extern Lisp_Object Qdisplay; |
|
extern Lisp_Object Qtool_bar_lines; |
|
280 |
|
|
281 |
/* State variables for emulating a three button mouse. */ |
/* State variables for emulating a three button mouse. */ |
282 |
#define LMOUSE 1 |
#define LMOUSE 1 |
2291 |
|
|
2292 |
if (FRAME_W32_WINDOW (f) != 0) |
if (FRAME_W32_WINDOW (f) != 0) |
2293 |
{ |
{ |
2294 |
|
BLOCK_INPUT; |
2295 |
|
/* Update frame's cursor_gc. */ |
2296 |
|
f->output_data.w32->cursor_gc->foreground = fore_pixel; |
2297 |
|
f->output_data.w32->cursor_gc->background = pixel; |
2298 |
|
|
2299 |
|
UNBLOCK_INPUT; |
2300 |
|
|
2301 |
if (FRAME_VISIBLE_P (f)) |
if (FRAME_VISIBLE_P (f)) |
2302 |
{ |
{ |
2303 |
x_update_cursor (f, 0); |
x_update_cursor (f, 0); |
5677 |
|
|
5678 |
x_default_parameter (f, parms, Qmenu_bar_lines, make_number (1), |
x_default_parameter (f, parms, Qmenu_bar_lines, make_number (1), |
5679 |
"menuBar", "MenuBar", RES_TYPE_NUMBER); |
"menuBar", "MenuBar", RES_TYPE_NUMBER); |
5680 |
x_default_parameter (f, parms, Qtool_bar_lines, make_number (0), |
x_default_parameter (f, parms, Qtool_bar_lines, make_number (HAVE_IMAGES), |
5681 |
"toolBar", "ToolBar", RES_TYPE_NUMBER); |
"toolBar", "ToolBar", RES_TYPE_NUMBER); |
5682 |
x_default_parameter (f, parms, Qbuffer_predicate, Qnil, |
x_default_parameter (f, parms, Qbuffer_predicate, Qnil, |
5683 |
"bufferPredicate", "BufferPredicate", RES_TYPE_SYMBOL); |
"bufferPredicate", "BufferPredicate", RES_TYPE_SYMBOL); |
8148 |
} |
} |
8149 |
|
|
8150 |
|
|
|
|
|
8151 |
/*********************************************************************** |
/*********************************************************************** |
8152 |
Image types |
Image types |
8153 |
***********************************************************************/ |
***********************************************************************/ |
8973 |
{ |
{ |
8974 |
EMACS_TIME t; |
EMACS_TIME t; |
8975 |
unsigned long old; |
unsigned long old; |
8976 |
int i, any_freed_p = 0; |
int i, nfreed; |
8977 |
|
|
8978 |
EMACS_GET_TIME (t); |
EMACS_GET_TIME (t); |
8979 |
old = EMACS_SECS (t) - XFASTINT (Vimage_cache_eviction_delay); |
old = EMACS_SECS (t) - XFASTINT (Vimage_cache_eviction_delay); |
8980 |
|
|
8981 |
for (i = 0; i < c->used; ++i) |
/* Block input so that we won't be interrupted by a SIGIO |
8982 |
|
while being in an inconsistent state. */ |
8983 |
|
BLOCK_INPUT; |
8984 |
|
|
8985 |
|
for (i = nfreed = 0; i < c->used; ++i) |
8986 |
{ |
{ |
8987 |
struct image *img = c->images[i]; |
struct image *img = c->images[i]; |
8988 |
if (img != NULL |
if (img != NULL |
8989 |
&& (force_p |
&& (force_p || (img->timestamp < old))) |
|
|| (img->timestamp > old))) |
|
8990 |
{ |
{ |
8991 |
free_image (f, img); |
free_image (f, img); |
8992 |
any_freed_p = 1; |
++nfreed; |
8993 |
} |
} |
8994 |
} |
} |
8995 |
|
|
8997 |
Emacs was iconified for a longer period of time. In that |
Emacs was iconified for a longer period of time. In that |
8998 |
case, current matrices may still contain references to |
case, current matrices may still contain references to |
8999 |
images freed above. So, clear these matrices. */ |
images freed above. So, clear these matrices. */ |
9000 |
if (any_freed_p) |
if (nfreed) |
9001 |
{ |
{ |
9002 |
clear_current_matrices (f); |
Lisp_Object tail, frame; |
9003 |
|
|
9004 |
|
FOR_EACH_FRAME (tail, frame) |
9005 |
|
{ |
9006 |
|
struct frame *f = XFRAME (frame); |
9007 |
|
if (FRAME_W32_P (f) |
9008 |
|
&& FRAME_X_IMAGE_CACHE (f) == c) |
9009 |
|
clear_current_matrices (f); |
9010 |
|
} |
9011 |
|
|
9012 |
++windows_or_buffers_changed; |
++windows_or_buffers_changed; |
9013 |
} |
} |
9014 |
|
|
9015 |
|
UNBLOCK_INPUT; |
9016 |
} |
} |
9017 |
} |
} |
9018 |
|
|