static void
x_draw_glyph_string (struct glyph_string *s)
{
- int relief_drawn_p = 0;
+ bool relief_drawn_p = 0;
/* If S draws into the background of its successor, draw the
background of the successor first so that S can draw into it.
&& CONSP (Vframe_list)
&& !NILP (XCDR (Vframe_list)))
{
- bufp->kind = FOCUS_IN_EVENT;
- XSETFRAME (bufp->frame_or_window, frame);
+ bufp->arg = Qt;
}
+ else
+ {
+ bufp->arg = Qnil;
+ }
+
+ bufp->kind = FOCUS_IN_EVENT;
+ XSETFRAME (bufp->frame_or_window, frame);
}
frame->output_data.x->focus_state |= state;
{
dpyinfo->w32_focus_event_frame = 0;
x_new_focus_frame (dpyinfo, 0);
- }
+
+ bufp->kind = FOCUS_OUT_EVENT;
+ XSETFRAME (bufp->frame_or_window, frame);
+ }
/* TODO: IME focus? */
}
SET_FRAME_VISIBLE (f, 1);
SET_FRAME_ICONIFIED (f, 0);
SET_FRAME_GARBAGED (f);
- DebPrint (("frame %p (%s) reexposed by WM_PAINT\n", f,
- SDATA (f->name)));
+ if (!f->output_data.w32->asked_for_visible)
+ DebPrint (("frame %p (%s) reexposed by WM_PAINT\n", f,
+ SDATA (f->name)));
/* WM_PAINT serves as MapNotify as well, so report
visibility changes properly. */
{
/* If we decide we want to generate an event to be seen
by the rest of Emacs, we put it here. */
- int tool_bar_p = 0;
+ bool tool_bar_p = 0;
int button;
int up;
{
bool iconified = FRAME_ICONIFIED_P (f);
- SET_FRAME_VISIBLE (f, 1);
+ if (iconified)
+ SET_FRAME_VISIBLE (f, 1);
SET_FRAME_ICONIFIED (f, 0);
/* wait_reading_process_output will notice this
break;
case WM_KILLFOCUS:
+ w32_detect_focus_change (dpyinfo, &msg, &inev);
f = x_top_window_to_frame (dpyinfo, msg.msg.hwnd);
if (f)
{
- if (f == dpyinfo->w32_focus_event_frame)
- dpyinfo->w32_focus_event_frame = 0;
-
- if (f == dpyinfo->w32_focus_frame)
- x_new_focus_frame (dpyinfo, 0);
-
if (f == hlinfo->mouse_face_mouse_frame)
{
/* If we move outside the frame, then we're
the current matrix is invalid or such, give up. */
cursor_glyph = get_phys_cursor_glyph (w);
if (cursor_glyph == NULL)
- return;
+ {
+ DeleteObject (hb);
+ return;
+ }
/* Compute frame-relative coordinates for phys cursor. */
get_phys_cursor_geometry (w, row, cursor_glyph, &left, &top, &h);
/* Simulate the user minimizing the frame. */
SendMessage (FRAME_W32_WINDOW (f), WM_SYSCOMMAND, SC_MINIMIZE, 0);
+ SET_FRAME_VISIBLE (f, 0);
+ SET_FRAME_ICONIFIED (f, 1);
+
unblock_input ();
}
leave_crit ();
}
-/* Window manager things */
-void
-x_wm_set_icon_position (struct frame *f, int icon_x, int icon_y)
-{
-#if 0
- Window window = FRAME_W32_WINDOW (f);
-
- f->display.x->wm_hints.flags |= IconPositionHint;
- f->display.x->wm_hints.icon_x = icon_x;
- f->display.x->wm_hints.icon_y = icon_y;
-
- XSetWMHints (FRAME_X_DISPLAY (f), window, &f->display.x->wm_hints);
-#endif
-}
-
-\f
/***********************************************************************
Fonts
***********************************************************************/
}
#ifdef CYGWIN
- if ((w32_message_fd = open ("/dev/windows", O_RDWR | O_CLOEXEC)) == -1)
+ if ((w32_message_fd = emacs_open ("/dev/windows", O_RDWR, 0)) == -1)
fatal ("opening /dev/windows: %s", strerror (errno));
#endif /* CYGWIN */