Commit 2cd98812 authored by Dmitry Antipov's avatar Dmitry Antipov

* frame.h (x_set_bitmap_icon) [!HAVE_NS]: New function.

(x_icon_type): Remove prototype.
(x_bitmap_icon) [!HAVE_NS]: Declare as such.
* frame.c (x_icon_type): Remove.
* w32term.c (x_make_frame_visible, x_iconify_frame):
* xterm.c (x_make_frame_visible, x_iconify_frame):
Use x_set_bitmap_icon to factor out common code.
parent a6c2ee1b
2013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
* frame.h (x_set_bitmap_icon) [!HAVE_NS]: New function.
(x_icon_type): Remove prototype.
(x_bitmap_icon) [!HAVE_NS]: Declare as such.
* frame.c (x_icon_type): Remove.
* w32term.c (x_make_frame_visible, x_iconify_frame):
* xterm.c (x_make_frame_visible, x_iconify_frame):
Use x_set_bitmap_icon to factor out common code.
2013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
* dispextern.h (check_x_display_info, x_get_string_resource):
......
......@@ -3381,22 +3381,6 @@ x_set_scroll_bar_width (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
XWINDOW (FRAME_SELECTED_WINDOW (f))->cursor.x = 0;
}
/* Return non-nil if frame F wants a bitmap icon. */
Lisp_Object
x_icon_type (struct frame *f)
{
Lisp_Object tem;
tem = assq_no_quit (Qicon_type, f->param_alist);
if (CONSP (tem))
return XCDR (tem);
else
return Qnil;
}
void
x_set_alpha (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
{
......
......@@ -1230,8 +1230,6 @@ extern void x_set_vertical_scroll_bars (struct frame *, Lisp_Object,
extern void x_set_scroll_bar_width (struct frame *, Lisp_Object,
Lisp_Object);
extern Lisp_Object x_icon_type (struct frame *);
extern long x_figure_window_size (struct frame *, Lisp_Object, bool);
extern void x_set_alpha (struct frame *, Lisp_Object, Lisp_Object);
......@@ -1260,7 +1258,6 @@ extern void x_set_tool_bar_lines (struct frame *f,
Lisp_Object oldval);
extern void x_activate_menubar (struct frame *);
extern void x_real_positions (struct frame *, int *, int *);
extern int x_bitmap_icon (struct frame *, Lisp_Object);
extern void x_set_menu_bar_lines (struct frame *,
Lisp_Object,
Lisp_Object);
......@@ -1279,8 +1276,24 @@ extern void x_query_colors (struct frame *f, XColor *, int);
extern void x_query_color (struct frame *f, XColor *);
extern void x_focus_frame (struct frame *);
#ifndef HAVE_NS
extern int x_bitmap_icon (struct frame *, Lisp_Object);
/* Set F's bitmap icon, if specified among F's parameters. */
FRAME_INLINE void
x_set_bitmap_icon (struct frame *f)
{
Lisp_Object obj = assq_no_quit (Qicon_type, f->param_alist);
if (CONSP (obj))
x_bitmap_icon (f, XCDR (obj));
}
#endif /* !HAVE_NS */
#endif /* HAVE_WINDOW_SYSTEM */
FRAME_INLINE void
flush_frame (struct frame *f)
......
......@@ -5915,13 +5915,9 @@ w32_frame_raise_lower (struct frame *f, int raise_flag)
void
x_make_frame_visible (struct frame *f)
{
Lisp_Object type;
block_input ();
type = x_icon_type (f);
if (!NILP (type))
x_bitmap_icon (f, type);
x_set_bitmap_icon (f);
if (! FRAME_VISIBLE_P (f))
{
......@@ -6031,8 +6027,6 @@ x_make_frame_invisible (struct frame *f)
void
x_iconify_frame (struct frame *f)
{
Lisp_Object type;
/* Don't keep the highlight on an invisible frame. */
if (FRAME_DISPLAY_INFO (f)->x_highlight_frame == f)
FRAME_DISPLAY_INFO (f)->x_highlight_frame = 0;
......@@ -6042,9 +6036,7 @@ x_iconify_frame (struct frame *f)
block_input ();
type = x_icon_type (f);
if (!NILP (type))
x_bitmap_icon (f, type);
x_set_bitmap_icon (f);
/* Simulate the user minimizing the frame. */
SendMessage (FRAME_W32_WINDOW (f), WM_SYSCOMMAND, SC_MINIMIZE, 0);
......
......@@ -9008,7 +9008,6 @@ xembed_send_message (struct frame *f, Time t, enum xembed_message msg,
void
x_make_frame_visible (struct frame *f)
{
Lisp_Object type;
int original_top, original_left;
int retry_count = 2;
......@@ -9016,9 +9015,7 @@ x_make_frame_visible (struct frame *f)
block_input ();
type = x_icon_type (f);
if (!NILP (type))
x_bitmap_icon (f, type);
x_set_bitmap_icon (f);
if (! FRAME_VISIBLE_P (f))
{
......@@ -9225,7 +9222,6 @@ x_iconify_frame (struct frame *f)
#ifdef USE_X_TOOLKIT
int result;
#endif
Lisp_Object type;
/* Don't keep the highlight on an invisible frame. */
if (FRAME_DISPLAY_INFO (f)->x_highlight_frame == f)
......@@ -9236,9 +9232,7 @@ x_iconify_frame (struct frame *f)
block_input ();
type = x_icon_type (f);
if (!NILP (type))
x_bitmap_icon (f, type);
x_set_bitmap_icon (f);
#if defined (USE_GTK)
if (FRAME_GTK_OUTER_WIDGET (f))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment