/* Where the mouse was last time we reported a mouse event. */
static RECT last_mouse_glyph;
-static FRAME_PTR last_mouse_glyph_frame;
+static struct frame *last_mouse_glyph_frame;
/* The scroll bar in which the last motion event occurred.
#endif
static void my_set_foreground_window (HWND);
static void my_destroy_window (struct frame *, HWND);
-static void w32fullscreen_hook (FRAME_PTR);
+static void w32fullscreen_hook (struct frame *);
#ifdef GLYPH_DEBUG
static void x_check_font (struct frame *, struct font *);
/* Draw a filled rectangle at the specified position. */
void
-w32_fill_rect (FRAME_PTR f, HDC hdc, COLORREF pix, RECT *lprect)
+w32_fill_rect (struct frame *f, HDC hdc, COLORREF pix, RECT *lprect)
{
HBRUSH hb;
}
void
-w32_clear_window (FRAME_PTR f)
+w32_clear_window (struct frame *f)
{
RECT rect;
HDC hdc = get_frame_dc (f);
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.
static Lisp_Object last_mouse_motion_frame;
static int
-note_mouse_movement (FRAME_PTR frame, MSG *msg)
+note_mouse_movement (struct frame *frame, MSG *msg)
{
int mouse_x = LOWORD (msg->lParam);
int mouse_y = HIWORD (msg->lParam);
************************************************************************/
static struct scroll_bar *x_window_to_scroll_bar (Window);
-static void x_scroll_bar_report_motion (FRAME_PTR *, Lisp_Object *,
+static void x_scroll_bar_report_motion (struct frame **, Lisp_Object *,
enum scroll_bar_part *,
Lisp_Object *, Lisp_Object *,
unsigned long *);
movement. */
static void
-w32_mouse_position (FRAME_PTR *fp, int insist, Lisp_Object *bar_window,
+w32_mouse_position (struct frame **fp, int insist, Lisp_Object *bar_window,
enum scroll_bar_part *part, Lisp_Object *x, Lisp_Object *y,
unsigned long *time)
{
- FRAME_PTR f1;
+ struct frame *f1;
block_input ();
/*#define ATTACH_THREADS*/
static BOOL
-my_show_window (FRAME_PTR f, HWND hwnd, int how)
+my_show_window (struct frame *f, HWND hwnd, int how)
{
#ifndef ATTACH_THREADS
return SendMessage (FRAME_W32_WINDOW (f), WM_EMACS_SHOWWINDOW,
static void
x_scroll_bar_remove (struct scroll_bar *bar)
{
- FRAME_PTR f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window)));
+ struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window)));
block_input ();
`*redeem_scroll_bar_hook' is applied to its window before the judgment. */
static void
-w32_condemn_scroll_bars (FRAME_PTR frame)
+w32_condemn_scroll_bars (struct frame *frame)
{
/* Transfer all the scroll bars to FRAME_CONDEMNED_SCROLL_BARS. */
while (! NILP (FRAME_SCROLL_BARS (frame)))
last call to `*condemn_scroll_bars_hook'. */
static void
-w32_judge_scroll_bars (FRAME_PTR f)
+w32_judge_scroll_bars (struct frame *f)
{
Lisp_Object bar, next;
on the scroll bar. */
static void
-x_scroll_bar_report_motion (FRAME_PTR *fp, Lisp_Object *bar_window,
+x_scroll_bar_report_motion (struct frame **fp, Lisp_Object *bar_window,
enum scroll_bar_part *part,
Lisp_Object *x, Lisp_Object *y,
unsigned long *time)
{
struct scroll_bar *bar = XSCROLL_BAR (last_mouse_scroll_bar);
Window w = SCROLL_BAR_W32_WINDOW (bar);
- FRAME_PTR f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window)));
+ struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window)));
int pos;
int top_range = VERTICAL_SCROLL_BAR_TOP_RANGE (f, XINT (bar->height));
SCROLLINFO si;
redraw them. */
void
-x_scroll_bar_clear (FRAME_PTR f)
+x_scroll_bar_clear (struct frame *f)
{
Lisp_Object bar;
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
if (f)
{
extern void menubar_selection_callback
- (FRAME_PTR f, void * client_data);
+ (struct frame *f, void * client_data);
menubar_selection_callback (f, (void *)msg.msg.wParam);
}
FOR_EACH_FRAME (tail, frame)
{
- FRAME_PTR f = XFRAME (frame);
+ struct frame *f = XFRAME (frame);
/* The tooltip has been drawn already. Avoid the
SET_FRAME_GARBAGED below. */
if (EQ (frame, tip_frame))
}
static void
-w32fullscreen_hook (FRAME_PTR f)
+w32fullscreen_hook (struct frame *f)
{
if (FRAME_VISIBLE_P (f))
{
unblock_input ();
}
-void
-x_unfocus_frame (struct frame *f)
-{
-}
-
/* Raise frame F. */
void
x_raise_frame (struct frame *f)
}
static void
-w32_frame_raise_lower (FRAME_PTR f, int raise_flag)
+w32_frame_raise_lower (struct frame *f, int raise_flag)
{
if (! FRAME_W32_P (f))
return;
/* 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
***********************************************************************/