thread, so we must be careful to ensure access to lisp data is
thread-safe. The following code is safe because the modifier
variable values are updated atomically from lisp and symbols are
thread, so we must be careful to ensure access to lisp data is
thread-safe. The following code is safe because the modifier
variable values are updated atomically from lisp and symbols are
some third party shell extensions can cause it to be used in
system dialogs, which causes a crash if it is not initialized.
This is a known bug in Windows, which was fixed long ago, but
some third party shell extensions can cause it to be used in
system dialogs, which causes a crash if it is not initialized.
This is a known bug in Windows, which was fixed long ago, but
/* If we're inside a function that wants immediate quits,
do it now. */
if (immediate_quit && NILP (Vinhibit_quit))
/* If we're inside a function that wants immediate quits,
do it now. */
if (immediate_quit && NILP (Vinhibit_quit))
solve the deadlock problem above), because we want to be able
to receive C-g to interrupt the lisp thread. */
cancel_all_deferred_msgs ();
solve the deadlock problem above), because we want to be able
to receive C-g to interrupt the lisp thread. */
cancel_all_deferred_msgs ();
if (w32_system_caret_hwnd == NULL)
{
/* Use the default caret width, and avoid changing it
if (w32_system_caret_hwnd == NULL)
{
/* Use the default caret width, and avoid changing it
w32_system_caret_hwnd = hwnd;
CreateCaret (hwnd, NULL, 0,
w32_system_caret_height);
w32_system_caret_hwnd = hwnd;
CreateCaret (hwnd, NULL, 0,
w32_system_caret_height);
flags |= TPM_RIGHTBUTTON;
/* Remember we did a SetCapture on the initial mouse down event,
flags |= TPM_RIGHTBUTTON;
/* Remember we did a SetCapture on the initial mouse down event,
struct frame *f = XFRAME (frame);
/* If frame is ``official'', nothing to do. */
struct frame *f = XFRAME (frame);
/* If frame is ``official'', nothing to do. */
FRAME_CONFIG_SCROLL_BAR_WIDTH (f) = GetSystemMetrics (SM_CXVSCROLL);
f->terminal = dpyinfo->terminal;
FRAME_CONFIG_SCROLL_BAR_WIDTH (f) = GetSystemMetrics (SM_CXVSCROLL);
f->terminal = dpyinfo->terminal;
/* With FRAME_X_DISPLAY_INFO set up, this unwind-protect is safe. */
record_unwind_protect (unwind_create_frame, frame);
#if GLYPH_DEBUG
/* With FRAME_X_DISPLAY_INFO set up, this unwind-protect is safe. */
record_unwind_protect (unwind_create_frame, frame);
#if GLYPH_DEBUG
FRAME_W32_DISPLAY_INFO (f)->reference_count++;
Vframe_list = Fcons (frame, Vframe_list);
FRAME_W32_DISPLAY_INFO (f)->reference_count++;
Vframe_list = Fcons (frame, Vframe_list);
Otherwise TYPE is the name of the atom that denotes the type expected.
If SOURCE is non-nil, get the property on that window instead of from
FRAME. The number 0 denotes the root window.
Otherwise TYPE is the name of the atom that denotes the type expected.
If SOURCE is non-nil, get the property on that window instead of from
FRAME. The number 0 denotes the root window.
If VECTOR_RET_P is non-nil, don't return a string but a vector of values.
Value is nil if FRAME hasn't a property with name PROP or if PROP has
If VECTOR_RET_P is non-nil, don't return a string but a vector of values.
Value is nil if FRAME hasn't a property with name PROP or if PROP has
cursor. Duplicated from xdisp.c, but cannot use the version there
due to lack of atimers on w32. */
#define DEFAULT_HOURGLASS_DELAY 1
cursor. Duplicated from xdisp.c, but cannot use the version there
due to lack of atimers on w32. */
#define DEFAULT_HOURGLASS_DELAY 1
from this point on, x_destroy_window might screw up reference
counts etc. */
f->terminal = dpyinfo->terminal;
from this point on, x_destroy_window might screw up reference
counts etc. */
f->terminal = dpyinfo->terminal;
/* It is now ok to make the frame official even if we get an error
below. And the frame needs to be on Vframe_list or making it
visible won't work. */
Vframe_list = Fcons (frame, Vframe_list);
/* It is now ok to make the frame official even if we get an error
below. And the frame needs to be on Vframe_list or making it
visible won't work. */
Vframe_list = Fcons (frame, Vframe_list);
/* Setting attributes of faces of the tooltip frame from resources
and similar will increment face_change_count, which leads to the
clearing of all current matrices. Since this isn't necessary
/* Setting attributes of faces of the tooltip frame from resources
and similar will increment face_change_count, which leads to the
clearing of all current matrices. Since this isn't necessary
else if (!CommDlgExtendedError ())
file = Qnil;
/* An error occurred, fallback on reading from the mini-buffer. */
else if (!CommDlgExtendedError ())
file = Qnil;
/* An error occurred, fallback on reading from the mini-buffer. */
err = GetPrinter (hPrn, 2, (LPBYTE)ppi2, dwNeeded, &dwReturned);
ClosePrinter (hPrn);
if (!err)
err = GetPrinter (hPrn, 2, (LPBYTE)ppi2, dwNeeded, &dwReturned);
ClosePrinter (hPrn);
if (!err)