#define IDC_HAND MAKEINTRESOURCE(32649)
#endif
-Lisp_Object Qsuppress_icon;
Lisp_Object Qundefined_color;
Lisp_Object Qcancel_timer;
Lisp_Object Qfont_param;
{
#ifdef GLYPH_DEBUG
struct w32_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
+
+ /* If the frame's image cache refcount is still the same as our
+ private shadow variable, it means we are unwinding a frame
+ for which we didn't yet call init_frame_faces, where the
+ refcount is incremented. Therefore, we increment it here, so
+ that free_frame_faces, called in x_free_frame_resources
+ below, will not mistakenly decrement the counter that was not
+ incremented yet to account for this new frame. */
+ if (FRAME_IMAGE_CACHE (f) != NULL
+ && FRAME_IMAGE_CACHE (f)->refcount == image_cache_refcount)
+ FRAME_IMAGE_CACHE (f)->refcount++;
#endif
x_free_frame_resources (f);
eassert (dpyinfo->reference_count == dpyinfo_refcount);
eassert ((dpyinfo->terminal->image_cache == NULL
&& image_cache_refcount == 0)
- || dpyinfo->terminal->image_cache->refcount == image_cache_refcount);
+ || (dpyinfo->terminal->image_cache != NULL
+ && dpyinfo->terminal->image_cache->refcount == image_cache_refcount));
#endif
return Qt;
}
int minibuffer_only = 0;
long window_prompting = 0;
int width, height;
- ptrdiff_t count = SPECPDL_INDEX ();
+ dynwind_begin ();
struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
Lisp_Object display;
struct w32_display_info *dpyinfo = NULL;
and similar functions. */
Vwindow_list = Qnil;
- return unbind_to (count, frame);
+ dynwind_end ();
+ return frame;
}
/* FRAME is used only to get a handle on the X display. We don't pass the
Lisp_Object name;
long window_prompting = 0;
int width, height;
- ptrdiff_t count = SPECPDL_INDEX ();
+ dynwind_begin ();
struct gcpro gcpro1, gcpro2, gcpro3;
struct kboard *kb;
int face_change_count_before = face_change_count;
face_change_count = face_change_count_before;
/* Discard the unwind_protect. */
- return unbind_to (count, frame);
+ dynwind_end ();
+ return frame;
}
int i, width, height, seen_reversed_p;
struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
int old_windows_or_buffers_changed = windows_or_buffers_changed;
- ptrdiff_t count = SPECPDL_INDEX ();
+ dynwind_begin ();
specbind (Qinhibit_redisplay, Qt);
/* Put tooltip in topmost group and in position. */
SetWindowPos (FRAME_W32_WINDOW (f), HWND_TOPMOST,
root_x, root_y, 0, 0,
- SWP_NOSIZE | SWP_NOACTIVATE);
+ SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOOWNERZORDER);
/* Ensure tooltip is on top of other topmost windows (eg menus). */
SetWindowPos (FRAME_W32_WINDOW (f), HWND_TOP,
0, 0, 0, 0,
- SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
+ SWP_NOMOVE | SWP_NOSIZE
+ | SWP_NOACTIVATE | SWP_NOOWNERZORDER);
unblock_input ();
goto start_timer;
SetWindowPos (FRAME_W32_WINDOW (f), HWND_TOPMOST,
root_x, root_y,
rect.right - rect.left + FRAME_COLUMN_WIDTH (f),
- rect.bottom - rect.top, SWP_NOACTIVATE);
+ rect.bottom - rect.top, SWP_NOACTIVATE | SWP_NOOWNERZORDER);
/* Ensure tooltip is on top of other topmost windows (eg menus). */
SetWindowPos (FRAME_W32_WINDOW (f), HWND_TOP,
0, 0, 0, 0,
- SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
+ SWP_NOMOVE | SWP_NOSIZE
+ | SWP_NOACTIVATE | SWP_NOOWNERZORDER);
/* Let redisplay know that we have made the frame visible already. */
SET_FRAME_VISIBLE (f, 1);
intern ("x-hide-tip"));
UNGCPRO;
- return unbind_to (count, Qnil);
+ dynwind_end ();
+ return Qnil;
}
GCPRO2 (frame, timer);
tip_frame = tip_timer = deleted = Qnil;
- count = SPECPDL_INDEX ();
+ dynwind_begin ();
specbind (Qinhibit_redisplay, Qt);
specbind (Qinhibit_quit, Qt);
}
UNGCPRO;
- return unbind_to (count, deleted);
+ dynwind_end ();
+ return deleted;
}
\f
/***********************************************************************
#endif /* !NTGUI_UNICODE */
{
- int count = SPECPDL_INDEX ();
+ dynwind_begin ();
/* Prevent redisplay. */
specbind (Qinhibit_redisplay, Qt);
block_input ();
}
#endif /* !NTGUI_UNICODE */
unblock_input ();
- unbind_to (count, Qnil);
+ dynwind_end ();
}
if (file_opened)
if (NILP (filename))
Fsignal (Qquit, Qnil);
- RETURN_UNGCPRO (filename);
+ return filename;
}
\f
\"runas\" - run DOCUMENT, which must be an excutable file, with
elevated privileges (a.k.a. \"as Administrator\").
\"properties\"
- - open the the property sheet dialog for DOCUMENT.
+ - open the property sheet dialog for DOCUMENT.
nil - invoke the default OPERATION, or \"open\" if default is
not defined or unavailable.
void
syms_of_w32fns (void)
{
+#include "w32fns.x"
+
globals_of_w32fns ();
track_mouse_window = NULL;
w32_visible_system_caret_hwnd = NULL;
- DEFSYM (Qsuppress_icon, "suppress-icon");
DEFSYM (Qundefined_color, "undefined-color");
DEFSYM (Qcancel_timer, "cancel-timer");
DEFSYM (Qhyper, "hyper");
DEFSYM (Qworkarea, "workarea");
DEFSYM (Qmm_size, "mm-size");
DEFSYM (Qframes, "frames");
- /* This is the end of symbol initialization. */
-
Fput (Qundefined_color, Qerror_conditions,
listn (CONSTYPE_PURE, 2, Qundefined_color, Qerror));
only be necessary if the default setting causes problems. */);
w32_strict_painting = 1;
-#if 0 /* TODO: Port to W32 */
- defsubr (&Sx_change_window_property);
- defsubr (&Sx_delete_window_property);
- defsubr (&Sx_window_property);
-#endif
- defsubr (&Sxw_display_color_p);
- defsubr (&Sx_display_grayscale_p);
- defsubr (&Sxw_color_defined_p);
- defsubr (&Sxw_color_values);
- defsubr (&Sx_server_max_request_size);
- defsubr (&Sx_server_vendor);
- defsubr (&Sx_server_version);
- defsubr (&Sx_display_pixel_width);
- defsubr (&Sx_display_pixel_height);
- defsubr (&Sx_display_mm_width);
- defsubr (&Sx_display_mm_height);
- defsubr (&Sx_display_screens);
- defsubr (&Sx_display_planes);
- defsubr (&Sx_display_color_cells);
- defsubr (&Sx_display_visual_class);
- defsubr (&Sx_display_backing_store);
- defsubr (&Sx_display_save_under);
- defsubr (&Sx_create_frame);
- defsubr (&Sx_open_connection);
- defsubr (&Sx_close_connection);
- defsubr (&Sx_display_list);
- defsubr (&Sx_synchronize);
-
- /* W32 specific functions */
-
- defsubr (&Sw32_define_rgb_color);
- defsubr (&Sw32_default_color_map);
- defsubr (&Sw32_display_monitor_attributes_list);
- defsubr (&Sw32_send_sys_command);
- defsubr (&Sw32_shell_execute);
- defsubr (&Sw32_register_hot_key);
- defsubr (&Sw32_unregister_hot_key);
- defsubr (&Sw32_registered_hot_keys);
- defsubr (&Sw32_reconstruct_hot_key);
- defsubr (&Sw32_toggle_lock_key);
- defsubr (&Sw32_window_exists_p);
- defsubr (&Sw32_frame_rect);
- defsubr (&Sw32_battery_status);
-
-#ifdef WINDOWSNT
- defsubr (&Sfile_system_info);
- defsubr (&Sdefault_printer_name);
-#endif
-
- defsubr (&Sset_message_beep);
-
hourglass_hwnd = NULL;
- defsubr (&Sx_show_tip);
- defsubr (&Sx_hide_tip);
tip_timer = Qnil;
staticpro (&tip_timer);
tip_frame = Qnil;
last_show_tip_args = Qnil;
staticpro (&last_show_tip_args);
-
- defsubr (&Sx_file_dialog);
-#ifdef WINDOWSNT
- defsubr (&Ssystem_move_file_to_trash);
-#endif
}
\f